Analyzing US Census Data in R
Kyle Walker
Instructor
cb = TRUE
ri_tiger <- counties("RI") ri_cb <- counties("RI", cb = TRUE)
par(mfrow = c(1, 2)) plot(ri_tiger, main = "TIGER/Line") plot(ri_cb, main = "Cartographic boundary")
options(tigris_class = "sf")
az_sf <- counties("AZ", cb = TRUE)
class(az_sf)
"sf" "data.frame"
st_geometry(az_sf)
Geometry set for 15 features
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: -114.8165 ymin: 31.33218 xmax: -109.0452 ymax: 37.00426
epsg (SRID): 4269
proj4string: +proj=longlat +datum=NAD83 +no_defs
options(tigris_use_cache = TRUE)
tigris_cache_dir()
functiontigris
by using the year
parameterwilliamson90 <- tracts(state = "TX", county = "Williamson",
cb = TRUE, year = 1990)
williamson16 <- tracts(state = "TX", county = "Williamson",
cb = TRUE, year = 2016)
par(mfrow = c(1, 2))
plot(williamson90$geometry)
plot(williamson16$geometry)
Analyzing US Census Data in R