Pull the City of Chicago "Crimes - 2001 to Present" feed
Source:R/ingest_chicago.R
morie_ingest_chicago_crime.RdReturns a data.frame with the documented Socrata schema (snake_case
column names preserved): id, case_number,
date, block, iucr, primary_type,
description, location_description, arrest,
domestic, beat, district, ward,
community_area, fbi_code, x_coordinate,
y_coordinate, year, updated_on,
latitude, longitude.
Usage
morie_ingest_chicago_crime(
year = NULL,
where = NULL,
max_features = NULL,
app_token = NULL,
user_agent = .MORIE_CHICAGO_DEFAULT_UA,
timeout = .MORIE_CHICAGO_DEFAULT_TIMEOUT
)Arguments
- year
Optional reporting year (e.g. 2024); when set, applies the server-side SoQL filter
year = <year>.- where
Optional raw SoQL
$whereclause (overridesyear).- max_features
Optional hard cap on returned rows.
- app_token
Optional Socrata X-App-Token for higher rate limits.
- user_agent, timeout
Standard request knobs.
See also
morie_ingest_chicago_socrata,
morie_ingest_bigquery_table for the BigQuery
public-data mirror (bigquery-public-data.chicago_crime).
Examples
if (FALSE) { # \dontrun{
df <- morie_ingest_chicago_crime(year = 2024, max_features = 10000L)
head(df)
} # }