ukc_stop_search_loc {ukpolice} | R Documentation |
Stop and search
Description
Returns details on stops and searches at a given location. The stop and searches returned in the API, like the crimes, are only an approximation of where the actual stop and searches occurred, they are not the exact locations.
Usage
ukc_stop_search_loc(location, date = NULL, ...)
ukc_stop_search_coord(lat, lng, date = NULL, ...)
ukc_stop_search_poly(poly_df, date = NULL, ...)
ukc_stop_search_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 or a vector of values to create a custom polygon. |
lng |
Longitude. Accepts a single value or a vector of values to create a custom polygon. |
poly_df |
a dataframe containing the lat/lng pairs which define
the boundary of the custom area, or a |
Details
Functions accept one of lat
and lng
pairs, location
IDs or
a dataframe containing lat/lng pairs defining the boundary of a custom area.
If specified, lat
and lng
must be the same length. If only one
set of coordinates are given, all recorded stop and searches within a one
mile radius are returned. If multiple pairs, all recorded stop and searches
within a custom drawn polygon will be returned.
Value
A tibble
with details of stop and searches outcomes.
See Also
Examples
## Not run:
ukc_stop_search2 <- ukc_stop_search_coord(
lat = c(52.268, 53.194, 52.130),
lng = c(0.543, 0.238, 0.478)
)
poly_df_4 <- data.frame(
lat = c(52.268, 52.794, 52.130, 52.000),
long = c(0.543, 0.238, 0.478, 0.400)
)
ukc_data_poly_4 <- ukc_stop_search_poly(poly_df = poly_df_4)
## End(Not run)