Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nation

Download a US national boundary shapefile into R


Description

Download a US national boundary shapefile into R

Usage

nation(resolution = "5m", year = NULL, ...)

Arguments

resolution

The resolution of the cartographic boundary file. Defaults to '5m'; options include '5m' (1:5 million) and '20m' (1:20 million).

year

the data year (defaults to 2019).

...

arguments to be passed to the underlying 'load_tiger' function, which is not exported. Options include class, which can be set to "sf" (the default) or "sp" to request sf or sp class objects, and refresh, which specifies whether or not to re-download shapefiles (defaults to FALSE).

See Also

Other national cartographic boundary functions: divisions(), regions()

Examples

## Not run: 
library(tigris)
library(leaflet)

boundary <- nation(resolution = '20m')

leaflet(boundary) %>%
   addTiles() %>%
   addPolygons()

## End(Not run)

tigris

Load Census TIGER/Line Shapefiles

v1.0
MIT + file LICENSE
Authors
Kyle Walker [aut, cre], Bob Rudis [ctb]
Initial release
2020-07-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.