Crime¶
-
class
police_api.crime.Crime(api, data={})[source]¶ An individual crime. Uses the outcomes-for-crime API call.
Parameters: - api (PoliceAPI) – The API instance to use.
- data (dict) – The attributes that will be copied to this instance.
-
id¶ Type: int This crime’s unique internal ID (not used elsewhere in the data or API).
-
persistent_id¶ Type: str This crime’s persistent ID, which is referenced by the outcomes data and in the CSV files. Not guaranteed to be unique.
-
month¶ Type: str The month that this crime was reported in (
%m-%d).
-
category¶ Type: CrimeCategoryThe category of this crime.
-
context¶ Type: str Additional data about this crime provided by the reporting force.
-
outcome_status¶ Type: Crime.OutcomeThe latest outcome to have been recorded for this crime.
-
class
Outcome(api, data={})[source]¶ An outcome for an individual crime.
Parameters: - api (PoliceAPI) – The API instance to use.
- data (dict) – The attributes that will be copied to this instance.
-
category¶ Type: OutcomeCategoryThe category of this particular outcome.
-
date¶ Type: str The month that this outcome was recorded in (
%m-%d).
-
class
police_api.crime.Location(*args, **kwargs)[source]¶ An anonymised location, to which crimes are “snapped”. Information about how location anonymisation works is published on the data.police.uk about page.
Parameters: - api (PoliceAPI) – The API instance to use.
- data (dict) – The attributes that will be copied to this instance.
-
id¶ Type: int This location’s unique ID.
-
name¶ Type: str The name of this location (e.g.
On or near Petrol Station)
-
latitude¶ Type: str This location’s latitude.
-
longitude¶ Type: str This location’s longitude.
-
type¶ Type: str This location’s type (either
'BTP'or'Force', indicating whether the location contains crimes snapped from the British Transport Police or all other forces).
-
class
police_api.crime.CrimeCategory(api, data={})[source]¶ A crime category. Uses the crime-categories API call.
Parameters: - api (PoliceAPI) – The API instance to use.
- data (dict) – The attributes that will be copied to this instance.
-
id¶ Type: str A slug representing this crime category.
-
name¶ Type: str The name of this crime category.
-
class
police_api.crime.OutcomeCategory(api, data={})[source]¶ An outcome category.
Parameters: - api (PoliceAPI) – The API instance to use.
- data (dict) – The attributes that will be copied to this instance.
-
id¶ Type: str A slug representing this outcome category.
-
name¶ Type: str The name of this outcome category.
-
class
police_api.crime.NoLocationCrime(api, data={})[source]¶ A crime with no location. Retrieved via the crimes-no-location API call.