ukc_crime_loc {ukpolice} | R Documentation |
Crimes at a specific location
Description
Returns details of crimes within a one mile radius of a given point, at a specific location ID, or from within a custom polygon.
Usage
ukc_crime_loc(location, date = NULL, ...)
ukc_crime_coord(lat, lng, date = NULL, ...)
ukc_crime_poly(poly_df, date = NULL, ...)
ukc_crime_location(lat, lng, location, date = NULL, ...)
Arguments
location |
If specified, |
date |
The year and month in "YYYY-MM" form. If |
... |
further arguments passed to |
lat |
Latitude. Accepts a single value. |
lng |
Longitude. Accepts a single value. |
poly_df |
a dataframe containing the lat/lng pairs which define
the boundary of the custom area, or a |
Details
If specified, lat
and lng
must be the same length. location
or both lat
and lng
must be specified.
Value
A tibble
with details of crimes at a given location.
Note
The API will return a 400 status code in response to a GET request longer than 4094 characters.
Examples
## Not run:
x <- ukc_crime_location(lat = 52, lng = 0)
y <- ukc_crime_location(location = 802171)
poly_df_3 <- data.frame(
lat = c(52.268, 52.794, 52.130),
lng = c(0.543, 0.238, 0.478)
)
z <- ukc_crime_poly(poly_df_3)
## End(Not run)