Description Usage Arguments Details Value See Also Examples
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.
1 2 3 4 5 6 7 | 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)
|
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 |
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.
A tibble
with details of stop and searches outcomes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.