This function takes the name of a region and returns a sf object.
Usage
get_roi(region, ...)
# S4 method for Region
get_roi(region)
Arguments
- region
character. The region of interest. See details
- ...
extra arguments
Value
An object of class sf.
Details
The function currently works only with US states and counties. The
object is retrieved from the U.S. Census TIGER shapefiles. Argument
region
takes the form of a named character vector with elements:
name
, the name of the region.
type
, currently supporting "US State" and "US County".
state
, the name of the US State. Used only for US Counties.
Examples
if (FALSE) {
region <- Region(name = "nebraska", type = "us state",
div = c(country = "United States", state = "Nebraska"))
get_roi(region)
region <- Region(name = "nance", type = "us county",
div = c(country = "United States", state = "Nebraska", county = "Nance"))
get_roi(region)
}