Skip to main content

R: Mapping and Geospatial

Geospatial applications using the R programming language

R Packages and Functions

Tidycensus

library(tigris)
co <- counties(cb = TRUE)

Below example uses the get_acs() function in tidycensus. Gathers county geographies from NC, with Census variable B01003_001 as an attribute. Kyle Walker's basic usage page explains the geographies available and how to use the function load_variables() to search a list of available indicators.

nc_pop <- 
  get_acs(geography = "county",
          variables = "B01003_001",
          state = "NC",
          geometry = TRUE)
library(devtools)
devtools::install_github(“UrbanInstitute/urbnmapr”)
library(urbnmapr)