Description Usage Arguments Value See Also Examples
This function is a general-purpose wrapper around the more specific functions in this package. It is provided for convenience and backward-compatibility with earlier versions of the package. In most cases you should use the more specific functions for the type of boundary that you need.
1 2 |
map_date |
The date of the boundaries as some object coercible to a date
with |
type |
The type of the map, either |
resolution |
The resolution of the map. High resolution data is
contained in the suggested package |
states |
A character vector of state or territory names. Only boundaries for these states/territories will be returned. |
An sf
object.
us_states
, us_counties
,
us_congressional
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | if (require(USAboundariesData) && require(sf)) {
map_states <- us_boundaries("1850-07-04")
map_counties <- us_boundaries(as.Date("1850-07-04"), type = "county")
new_england <- c("Massachusetts", "Vermont", "New Hampshire", "Connecticut",
"Rhode Island", "Maine")
map_ne <- us_boundaries("1943-02-12", states = new_england)
map_congressional <- us_boundaries(type = "congressional",
states = new_england)
plot(st_geometry(map_states))
plot(st_geometry(map_counties))
plot(st_geometry(map_ne))
plot(st_geometry(map_congressional))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.