What's New in R: February 20, 2024
In the latest issue of What’s New in R, see some more new resources!
Want to get this in your inbox? Sign up for What's New in R.
Stacked line chart with inline labels
One of the best parts of making data viz in R is that you can learn from others’ code. The website R Graph Gallery has a ton of great examples of charts made in R. One I came across recently is this stacked line chart of aggregated household wealth in countries around the world.
The tutorial for this chart, originally made by Gilbert Fontana, goes step b step, showing how to get your data ready, how to make a basic line chart, and then how to make it shine.
Jazz up your ggplots!
The United States Geological Survey consistently puts out excellent data viz made in R. This plot showing streamflow in April 2023 is a great example of the quality of their work (the code to make them is on GitHub).
Considering the quality of the data viz work they put out, this blog post highlighting ways you can use ggplot extension packages to improve your own data viz was always going to be a great resource.
Creating template files with R
If you regularly copy and paste code from one file to another, you may have wondered if there are ways you can automate this process. There are! In this blog post, Nicola Rennie shows how you can create a function that will automatically generate files for you. Rennie shows how she creates template files for her Tidy Tuesday data viz contributions. Each time she wants to make a new data viz, she creates a new file to load packages, import data, load fonts and colors she wants to use, etc. It’s a great read and a great idea if you find yourself creating similar files.
If you enjoyed this issue of What’s New In R, please share it with a friend! And if they want to get What’s New in R directly in their inbox, they can sign up on the R for the Rest of Us website.
Got any ideas for resources I should feature in future issues of What’s New in R? Let me know in the comments below.
Sign up for the newsletter
Get blog posts like this delivered straight to your inbox.
You need to be signed-in to comment on this post. Login.