find_location_county: Find the county from an address or coordinate pair.

Description Usage Arguments Value Examples

View source: R/02-find.R

Description

Given a California address or longitude/latitude coordinates, find_location_county returns the corresponding California county or PUR code.

Usage

1
find_location_county(locations, return = "name", ...)

Arguments

locations

A vector of character strings. Each location should be either a California address including street name, city, state, and 5-digit zip code, or a pair of coordinates in the form "longitude, latitude".

return

Either "name" to return county name (the default), "pur_code" to return PUR county code, or "fips_code" to return the FIPS county code.

...

Used internally.

Value

A character string giving the California county where the address or coordinate pair given in location is located.

Examples

1
2
3
address <- "13883 Lassen Ave, Helm, CA 93627"
long_lat <- c("-120.09789, 36.53379")
find_location_county(c(address, long_lat))

leighseverson/purexposure documentation built on Aug. 13, 2021, 6:34 p.m.