It's always been in the back of my mind - When you hear about crimes going unsolved in your local community and indeed nationwide in various news feeds. Anecdotally I've heard friends/colleagues with their various stories regarding some crime and the police either didn't attend or had a piss poor attempt. This can often amount to nobody coming out to investigate and giving a crime number so the insurance company can tick their boxes and everyone moves on with their life.
In the previous years I've dabbled with programming and python for some personal projects. They're extremely rough projects with poorly written code, however I usually don't care as long as it works. I came across the police API when searching for some information about crimes (a serious crime happened around my corner and was curious how it was logged). This project is me just trying to learn, some AI was used where I got stuck with iterating through the dates (func def month_range and the final lambda).
This then got me thinking what data can I get and how can I present it to
Link to the police API documentation: https://data.police.uk/docs/
I was most interested in burglaries and after checking the API it looks like street level crimes allowed me to pass in a custom date range and custom location.
Example query from the docs:
When running a query and outputting a single output it gives:
That's then given me:
- date
- Location
- Category
- Outcome of the crime.
So it should be really easy to parse this into some tables or graphs.
Location
I will get the GPS co-ordinates for the location I'm interested in. In this case Lincoln, UK They can then be passed in as a poly set of GPS coordinates:
The poly parameter is formatted in lat/lng pairs, separated by colons:
[lat],[lng]:[lat],[lng]:[lat],[lng]
The first and last coordinates need not be the same — they will be joined by a straight line once the request is made.

Shape the coordinates cover over Lincoln
Date
The API will only return a single month of data with each query but that's not an issue as the API can be called numerous times. I struggled here with my python knowledge and caved and asked lumo to help. I think due to the query needing "YYYY-MM" I just struggled to iterate through. I chose 2023-01 as it was the first full year it reliably returned data.
Outcomes
2023-01 to 2025-10
If we assume best case scenario where; under investigation, status update unavailable, court result unavailable and awaiting court outcome are all outcomes where somebody is found and prosecuted, then only 13.5% of burglaries somebody was prosecuted (it's likely much lower due to pending outcomes). Interestingly in 69% of reported cases they didn't even find a suspect - Intuitively this makes sense but frustrating nonetheless.

2023-01 to 2023-12
If I run the same script over just 2023 then the percentage is still only around 14% that are solved and justice served. So potentially the rates might not change overtime.
Total Crime 2023-01 to 2025-10
I ran the query on the outcome of all crime in Lincoln are between Jan 2023 and October 2025. The vast majority of crime goes unsolved (92%). Unable to prosecute being the top.
I was then interested in the unsolved rates for each crime individually over the same period. So I picked out the clear unsolved metrics (listed with an Asterix in the above table) and calculated an unsolved rate for each of the types of crime listed as a percentage.
Something fun to start learning. I'm pretty shocked at the solve/prosecute rate for a lot of these crimes. Most crimes are north of 80%. It also makes sense crimes where you're caught in the act (drugs, shoplifting, possessing a weapon) have a higher rate of actually finding the person who carried out the crime, as they're likely right in front of the copper.
Overall seems pretty awful if you ask me. I'd be interested in seeing where your city sits.
Not sure where to take this project next, maybe plotting crime rates per month and learning more. Maybe a moving heatmap/gif of how crime might move around month to month. Going to play with the data more and more to see if there is anything I can see.
.png)

