datacarpentry / r-raster-vector-geospatial

Introduction to Geospatial Raster and Vector Data with R
https://datacarpentry.org/r-raster-vector-geospatial
Other
112 stars 108 forks source link

Superfluous Add Plot Legend info in Explore and Plot by Shapefile Attributes #262

Open jebyrnes opened 5 years ago

jebyrnes commented 5 years ago

In the Explore and Plot by Shapefile Attributes lesson, under Add Plot Legend, there is a good bit if info discussed that is never demoed. I refer to the following:

We can add a legend to our plot too. When we add a legend, we use the following elements to specify labels and colors:

bottomright: We specify the location of our legend by using a default keyword. We could also use top, topright, etc. levels(objectName$attributeName): Label the legend elements using the categories of levels in an attribute (e.g., levels(lines_HARV$TYPE) means use the levels boardwalk, footpath, etc). fill =: apply unique colors to the boxes in our legend. palette() is the default set of colors that R applies to all plots. Let’s add a legend to our plot. We will use the road_colors object that we created above to color the legend. We can customize the appearance of our legend by manually setting different parameters.

This can likely be cut, or more examples need to be added.

mstrimas commented 4 years ago

Agreed, I found this quite confusing, none of the text lines up with the code, I second removing it. In fact, I'd just removed the whole section, there's nothing particularly interesting from a geospatial perspective here and there's already too much material to cover...