R/crime-at-location.R
, R/ukpolice-deprecated.R
ukc_crime_location.Rd
Returns details of crimes within a one mile radius of a given point, at a specific location ID, or from within a custom polygon.
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, ...)
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 |
A tibble
with details of crimes at a given location.
If specified, lat
and lng
must be the same length. location
or both lat
and lng
must be specified.
The API will return a 400 status code in response to a GET request longer than 4094 characters.
if (FALSE) { 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) }