Learn R Programming

tigris (version 0.3)

nation: Download a US national boundary shapefile into R

Description

Download a US national boundary shapefile into R

Usage

nation(resolution = "5m")

Arguments

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

See Also

Other national cartographic boundary functions: divisions; regions

Examples

Run this code
library(tigris)
library(leaflet)

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

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

Run the code above in your browser using DataLab