complaint_sample: Chicago reported-crime sample ("complaints")

complaint_sampleR Documentation

Chicago reported-crime sample ("complaints")

Description

A CRAN-safe slice of the City of Chicago "Crimes – 2001 to present" dataset (reported incidents), filtered to geocoded rows from 2020 onward. For the full dataset use chiload("complaints", full = TRUE).

Usage

complaint_sample

Format

A base data.frame with up to 25,000 rows and 16 columns:

case_number

Chicago PD records-division number (character).

date_iso

Incident timestamp as an ISO-8601 string with offset (lossless across R/Python).

date

Incident timestamp as POSIXct (America/Chicago).

iucr

Illinois Uniform Crime Reporting code (character).

primary_type

Primary FBI crime classification.

description

Secondary description of the offense.

arrest

Whether an arrest was made (logical).

domestic

Whether domestic-violence related (logical).

beat,district,ward,community_area

Geographic area codes (integer).

fbi_code

FBI crime code (character).

year

Year of the incident (integer).

latitude,longitude

WGS84 coordinates (numeric).

Source

City of Chicago Open Data Portal, "Crimes - 2001 to present" (dataset ijzp-q8t2). https://data.cityofchicago.org/

See Also

chiload

Examples

data(complaint_sample)
dim(complaint_sample)
str(complaint_sample)

# Most common offense types.
head(sort(table(complaint_sample$primary_type), decreasing = TRUE), 5)

# Arrest rate among reported incidents.
mean(complaint_sample$arrest)

# Incidents per year (the sample spans 2020+).
table(complaint_sample$year)

# Domestic-violence-flagged incidents by type.
head(sort(table(complaint_sample$primary_type[complaint_sample$domestic]),
  decreasing = TRUE
), 3)

rmoriedata documentation built on Nov. 12, 2026, 9:06 a.m.