Skip to contents

The crimemappingdata package contains a variety of datasets that are useful in learning crime mapping. These datasets are used in the crimemapping package but are also available for use by anyone else in accordance with the licence shown in the documentation for each dataset.

Installation

You can install the development version of crimemappingdata from GitHub with:

# install.packages("remotes")
remotes::install_github("mpjashby/crimemappingdata")

Available datasets

The following datasets are available, both as:

  • R data that can be called using the data() function, e.g. data(aggravated_assaults), and
  • stand-alone files that can be downloaded in the formats shown below.

See the manual page for each dataset (e.g. ?aggravated_assaults) for the corresponding stand-alone file URL. Different stand-alone datasets are provided in different file formats (including spatial and non-spatial formats) to give the opportunity for students to practice loading files of different types (e.g. using readr::read_csv() or readxl::read_excel()).

Dataset Description Format
aggravated_assaults Aggravated assaults in Austin in 2019 .xlsx
bronx_shootings Shootings in the Bronx in 2019 .csv
cdmx_alcaldias Alcaldías (boroughs) of Mexico City .gpkg
cdmx_car_jacking Car jackings in Mexico City .gpkg
chicago_aggravated_assaults Aggravated assaults in Chicago, 2010 to 2019 .csv.gz
chicago_police_districts Chicago Police Department Districts .kml
cincinnati_burglary Burglaries in Cincinnati, 2016 to 2018 .csv.gz
czechia_collisions Drink/drug-related traffic collisions in Czechia .gpkg
czechia_mcycle_thefts Motorcycle thefts in Czechia .gpkg
downtown_homicides Homicides in downtown Atlanta in 2019 .gpkg
downtown_homicides Homicides in downtown Atlanta in 2019 .csv
glenrose_heights_homicides Homicides in Glenrose Heights in 2019 .gpkg
glenrose_heights_homicides Homicides in Glenrose Heights in 2019 .csv
hungerford_shootings Shootings in the Hungerford Massacre .csv
japan_prefectures Japanese prefecture boundaries, 2019 .gpkg
japan_violence_counts Counts of violent crime in Japan, 2012 .rds
lancashire_asb Anti-social behaviour in Lancashire .tab
lancashire_districts Local authority districts of Lancashire .geojson
lancashire_ward_pop Lancashire ward population .xlsx
lancashire_wards Local government wards of Lancashire .gpkg
london_attacks Fatal terrorist attacks in London .csv
london_crimes Crimes in London .zip
malaysia_violence_counts Violent crime counts in Malaysia, 2006 to 2017 .rds
medellin_homicides Medellin homicides .csv
medellin_metro_lines Metro and cable-car lines in Medellin .zip
medellin_metro_stns Metro and cable-car stations in Medellin .csv
northants_burglary_counts Counts of burglary in Northamptonshire in 2020 .rds
northumbria_asb Anti-social behaviour in Northumbria .tab
northumbria_districts Local authority districts of Northumbria .geojson
northumbria_ward_pop Northumbria ward population .xlsx
northumbria_wards Local government wards of Northumbria .gpkg
nottingham_burglary Burglaries in Nottingham .csv.gz
nottingham_robbery Robberies in Nottingham .csv.gz
nottingham_wards Local government wards of Nottingham .gpkg
nyc_homicides Homicides in New York City, 2016 to 2018 .csv
nyc_precincts New York City Police precinct boundaries .gpkg
nyc_shootings Shootings in New York City in 2019 .csv
qld_police_divisions Queensland Police Service division boundaries .gpkg
qld_population Population of Queensland Police Service divisions .csv.gz
qld_stalking Stalking in Queensland from 2001 to 2022 .xlsx
san_francisco_robbery Personal robberies in San Francisco in 2019 .csv
sao_paulo_homicides Homicides in the region of Sao Paulo .xlsx
sao_paulo_muni Sao Paolo municipality boundaries .geojson
tempe_opioid_calls Calls to opioid overdoses in Tempe, Arizona .csv
uttar_pradesh_districts Districts of Uttar Pradesh .gpkg
uttar_pradesh_murders Murders in Uttar Pradesh .csv
uttar_pradesh_population Population of districts in Uttar Pradesh .csv
vancouver_thefts Thefts in Vancouver in 2020 .csv.gz

Note that gzipped CSV files (with the file extension .csv.gz) can be opened using readr::read_csv() and functions from other packages, but not base::read.csv().

You can find more details about each dataset in the vignette vignette("dataset_summary").

Using the data in teaching

For suggestions on how to use the data in this package for teaching, as well as details of each dataset, see the vignette vignette("teaching").

Data licences

This package is licensed under the MIT Licence, but the individual datasets have been licensed by the data provider using a variety of different open-data licences. Check the manual page for each dataset for details of the relevant licence. Users are responsible for using the data in accordance with the applicable licence for a dataset.