Today I Learned in R: geom_shadowtext with David Keyes
Вставка
- Опубліковано 8 лют 2025
- Greg and Andrew learn about geom_shadowtext from David Keyes, author and founder of R for the Rest of Us. Check out his new book at book.rforthere..., then subscribe to all these great channels!
R for the Rest of Us on UA-cam: / @rfortherestofus
Greg's R Programming 101: / @rprogramming101
Andrew's Equitable Equations: / @equitableequations
David on LinkedIn: / dgkeyes
Code and data from David's demonstration: github.com/rfo...
It was fun to watch three of my favorite R-experts in one single UA-cam session.
Love all of your channels!
It was fun to have 2 simuntaneos lives over here!
good
Great video! Btw I did the exact same code for "Litchfield" and "Litchfield County" and the graph has a value missing for the 40-64 age group, year 2040 for Litchfield, with an error message "Removed 1 rows containing missing values" even though there IS a value for this in the dataset and also there is a point for where the supposed missing data is displayed as a point on the graph, however the annotation doesn't come up. Not sure why? I have tried it on New Haven and New Haven County and it worked fine population_projection_plot(
town_to_plot = "Litchfield",
county_to_plot = "Litchfield County"
) +
geom_shadowtext(
data = population_projection %>%
filter(location == "Litchfield"),
bg.color = "white",
nudge_y = 0.03,
aes(
label = pct_formatted
)
)
Can the shadowtext be pushed a distance from the line without overlapping? Having the text overlap a line makes it harder to distinguish already overlapping lines.