ukpolice is an R package that facilitates retrieving data from the UK police database.. The data provided by the API contains public sector information licensed under the Open Government Licence v3.0.

hex sticker police logo “Police” created by Yu luck from the Noun Project, hex sticker made with hexSticker package

Installation

Install from GitHub

Get the crime data with ukp_crime

ukp_crime() draws crimes from within a one mile radius of the location. When no date is specified, it uses the latest month available, which can be found using ukp_last_update().

Example usage

Using leaflet

You can add a popup that displays the crime type using the popup argument in leaflet.

Other use of ukpolice

ukpolice does other things! At the moment other features include:

To see these examples, read the vignette “Getting Started with ukpolice”.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.