CommencerCommencer gratuitement

TIGER/Line and cartographic boundary files

In addition to its TIGER/Line shapefiles, the US Census Bureau releases cartographic boundary shapefiles for enumeration units. TIGER/Line shapefiles correspond to legal boundaries of units, which can include water area and in turn, may not be preferable for thematic mapping. The Census Bureau's cartographic boundary shapefiles are clipped to the US shoreline and are generalized, which can make them superior for mapping projects. In this exercise, you'll compare the TIGER/Line and cartographic boundary representations of the US state of Michigan.

Cet exercice fait partie du cours

Analyzing US Census Data in R

Afficher le cours

Instructions

  • Get a dataset of county boundaries for Michigan using default arguments.
  • Get an equivalent counties dataset for Michigan, but set cb = TRUE to request the cartographic boundary shapefile.
  • Plot both datasets, using add = TRUE for the second plotting call to create an overlay on the plot.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Get a counties dataset for Michigan
mi_tiger <- ___("MI")

# Get the equivalent cartographic boundary shapefile
mi_cb <- ___("MI", ___ = TRUE)

# Overlay the two on a plot to make a comparison
___(mi_tiger)
___(mi_cb, ___ = TRUE, border = "red")
Modifier et exécuter le code