ukp_crime: Find street level crime within a specified distance or area

Description Usage Arguments Value Note Examples

Description

Crimes at street-level; either within a 1 mile radius of a single point, or within a custom area. The street-level crimes returned in the API are only an approximation of where the actual crimes occurred, they are not the exact locations. See the about page (https://data.police.uk/about/#location-anonymisation) for more information about location anonymisation. Note that crime levels may appear lower in Scotland, as only the British Transport Police provide this data.

Usage

1
ukp_crime(lat, lng, date = NULL, ...)

Arguments

lat

latitude of the requested crime area

lng,

longitude of the requested crime area

date,

Optional. (YYY-MM), limit results to a specific month. The latest month will be shown by default. e.g. date = "2013-01"

...

further arguments passed to or from other methods. For example, verbose option can be added with ukp_api("call", config = httr::verbose()). See more in ?httr::GET documentation (https://cran.r-project.org/web/packages/httr/) and (https://cran.r-project.org/web/packages/httr/vignettes/quickstart.html).

Value

a tibble with the columns:

Note

The API will return a 400 status code in response to a GET request longer than 4094 characters. For submitting particularly complex poly parameters, consider using POST instead.

more documentation here: https://data.police.uk/docs/method/crime-street/

Examples

1
2
3
ukp_crime_data <- ukp_crime(lat = 52.629729, lng = -1.131592)

head(ukp_crime_data)

njtierney/ukpolice documentation built on May 23, 2019, 8:23 p.m.