Description Usage Arguments Details Value Note Examples
View source: R/ukpolice-deprecated.R
Returns details of crimes within a one mile radius of a given point, at a specific location ID, or from within a custom polygon.
1 2 3 4 5 6 7 | 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 |
If specified, lat
and lng
must be the same length. location
or both lat
and lng
must be specified.
A tibble
with details of crimes at a given location.
The API will return a 400 status code in response to a GET request longer than 4094 characters.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.