Package: fbiCDE 0.1.0

Jared E. Knowles

fbiCDE: R Wrapper for the FBI Crime Data Explorer (CDE) API

An R wrapper for the FBI Crime Data Explorer (CDE) API (<https://cde.ucr.cjis.gov/LATEST/>) providing access to UCR and NIBRS crime data. Functions cover lookups (agencies, offense codes, states), summarized crime data, arrest statistics, NIBRS incident-level data, Supplemental Homicide Reports (SHR), and police employment statistics. No API key is required for the current CDE host. Based on the original fbi package by Jacob Kaplan (https://github.com/jacobkap/fbi).

Authors:Jared E. Knowles [aut, cre]

fbiCDE_0.1.0.tar.gz
fbiCDE_0.1.0.zip(r-4.7-any)fbiCDE_0.1.0.zip(r-4.6-any)fbiCDE_0.1.0.zip(r-4.5-any)
fbiCDE_0.1.0.tgz(r-4.6-any)fbiCDE_0.1.0.tgz(r-4.5-any)
fbiCDE_0.1.0.tar.gz(r-4.7-any)fbiCDE_0.1.0.tar.gz(r-4.6-any)
fbiCDE_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
fbiCDE/json (API)

# Install 'fbiCDE' in R:
install.packages('fbiCDE', repos = c('https://civilytics.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/civilytics/fbi_cde/issues

Datasets:

On CRAN:

Conda:

3.78 score 48 exports 8 dependencies

Last updated from:d3b0b1a9c0 (on v0.1.0). Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK200
source / vignettesOK213
linux-releaseOK198
macos-releaseOK157
macos-oldrelOK143
windows-develOK352
windows-releaseOK314
windows-oldrelOK335
wasm-releaseOK137

Exports:add_place_spatial_membersCBSA_VINTAGEcde_base_urlcde_pathcde_querycounties_with_fipscounty_agenciescounty_to_fipsget_agenciesget_agency_crimeget_agency_infoget_agency_participationget_api_keyget_arrest_countget_arrest_demographicsget_arrest_demographics_allget_county_agency_crimeget_county_crimeget_county_crime_detailget_estimated_arsonget_estimated_crimeget_leokaget_leoka_monthlyget_metro_crime_detailget_nibrs_offenderget_nibrs_offenseget_nibrs_victimget_offense_codesget_place_crime_detailget_police_employmentget_region_participationget_shrget_state_participationget_statesimpute_reporting_gapsis_valid_oriis_valid_statejoin_census_poplist_metroslist_nibrs_offender_variableslist_nibrs_offense_variableslist_nibrs_offenseslist_nibrs_victim_variableslist_regionslist_ucr_arrest_offensesmetro_agenciesplace_agenciesset_api_key

Dependencies:askpasscurlhttrjsonlitemimeopensslR6sys

Getting Started with fbiCDE
Lookups | Summarized Crime | Arrests | NIBRS | Supplemental Homicide Reports (SHR) | Police Employment | NIBRS Participation | LEOKA

Last update: 2026-08-12
Started: 2026-07-13

Worked example: juvenile arrests from state to street
1. What counts as a juvenile arrest? | 2. All 50 states | Why share, and not a rate per capita | Read this map carefully | 3. Arrests by offence, and a gap in the API | 4. One agency: Columbus Police Department | 5. Every department in the Columbus area | The payoff | Caveats worth carrying forward | Reproducing this

Last update: 2026-08-12
Started: 2026-07-25

Readme and manuals

Help Manual

Help pageTopics
Add spatially-attributed embedded agencies to a place membership frameadd_place_spatial_members
The OMB delineation vintage the bundled CBSA crosswalk was built fromCBSA_VINTAGE
Get the FBI CDE API base URLcde_base_url
Build an FBI CDE API path stringcde_path
Build query parameters for FBI CDE API requestscde_query
List the law-enforcement agencies attributed to a countycounty_agencies
County FIPS Code Lookupcounties_with_fips county_to_fips
All agencies included in the FBI's Crime Data Explorer API.fbi_api_agencies
Flatten CDE JSON responseflatten_cde_json
Get all agencies from the CDE APIget_agencies
Get agency-level crime data from the UCR Offenses Known and Clearancesget_agency_crime
Get information about the selected agencyget_agency_info
Get agency-level NIBRS participation statusget_agency_participation
Returns the FBI's Crime Data Explorer API keyget_api_key
Get arrest offense counts from the UCR Crime Data Explorerget_arrest_count
Get arrestee demographics from the UCR Crime Data Explorerget_arrest_demographics
Get arrestee demographics (all offenses)get_arrest_demographics_all
Crime reported by a county's own primary agency (sheriff/parish)get_county_agency_crime
Aggregate county crime detail into a coverage-transparent rollupget_county_crime
Itemized crime detail for every agency attributed to a countyget_county_crime_detail
Get estimated arson dataget_estimated_arson
Get state- or national-level estimated crime countsget_estimated_crime
Get national LEOKA (Law Enforcement Officers Killed and Assaulted) totalsget_leoka
Get national LEOKA totals for a single monthget_leoka_monthly
Itemized crime detail for every agency in a metropolitan areaget_metro_crime_detail
Gets offender-level data from the FBI's National Incident-Based Reporting System (NIBRS)get_nibrs_offender
Gets offense-level data from the FBI's National Incident-Based Reporting System (NIBRS)get_nibrs_offense
Gets victim-level data from the FBI's National Incident-Based Reporting System (NIBRS)get_nibrs_victim
Get offense codes from the CDE APIget_offense_codes
Itemized crime detail for every agency attributed to a placeget_place_crime_detail
Get agency-, state-, region-, or national-level police staffing data.get_police_employment
Get region-level NIBRS participation rateget_region_participation
Get Supplemental Homicide Reports (SHR) offense countsget_shr
Get state-level NIBRS participation rateget_state_participation
Get state list from the CDE APIget_states
Impute reporting gaps in county crime detail dataimpute_reporting_gaps
Validate an ORI codeis_valid_ori
Validate a state abbreviationis_valid_state
Join Census ACS population estimates to county crime detailjoin_census_pop
List the metropolitan and micropolitan statistical areaslist_metros
Returns a vector of all `variable` parameter options for `get_nibrs_offender()`.list_nibrs_offender_variables
Returns a vector of all `variable` parameter options for `get_nibrs_offense()`.list_nibrs_offense_variables
Return a vector of all offenses in the NIBRS data.list_nibrs_offenses
Returns a vector of all `variable` parameter options for `get_nibrs_victim()`.list_nibrs_victim_variables
Return a vector of all regions choices.list_regions
Return a vector of all offenses in the UCR Arrest data.list_ucr_arrest_offenses
List the law-enforcement agencies in a metropolitan areametro_agencies
All available variables for NIBRS offender data.nibrs_offender_variables
All available variables for NIBRS offense data.nibrs_offense_variables
All offenses available to get NIBRS data for.nibrs_offenses
All available variables for NIBRS victim data.nibrs_victim_variables
List the law-enforcement agencies attributed to a placeplace_agencies
Regions available to get estimated UCR and NIBRS data for.regions
Sets the FBI's Crime Data Explorer API keyset_api_key
All offenses available to get UCR arrest counts for.ucr_arrest_offenses