Live TidyTuesday Data Viz Workflow | Nicola Rennie | Data Science Lab
The Data Science Lab is a live weekly call. Register at pos.it/dslab! Discord invites go out each week on lives calls. We'd love to have you!
The Lab is an open, messy space for learning and asking questions. Think of it like pair coding with a friend or two. Learn something new, and share what you know to help others grow.
On this call, Libby Heeren is joined by Nicola Rennie, who walks through her process for making a TidyTuesday data visualization in R: live coding a chart from scratch and sharing the workflow tricks she's built up over five years of doing TidyTuesday!
Nicola takes this week's TidyTuesday "twin cities" dataset and builds a colorful sunburst (radial) chart from scratch, showing how she decides what to plot, wrangles the data with dplyr, and makes it pretty using showtext fonts, rcartocolor palettes, colored-text legends, and the ggview package for previewing plots at *exactly* the size they'll save at. Along the way she shares the templates and helper packages she's made to save time every week (can you tell she's a pro?!). Since TidyTuesday data is public, you can grab the same dataset and follow along, too!
Hosting crew from Posit: Libby Heeren, Isabella Velasquez
Socials and websites:
Nicola Rennie's blog: https://nrennie.rbind.io/
Nicola Rennie's GitHub: https://github.com/nrennie
Nicola Rennie's Bluesky: https://bsky.app/profile/nrennie.bsky.social
Nicola Rennie's LinkedIn: https://www.linkedin.com/in/nicola-rennie/
Nicola Rennie's Mastodon: https://fosstodon.org/deck/@nrennie
Resources mentioned in the video and chat:
🔗 Nicola's code from this session: https://nrennie.rbind.io/talks/posit-ds-lab/
🔗 TidyTuesday on GitHub: https://github.com/rfordatascience/tidytuesday
🔗 Nicola's templates package: https://github.com/nrennie/templates
🔗 showtext package (fonts in R): https://github.com/yixuan/showtext
🔗 ggview package (preview plots at save size): https://github.com/idmn/ggview
🔗 rcartocolor package (accessible color palettes): https://nowosad.r-universe.dev/rcartocolor
🔗 ggtext package (styled/colored text): https://wilkelab.org/ggtext/
🔗 ggiraph package (interactive ggplots): https://davidgohel.github.io/ggiraph/
🔗 marquee package (markdown text in R graphics): https://marquee.r-lib.org/
🔗 Nicola's book, The Art of Data Visualization with ggplot2: https://nrennie.rbind.io/art-of-viz/
🔗 Bootstrap Icons: https://icons.getbootstrap.com/
🔗 okpalette (extract a palette from a photo): https://okpalette.color.pizza/
â–º Subscribe to Our Channel Here: https://bit.ly/2TzgcOu
Follow Us Here:
Website: https://www.posit.co
Hangout: https://pos.it/dsh
The Lab: https://pos.it/dslab
LinkedIn: https://www.linkedin.com/company/posit-software
Bluesky: https://bsky.app/profile/posit.co
Thanks for hanging out with us! 💛
Timestamps
00:00 Introduction
01:18 Reviewing the TidyTuesday twin cities dataset
03:41 Demoing TidyTuesday template files and R package setup
07:25 "Do showtext and systemfonts do different things?"
09:04 Loading and prepping the links and cities datasets
11:45 Exploring and filtering the dataset to a chosen city
17:25 Demoing a Shiny app to copy previous TidyTuesday chart code
23:56 Demoing sunburst chart creation with coord_radial
25:47 "Can you say why you used mutate rather than summarize?"
31:09 Adding custom colors with the rcartocolor package
33:57 Demoing colored subtitle text with the ggtext package
40:38 Attempting to make the chart interactive with the ggiraph package
43:32 Adding automated social and source captions
46:26 "So you can save a plot with the canvas call and it doesn't mess up the ggplot object?"
49:55 "If people would like to keep up with you and see your posts, what's the best way to do that?"
The Lab is an open, messy space for learning and asking questions. Think of it like pair coding with a friend or two. Learn something new, and share what you know to help others grow.
On this call, Libby Heeren is joined by Nicola Rennie, who walks through her process for making a TidyTuesday data visualization in R: live coding a chart from scratch and sharing the workflow tricks she's built up over five years of doing TidyTuesday!
Nicola takes this week's TidyTuesday "twin cities" dataset and builds a colorful sunburst (radial) chart from scratch, showing how she decides what to plot, wrangles the data with dplyr, and makes it pretty using showtext fonts, rcartocolor palettes, colored-text legends, and the ggview package for previewing plots at *exactly* the size they'll save at. Along the way she shares the templates and helper packages she's made to save time every week (can you tell she's a pro?!). Since TidyTuesday data is public, you can grab the same dataset and follow along, too!
Hosting crew from Posit: Libby Heeren, Isabella Velasquez
Socials and websites:
Nicola Rennie's blog: https://nrennie.rbind.io/
Nicola Rennie's GitHub: https://github.com/nrennie
Nicola Rennie's Bluesky: https://bsky.app/profile/nrennie.bsky.social
Nicola Rennie's LinkedIn: https://www.linkedin.com/in/nicola-rennie/
Nicola Rennie's Mastodon: https://fosstodon.org/deck/@nrennie
Resources mentioned in the video and chat:
🔗 Nicola's code from this session: https://nrennie.rbind.io/talks/posit-ds-lab/
🔗 TidyTuesday on GitHub: https://github.com/rfordatascience/tidytuesday
🔗 Nicola's templates package: https://github.com/nrennie/templates
🔗 showtext package (fonts in R): https://github.com/yixuan/showtext
🔗 ggview package (preview plots at save size): https://github.com/idmn/ggview
🔗 rcartocolor package (accessible color palettes): https://nowosad.r-universe.dev/rcartocolor
🔗 ggtext package (styled/colored text): https://wilkelab.org/ggtext/
🔗 ggiraph package (interactive ggplots): https://davidgohel.github.io/ggiraph/
🔗 marquee package (markdown text in R graphics): https://marquee.r-lib.org/
🔗 Nicola's book, The Art of Data Visualization with ggplot2: https://nrennie.rbind.io/art-of-viz/
🔗 Bootstrap Icons: https://icons.getbootstrap.com/
🔗 okpalette (extract a palette from a photo): https://okpalette.color.pizza/
â–º Subscribe to Our Channel Here: https://bit.ly/2TzgcOu
Follow Us Here:
Website: https://www.posit.co
Hangout: https://pos.it/dsh
The Lab: https://pos.it/dslab
LinkedIn: https://www.linkedin.com/company/posit-software
Bluesky: https://bsky.app/profile/posit.co
Thanks for hanging out with us! 💛
Timestamps
00:00 Introduction
01:18 Reviewing the TidyTuesday twin cities dataset
03:41 Demoing TidyTuesday template files and R package setup
07:25 "Do showtext and systemfonts do different things?"
09:04 Loading and prepping the links and cities datasets
11:45 Exploring and filtering the dataset to a chosen city
17:25 Demoing a Shiny app to copy previous TidyTuesday chart code
23:56 Demoing sunburst chart creation with coord_radial
25:47 "Can you say why you used mutate rather than summarize?"
31:09 Adding custom colors with the rcartocolor package
33:57 Demoing colored subtitle text with the ggtext package
40:38 Attempting to make the chart interactive with the ggiraph package
43:32 Adding automated social and source captions
46:26 "So you can save a plot with the canvas call and it doesn't mess up the ggplot object?"
49:55 "If people would like to keep up with you and see your posts, what's the best way to do that?"