usmap (version 0.4.0)

us_map: Retrieve US map data

Description

Retrieve US map data

Usage

us_map(regions = c("states", "state", "counties", "county"),
  include = c())

Arguments

regions

The region breakdown for the map, can be one of ("states", "state", "counties", "county"). The default is "states".

include

The regions to include in the output data frame. If regions is "states"/"state", the value can be either a state name, abbreviation or FIPS code. For counties, the FIPS must be provided as there can be multiple counties with the same name. If states are provided in the county map, only counties in the included states will be returned.

Value

A data frame of US map coordinates divided by the desired regions.

Examples

Run this code
# NOT RUN {
str(us_map())

df <- us_map(regions = "counties")
west_coast <- us_map(include = c("CA", "OR", "WA"))
# }

Run the code above in your browser using DataLab