Session Ready
Exercise

Obtaining data for cartography with tigris

Before making your dot-density map of Washington, DC with ggplot2, it will be useful to acquire some ancillary cartographic data with the tigris package that will help map viewers understand what you've visualized. These datasets will include major roads in DC; area water features; and the boundary of the District of Columbia, which you'll use as a background in your map.

Instructions
100 XP
  • Get a roads dataset for Washington, DC with the roads() function, and filter the result for major roads in the District.
  • Use the area_water() function from tigris to get an area water features dataset.
  • Obtain the boundary of DC by using tigris's counties() function.