Explore and Plot by Vector Layer Attributes
Last updated on 2025-12-09 | Edit this page
Overview
Questions
- How can I compute on the attributes of a spatial object?
Objectives
- Query attributes of a spatial object.
- Subset spatial objects using specific attribute values.
- Plot a vector feature, colored by unique attribute values.
Things You’ll Need To Complete This Episode
See the lesson homepage for detailed information about the software, data, and other prerequisites you will need to work through the examples in this episode.
Load the Data
We will continue using the sf, terra
dplyr and ggplot2 packages in this episode.
Make sure that you have these packages loaded. We will continue to work
with the three ESRI shapefiles (vector layers) that we
loaded in the Open
and Plot Vector Layers in R episode.