Checks if ORI (a 9-digit unique identifier code assigned to each agency) is valid for the API.

is_valid_ori(ori)

Arguments

ori

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

Value

TRUE if ori is valid, else FALSE. If ori is a vector, returns TRUE or FALSE for each ori.

Examples

# ORI for Oakland Police Deparment in California is_valid_ori("CA0010900")
#> [1] TRUE
# Incorrect ori is_valid_ori("abc123")
#> [1] FALSE