Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Look up recent crimes recorded by the UK police
ResourceFunction["UKCrimeData"][loc] finds crimes reported in the previous month within 1 mile of GeoLocation loc. | |
ResourceFunction["UKCrimeData"][{p1,p2,…] finds crimes reported in the previous month within the polygon bounded by pi. | |
ResourceFunction["UKCrimeData"][loc,type] finds crimes of a specific type. | |
ResourceFunction["UKCrimeData"][loc,type,date] finds crimes of a specific type recorded in the month containing date. |
GeoRange | Automatic | range to search around the geo location. Ignored if a polygon is specified. Automatic searches a 1 mile radius |
"CrimeType" | "All crime" | type of crime to search for |
Find crimes recorded in the previous month in Oxford:
In[1]:= |
Out[1]= |
Show their locations:
In[2]:= |
Out[2]= |
View the distribution of types:
In[3]:= |
Out[3]= |
View only the recorded incidences of Shoplifting:
In[4]:= |
Out[4]= |
View crimes in the month of August 2021:
In[5]:= |
Out[5]= |
Locations can be given using GeoPosition:
In[6]:= |
Out[6]= |
Or using an entity:
In[7]:= |
Out[7]= |
Or a UK Postcode:
In[8]:= |
Out[8]= |
Or with a polygon of GeoPosition values:
In[9]:= |
Out[9]= |
When using a single GeoLocation crimes within 1 mile are found:
In[10]:= |
Out[10]= |
You can control this range with GeoRange:
In[11]:= |
Out[11]= |
You can limit the types of crime to be returned with "CrimeType":
In[12]:= |
Out[12]= |
The UK Police API will not return more than 10,000 crimes in a single request:
In[13]:= |
Out[13]= |
This work is licensed under a Creative Commons Attribution 4.0 International License