Why I Wrote Data Science for Crime Analysis with Python (2023)

123 pointsposted 4 days ago
by apwheele

22 Comments

chirau

4 days ago

I am looking at the table of contents and it looks like the topics are just the same ones as any other Python for data analysis book. Is there anything specific in the book that is specific to "Crime Analysis" or it is just another data analysis task?

apwheele

4 days ago

The examples are crime analysis focused, you can see the final chapter end-project example here, https://github.com/apwheele/CrimeBook. But yes the fundamentals are the same for most any "data analyst job".

If you look at the preface section "What this book is not", I discuss that point:

> This book is aimed to get you started writing code and applying it to real tasks crime analysts need to conduct. I use realistic examples that a crime analyst may be interested in conducting, such as sending automated emails, making year-to-date tables, and creating line charts. But I do not discuss in detail things like the Poisson distribution for analyzing crime rates or why hotspot analyses is important.

qwertox

4 days ago

"Plug-in could not be loaded". Reminded me of the good old Java Applets / ActiveX days.

`<object data="/images/DS_PythonCrimeAnalysis_EarlyRelease.pdf" width="100%" height="500"></object>` is causing that problem.

Here's the link: https://crimede-coder.com/images/DS_PythonCrimeAnalysis_Earl...

ideashower

4 days ago

> One critique of predictive analytics is that machine learning is racist. This is misleading – predictive policing is a method to identify areas or people that can benefit the greatest from specific interventions.

This is just complete misrepresentation.

Characterizing machine learning itself as inherently racist is an oversimplification. Predictive tools often use biased data from the past, which can make their predictions unfair. The bias in predictive policing stems from historical over-policing in Black neighborhoods compared to white ones, for one example. Using these biased predictions leads police to focus on the same areas and people repeatedly, creating a self-fulfilling cycle. This happens despite evidence showing that people across different communities commit similar minor crimes at comparable rates. The system essentially reinforces existing patterns of unequal law enforcement rather than reflecting true crime distribution.

I see you've written lots of papers on predicting crime. Have you ever gone back and looked at your predictions vs actual reports?

I wish for once people would try to turn this inward on the system rather than support armed agents of the law to further reinforce harmful systems. You could design a system to see how a particular type of outcome from a law enforcement officer's intervention results in the downstream effects of that intervention. Does that person ever re-offend? Does that person instead never touch the legal system again? If they don't re-offend, what is the LEO doing that we could encourage more officers to practice?

There is research to support the idea that less punitive intervention means less recycling through the CJ system. You could look at prosecutors on a single team, and look at diversionary disposition outcomes, with downstream criminal justice data from CJIS systems, to see what outcomes individual prosecutors are doing and how they're actually meaningfully impacting people's lifelihoods, likelihood to reoffend and community safety. Instead, we just continue to reinforce cycles of harm. It's shameful.

tptacek

4 days ago

A common complaint from Black households in Black neighborhoods is that they're under-policed.

jandek

3 days ago

Are you referencing some particular study, or are there just "many such cases"?

kspacewalk2

4 days ago

>This happens despite evidence showing that people across different communities commit similar minor crimes at comparable rates.

This stands out as a giant red [citation needed] to me. Do you have any good references for me to read up on, that back this claim with actual crime stats?

apwheele

3 days ago

In the same page you quote, https://crimede-coder.com/services/PredictiveAnalytics, the next sentence states "CRIME De-Coder has developed methodology to make predictive analytics more fair and racially equitable (Circo & Wheeler, 2022; Wheeler, 2020)."

In terms of turn inward, check out the work I have done on early intervention systems (to identify problematic officers), https://crimede-coder.com/blogposts/2024/EIS.

I have done quite a few evaluations of prosocial interventions in my career as well, my work is not solely focused on proactive policing, https://scholar.google.com/citations?user=iNNqtgwAAAAJ&hl=en

rldjbpin

2 days ago

sadly this is a side-effect of how we treat these algorithms, before ml models and now with llm.

the statistical models which are now so easy to try with defaults and without any thought about how it works. now we don't bother connecting how the choices already made for us affect our problem-solving approach.

user

4 days ago

[deleted]

Vaslo

4 days ago

The only people responsible for reoffending are the reoffenders. It really is that simple.

Arainach

3 days ago

That's not true at all. When the prison spend years dehumanizing someone, taking all of their rights, constantly throwing abuse at them, and giving them no opportunities for self improvement, that is part of the blame for them being unable to adapt and resorting to crime later.

The prison systems, even when not outright physically abusing inmates (which is common enough in America) are full of psychological abuse and exploitation. Everything is charged at incredible rates, and these days they're locked down - "libraries" with very limited selection (no learning to program computers, that's dangerous) that cost money to access anything, bans on physical donations of books and other materials from relatives for "fear of contraband", an so much more.

ggus

3 days ago

Of course it is not that simple.

The more frequently you are stopped by the police, the greater the chance they will find something to charge you with. Since people of color are stopped more often by police, they face a higher likelihood of being charged.

user

4 days ago

[deleted]