get_agency_info: Get information about the selected agency

Description Usage Arguments Value Examples

View source: R/lookups.R

Description

Get information about the selected agency including the 9-digit ORI, geographic information, type of agency, and whether they report to NIBRS.

Usage

1
get_agency_info(agency, state = NULL, ori_only = FALSE, exact_match = TRUE)

Arguments

agency

A string or vector of strings with the name of the agency you want to lookup (capitalized is ignored).

state

A string or vector of strings of state names. If used, returns only agencies in that state. This is useful in cases where multiple agencies have the same name in different states and you only want specific states.

ori_only

If TRUE (not default), returns only the ORI and the agency_name columns.

exact_match

If TRUE (default), finds matches based on exact match of agency name. Else, uses 'grep()' to find agencies with similar names to inputted agency.

Value

A data.frame with information about the agency - including ORI code and geographic information. The agency will have as many rows as agencies matched from the 'agency' input.

Examples

1
2
get_agency_info("Oakland Police Department")
get_agency_info("Oakland Police Department", state = "california")

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