From ce21c9e023f449996507acf879b28376fce9a093 Mon Sep 17 00:00:00 2001 From: Jon Jablonski Date: Tue, 21 Jan 2025 14:42:42 -0800 Subject: [PATCH 1/2] replacing another reference to size = --- episodes/07-vector-shapefile-attributes-in-r.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/07-vector-shapefile-attributes-in-r.Rmd b/episodes/07-vector-shapefile-attributes-in-r.Rmd index 46cfaf8b..ef9099ce 100644 --- a/episodes/07-vector-shapefile-attributes-in-r.Rmd +++ b/episodes/07-vector-shapefile-attributes-in-r.Rmd @@ -210,7 +210,7 @@ there is only one feature? Let's adjust the colors used in our plot. If we have 2 features in our vector object, we can plot each using a unique color by assigning a column name to the color aesthetic (`color =`). We use the syntax `aes(color = )` to do this. We can also alter the default line thickness by -using the `size =` parameter, as the default value of 0.5 can be hard to see. +using the `linewidth =` parameter, as the default value of 0.5 can be hard to see. Note that size is placed outside of the `aes()` function, as we are not connecting line thickness to a data variable. From 79f24b38851f65c9e7f478c97b52e60c8be1c54b Mon Sep 17 00:00:00 2001 From: Jon Jablonski Date: Tue, 21 Jan 2025 14:47:32 -0800 Subject: [PATCH 2/2] replacing last references to factors to catch up with the changed default of strings.as.factors() --- episodes/07-vector-shapefile-attributes-in-r.Rmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/episodes/07-vector-shapefile-attributes-in-r.Rmd b/episodes/07-vector-shapefile-attributes-in-r.Rmd index ef9099ce..d5d76f5e 100644 --- a/episodes/07-vector-shapefile-attributes-in-r.Rmd +++ b/episodes/07-vector-shapefile-attributes-in-r.Rmd @@ -300,7 +300,7 @@ In the examples above, `ggplot()` automatically selected colors for each line based on a default color order. If we don't like those default colors, we can create a vector of colors - one for each feature. -First we will check how many unique levels our factor has: +First we will check how many unique values our TYPE attribute has: ```{r palette-and-plot} unique(lines_HARV$TYPE) @@ -328,7 +328,7 @@ ggplot() + ### Adjust Line Width We adjusted line width universally earlier. If we want a unique line width for -each level or attribute category in our spatial object, we can use the +each attribute category in our spatial object, we can use the same syntax that we used for colors, above. We already know that we have four different `TYPE`s in the lines\_HARV object, @@ -372,7 +372,7 @@ following thicknesses: ## Answers -First we need to look at the levels of our factor to see +First we need to look at the values of our data to see what order the road types are in: ```{r}