Gets offense-level data from the FBI's National Incident-Based Reporting System (NIBRS)

get_nibrs_offense(
  key = get_api_key(),
  offense = "all",
  variable = "count",
  ori = NULL,
  region = NULL,
  state_abb = NULL
)

Arguments

key

A string containing your FBI's Crime Data Explorer API key

offense

A string or vector of strings with the offenses you want to scrape. If input is 'all' (default), returns data for all offenses. Please run `list_nibrs_offenses()` to see all possible offenses.

variable

A string with the variable you want the data to be in. This is essentially the units you want returned (number of offenses by weapon used, race, bias motivation, etc.). By default returns total count of offenders Please run `list_nibrs_offense_variables()` to see all possible variables.

ori

A string or vector of strings of the 9-character ORI code (unique agency ID) for the desired agency.

region

String or vector of strings input for region name(s) to get data for. Please run `list_regions()` to see all possible variables.

state_abb

String or vector of strings input for state abbreviation(s) to get data for. If NULL (default) returns national data. If `state_abb` and `region` both have values, will use return `region` input data.

Value

A data.frame of NIBRS offense data.

See also

Examples

if (FALSE) { get_nibrs_offense(ori = "DE0010100") }