get_crimes: get_crimes

Description Usage Arguments Value Examples

View source: R/get_crimes.R

Description

Fetches crimes from the police.uk API within a given sf polygon.

Usage

1
get_crimes(polygon, start_month = "latest", end_month = "latest")

Arguments

polygon

an sf polygon within which to request the crimes data

start_month

first month for which to get data for in the format "YYYY-MM". Defaults to most recent month available.

end_month

last month for which to get data for in the format "YYYY-MM". Defaults to most recent month available.

Value

street level crimes as dataframe

Examples

1
2
camden_poly <- localauth_ldn[localauth_ldn$lad20nm == 'Camden',]
get_crimes(camden_poly, start_month = '2020-03', end_month = '2020-07')

Chrisjb/rpoliceuk documentation built on Jan. 30, 2021, 3:27 p.m.