Skip to content

Police recorded crime

The uk_open_data.crime module loads police recorded crime for every community safety partnership in England and Wales, from the Office for National Statistics' Crime in England and Wales: Police Force Area data tables. It reads the latest edition, for the year to the end of the latest quarter.

load_crime()

from uk_open_data.crime import load_crime

partnerships = load_crime()
partnerships[["geography_name", "total_recorded_crime", "robbery"]]

It returns one row per community safety partnership, 314 in all, as a pandas or polars table, whichever you have:

Column What it holds
geography_code The partnership's code: E22 in England, W14 in Wales
geography_name The partnership's name
police_force_area The police force it is in
year The year the figures are for, such as "year ending June 2026"
total_recorded_crime Every offence the police recorded, excluding fraud
violence_against_the_person, sexual_offences, robbery, theft_offences, shoplifting, ... The offences of each kind ONS gives, one column each, named from its heading

A community safety partnership is a council, or a few councils, working with the police on crime. Most are one council. uk_open_data.areas gives the councils in each, with their share of its residents: local_authority_lookup("community_safety_partnership").

The figures count offences the police recorded, not people or victims. One person can be the victim of many offences, and many offences have no one victim. An offence is counted where it was recorded. Forces record crime in different ways, so a difference between forces may be one of recording.

Offences left out:

  • Offences the police could not place in a partnership, which ONS lists as "Unassigned" under each force. They are about 3% of offences across England and Wales, more in some forces in some quarters.
  • A partnership ONS marks with a note that says its offences are recorded as "Unassigned", such as "Kent [note 5]", has missing figures (null), never the published number. In the year ending June 2026, ONS says so of five Kent partnerships (Dartford and Gravesham, Maidstone, Medway, Tonbridge and Malling, and Tunbridge Wells). Their published figures are partial: Medway shows 96 offences for the year, and Dartford and Gravesham 11,165, where it showed over 19,000 a year before. The loader reads the notes from the "Notes - CSP" sheet, so a note about anything else, such as an undercount of one kind of offence, leaves a partnership's figures as they are.

The analyses take two of these counts as needs, recorded_crime and violence_against_the_person, for England and Wales, and share each partnership's figure out to its councils.

The figures are fetched once and held for the rest of the session. clear_cache() forgets them, to fetch a new edition.

How the latest edition is found

ONS publishes a new edition each quarter. The ONS website gives each page as JSON at the page's address followed by /data. The loader reads the dataset's page that way, takes the first edition it lists, which is the latest, reads that edition's page for its name and its spreadsheet, and reads the table of offences by partnership in it. If the dataset lists no edition, or the table or a column the loader reads has changed, it fails with a ValueError naming ONS's tables. A weekly check fetches the latest edition to make sure it still reads.

The source and how to credit it

Publisher Office for National Statistics, from Home Office police recorded crime
Coverage England and Wales, quarterly, for the latest year
Status Official statistics, not accredited official statistics
Licence Open Government Licence v3.0
Credit Source: Office for National Statistics, Crime in England and Wales: Police Force Area data tables, year ending June 2026. Contains public sector information licensed under the Open Government Licence v3.0.

list_datasets() lists it as ons-police-recorded-crime.