7.1 Geographic data: Vector boundaries & Area metadata

  • Vector boundaries (polygons)
    • Data frame with one row for each ‘corner’ of a geographical region
      • lat and long: location of a point
      • group: a unique identifier for each contiguous region
      • id: the name of the region
      • Separate group and id are necessary because geo-graphical unit isn’t necessarily a polygon (e.g., islands of Hawaii)
    • Shape files contain vector boundary data (read them with e.g., readOGR())
    • geom_polygon(): Visualize the data (coordquickmap() for quick adjustment of aspect ratio)
  • Area metadata
    • Sometimes metadata is associated with an area (rather than a point), e.g., census data on the county level
    • We’ll see an example further below