get_police_employment: Get agency-, state-, region-, or national-level police...

Description Usage Arguments Value Examples

View source: R/ucr_police_employment.R

Description

Get agency-, state-, region-, or national-level police staffing data.

Usage

1
2
3
4
5
6
get_police_employment(
  ori = NULL,
  state_abb = NULL,
  region = NULL,
  key = get_api_key()
)

Arguments

ori

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

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.

region

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

key

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

Value

A data.frame with columns for annual number of employees and officers (also broken up by gender).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Gets only Oakland Police Department in California
get_police_employment("CA0010900")

# Gets California state-level estimates
get_police_employment(state_abb = "CA")

# Gets national-level estimates
get_police_employment()

## End(Not run)

jacobkap/fbi documentation built on Sept. 18, 2020, 7:32 p.m.