ukc_street_crime: Street level crime

Description Usage Arguments Details Value Examples

View source: R/street-crime.R

Description

Street level crime

Usage

1
ukc_street_crime(lat, lng, date = NULL, crime_category = NULL)

Arguments

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.

date

The year and month in "YYYY-MM" form. If NULL, latest available month will be returned.

crime_category

The category of crime to return. Defaults to returning all crimes. See ukc_crime_category() for details.

Details

lat and lng must be the same length.

Value

A tibble with details of street crimes.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
crime <- ukc_street_crime(
  lat = 51.5, lng = -0.6,
  crime_category = "bicycle-theft"
)

crime_poly <- ukc_street_crime(
  lat = c(52.268, 52.794, 52.130),
  lng = c(0.543, 0.238, 0.478)
)

## End(Not run)

evanodell/ukpolice documentation built on Nov. 24, 2020, 8:06 a.m.