Data Visualization with R
  • Syllabus
  • Schedule
  • Content
  • Lessons
  • Examples
  • Assignments
  • Resources
  • News

Reminder! The final deadline for all assignments other than the final project is Tuesday, July 29 at 11:59 PM

Categories
All (30)
advice (8)
course details (4)
FAQs (14)
feedback (1)
getting started (4)

News

Subscribe!

You can use a feed reader like Feedly or use an RSS-to-email service like Blogtrottr to subscribe to these updates and messages. I’ll also e-mail out links to them when there are new updates.

RSS

Date Title Categories
July 29, 2025 at 4:58 PM What's next?
  • Policy analytics concentration and certificate
  • Program Evaluation
  • Comparative Public Administration
advice
July 29, 2025 at 4:57 PM Class website future
course details
July 29, 2025 at 4:54 PM Sessions 13 and 14 tips and FAQs
  • Why doesn’t gapminder data appear in the environment panel? Is there a way to see which packages have which data?
  • Some of the words in my word frequency/tf-idf plot were out of order—how can I fix that?
  • Cleaning up text is always specific and specialized
  • I tried filtering out words like i'm and they didn’t filter—why not?
  • I tried filtering out blank words with drop_na() and it didn’t work—why not?
  • Sometimes the colors in the viridis palettes are too dark, neon, pale, or light—can I adjust those?
FAQs
July 22, 2025 at 4:05 PM Session 12 tips and FAQs
  • Why can’t I see the geometry column? It should be there?
  • Can we make interactive maps with R?
  • Why do we use an empty ggplot() call for these functions?
  • What’s the difference between a tibble and a tribble?
  • How many decimal points should I use when I’m working with latitude and longitude?
  • Can I use geom_label_repel() with maps?
  • Can I use a heatmap on a map?
  • I tried to make a map and countries are missing—why?
  • I tried to make a map of just Europe and it includes more than just Europe?
  • Saving data that takes a long time to make
FAQs
July 22, 2025 at 12:17 PM Session 11 tips and FAQs
  • Do people use Plotly and Quarto dashboards in the real world?
  • My plot didn’t translate perfectly to ggplotly—why?
  • I tried to render a dashboard but it appeared as a regular HTML file—why?
  • When should we use a dashboard vs. a full Shiny app?
  • I rendered my file / dashboard but it didn’t appear in the Viewer panel—why not?
  • Do people use viridis palettes in real life?
  • I’m bored with ggplot’s default colors and/or viridis—how can I use other color palettes?
FAQs
July 15, 2025 at 4:09 PM Curiosity and bare minimuming
FAQs
July 15, 2025 at 2:48 PM Two layout-related tips for fancier plots and documents
  • Extra space in {patchwork}
  • Use the margins
advice
July 15, 2025 at 11:21 AM Session 10 tips and FAQs
  • How do I include a separate image in my document?
  • When should we add annotations and text in R vs. in a separate program?
  • I have numbers like 20000 and want them formatted with commas like 20,000. Can I do that automatically?
  • How can I get month and weekday names or abbreviations for dates?
  • Can I get these automatic month and day names in non-English languages?
FAQs
July 15, 2025 at 9:44 AM Session 9 tips and FAQs
  • What’s the difference between geom_text() and annotate(geom = "text")?
  • How do I know which aesthetics geoms need to use?
  • It’s annoying to have to specify annotation positions using the values of the x/y axis scales. Is there a way to say instead?
  • What’s the difference between geom_text() and geom_label()?
  • What does update_geom_defaults() do?
  • How do annotations work with facets?
  • The importance of layer order
  • I tried pivoting my data like you did to make my own change-in-ranking data but got a bunch of empty rows—why?
  • Seeds—why?
FAQs
July 9, 2025 at 12:17 PM No more answer keys
course details
July 9, 2025 at 11:08 AM Mini project 1 feedback
  • Warnings and messages
  • ALL CAPS
  • Figure in the document doesn’t match the standalone image
  • Sorting and ordering
  • Unbalanced facets
  • Overlapping text
  • Commas
FAQs feedback
July 8, 2025 at 10:16 PM Sessions 7 and 8 tips and FAQs
  • Is there some place I can find R packages? There are so many!
  • When is it better to use augment() vs. marginaleffects::predictions()?
  • I’ve used summary() in the past to look at model objects, but you recommend using tidy(). Why?
  • I tried to render my document and got an error about duplicate chunk labels. Why?
  • I tried calculating something with sum() or cor() and R gave me NA instead of a number. Why?
  • I want my bars to be sorted in my plot. How can I control their order?
  • My data has full US state names but I want to use abbreviations (or regions). Is there a way to automatically convert from names to something else?
  • I saved a plot with ggsave() and it has a black background—why?
FAQs
July 2, 2025 at 12:16 PM Tips for fixing broken code
  • Slow down, simplify, and do small things
  • Reformat the code
  • Run the code incrementally
advice
July 2, 2025 at 11:12 AM A few quick general R tips
  • Talking about packages and functions
  • Nicer {ggplot2} documentation
  • The tidyverse package shortcut
  • Chunk labels
  • Code style
FAQs
July 1, 2025 at 11:10 PM Time to think about mini project 1!
course details
July 1, 2025 at 2:46 PM Make RStudio your own
  • Change the theme
  • Don’t save the workspace when closing
  • Turn on rainbow parentheses
  • Turn on color previews
  • Turn on a code margin
  • Change the panel layout and add more columns
  • Bonus: Positron!
advice
July 1, 2025 at 1:32 PM Sessions 5 and 6 tips and FAQs
  • What do Quarto documents look like in real life? Can they be used for real things like reports?
  • Why should I use ggsave() instead of just rendering a Quarto document?
  • I made a bunch of changes to my plot with theme() but when I used ggsave(), none of them actually saved. Why?
  • Does the order of theme things matter? I made changes with theme() and then wiped them out with theme_minimal()?
  • If I want to use the same theme for all the plots in my document, do I need to reuse all that code all the time?
  • Why would we want to use rel(1.4) instead of actual numbers when sizing things?
  • I’m using macOS and couldn’t render as PDF when using a custom font—how do I fix that?
  • In chapter 22, Wilke talks about tables—is there a way to make pretty tables with R?
  • Double encoding and excessive legends
  • Legends are cool, but I’ve read that directly labeling things can be better. Is there a way to label things without a legend?
  • My histogram bars are too wide / too narrow / not visible. How do I fix that?
FAQs
June 25, 2025 at 11:09 PM Session 4 FAQs
  • I can’t remember everything I need to type / I can’t memorize all the code / I had to look stuff up on the internet / Why didn’t you cover this specific thing?
  • It seems weird that we can randomly jitter points to accurately reveal relationships?
  • Why does my heatmap have blank spaces in it?
  • I want my lollipop/bar chart to go sideways—how do I do that?
  • Why does R keep yelling at me with warnings and messages?
  • Why do I keep getting messages like summarise() has grouped output by 'BLAH' when using group_by() and summarize()?
  • How can I hide warnings and messages?
  • Why did we need to group a second time when calculating the proportions for the heatmap?
  • How can I add a line break to the text in my plot?
  • How can I control the dimensions of my figures?
FAQs
June 25, 2025 at 11:00 PM Session 3 FAQs
  • What’s the difference between the |> and %>% pipes?
  • Why do we sometimes combine code with + and sometimes with |>?
  • Why doesn’t group_by(species) work but group_by(Species) does?
  • Why does aes() sometimes appear in ggplot() and sometimes in geom_WHATEVER()?
  • Installing vs. using packages
  • Why are my axis labels all crowded and on top of each other? How do I fix that?
  • Why isn’t the example code using data = whatever and mapping = aes() in ggplot() anymore? Do we not have to use argument names?
  • What’s the difference between geom_bar() and geom_col()?
  • What’s the difference between read_csv() vs. read.csv()?
  • What’s the difference between facet_grid() and facet_wrap()?
  • Why do I sometimes see facet_wrap(vars(blah)) and somtimes facet_wrap(~ blah)?
  • Why did we need to group and summarize before making the Lord of the Rings plots? I didn’t and the plot still worked
FAQs
June 19, 2025 at 12:16 AM Zeroes and ✓−s in the gradebook
course details
June 18, 2025 at 8:26 PM Session 2 FAQs
  • Why do you use ✓s for grades?
  • Why does # mean both headings and code comments?
  • I will never do anything with graphic design—why did we have to learn these principles?
  • How does CRAP relate to other things like the Gestalt Principles?
  • Will following CRAP lead to the same final designs?
  • Does CRAP only work for single-page things like graphs and posters? Or does it work for reports and books?
  • I noticed Illustrator isn’t free for GSU students anymore. Are there other graphics editors?
  • Is there a way to check that my color palettes are accessible if I’m not using a premade one?
  • Where can I find fonts to use?
FAQs
June 18, 2025 at 6:22 PM Copy, paste, and tweak
advice
June 18, 2025 at 2:58 PM Making cleaner, nicer Quarto documents
  • Render often
  • Check for broken code chunks
  • Check that your text looks okay
  • Don’t install packages in your document
  • Clean up warnings and messages
  • Global chunk options
  • Fancy document settings
  • Chunk names
advice
June 18, 2025 at 12:46 AM Session 1 tips and FAQs
  • What’s the difference between Source and Visual mode in the editor window?
  • What’s the difference between R Markdown and Quarto?
  • Why don’t I have options to render to PDF (or Word or HTML)?
  • I pasted that starter code for exercise 1 and it still doesn’t show different formats?
  • Rendered document format for iCollege
  • Why does it matter where we put files like cars.csv?
  • How does group_by() work? Why did we have to group by class and not cty and class?
  • How do we know which type of graph to use for different types of data?
  • Do you have any tips for remembering all the different functions we’re learning? There are so many!
FAQs
June 10, 2025 at 12:35 PM How to ask for help
  • Don’t suffer in silence!
  • Use Discord in public
  • Help us help you
  • High resolution questions
  • Unanswered questions
  • Discord question etiquette
  • Calendly + Webex appointments
advice
June 9, 2025 at 3:51 PM First day of class!
getting started
June 5, 2025 at 1:36 PM Building community on Discord
  • Class community
  • Online community
advice
June 5, 2025 at 1:03 PM Announcements and updates
getting started
June 5, 2025 at 12:33 PM Important R stuff
getting started
June 4, 2025 at 9:48 PM Welcome to class!
getting started
No matching items

Content 2025 by Andrew Heiss
All content licensed under a Creative Commons Attribution-NonCommercial 4.0 International license (CC BY-NC 4.0)

 
  • Edit this page
  • Report an issue

Made with and Quarto
View the source at GitHub