* National enumeration units datasets for select geographies (counties, Census tracts, block groups) can be acquired when `cb = TRUE` by leaving the `state` argument blank Sync(mapview(tarrant90), mapview(tarrant20)) * As an extension, use the leafsync package to interactively compare two or more maps * The mapview package brings interactive spatial data viewing to R: # Interactive viewing of data with _mapview_ * tigris fetches Census shapefiles from 1990 up through 2020 * Whereas legal entities change shape very rarely (but they do change!), statistical entities change with every decennial Census # Understanding yearly differences in TIGER/Line files * For some geographies, highly generalized (1:5 million and 1:20 million) shapefiles are available with the `resolution` argument * Use the argument `cb = TRUE` to obtain a _cartographic boundary shapefile_ pre-clipped to the US shoreline * The core TIGER/Line shapefiles include _water area_ that belongs to US states and counties * Question I've received over the years: "Why does Michigan look so weird?" * Recommended option: use `options(tigris_use_cache = TRUE)` to cache downloaded shapefiles and prevent having to re-download every time you use them * _Loads_ your data into R as a simple features object using `sf::st_read()` * _Stores_ your data in a temporary directory by default * _Downloads_ your data from the US Census Bureau website When you call a tigris function, it does the following: * _Geographic features_: other geographic datasets provided by the Census Bureau that are not used for demographic tabulation (e.g. * _Statistical entities_: units that are used to tabulate Census data but do not have legal standing (e.g. * _Legal entities_: units that have legal significance in the US (e.g. * Vector geometries: _points_, _lines_, and _polygons_ stored in a list-column of a data frame * The sf package implements a _simple features data model_ for vector spatial data in R # The _sf_ package and simple feature geometry * Defaults to 2020 unless `year` is otherwise specified (up to 2021 is available) * To use tigris, call a function that corresponds to the Census geography you want, optionally by `state` or `county`, when appropriate * No API key necessary - just install the package and start using Census shapefiles in R! * R interface to the US Census Bureau's TIGER/Line shapefile FTP server * Distributed as _shapefiles_, a common GIS data format comprised of several related files * High-quality series of geographic datasets released by the US Census Bureau * TIGER: Topologically Integrated Geographic Encoding and Referencing database # Part 1: Census geographic data and "GIS" in R * Or use the pre-built RStudio Cloud environment at * Other required packages will be picked up as dependencies of these packages Install.packages(c("tidycensus", "tidyverse", "terra", * Packages required for today's workshop: * Hour 3: Interactive mapping and advanced geometry handling * Hour 2: Making maps with 2020 US Census data * Hour 1: Census geographic data and "GIS" in R * Friday, March 25: a first look at the 2016-2020 American Community Survey data with R and _tidycensus_ * Last week: an introduction to 2020 US Census data To be published in print with CRC Press in fall 2022 * R package developer: _tidycensus_, _tigris_, _mapboxapi_ * Spatial data science researcher and consultant * Associate Professor of Geography at TCU Class: center, middle, inverse, title-slide
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |