# install.packages('pacman')
library(pacman)
p_load('broom',
'CGPfunctions', 'cowplot', 'datasauRus', 'datasets',
'dplyr', 'eurostat', 'ExPanDaR', 'explore', 'extrafont',
'gapminder', 'GGally', 'gganimate', 'ggcorrplot',
'ggmap', 'ggnewscale', 'ggplot2', 'ggpmisc', 'ggrepel',
'ggtext', 'ggthemes', 'gifski', 'giscoR', 'gridExtra',
'gt', 'gtrendsR', 'gtsummary', 'HistData', 'htmlwidgets',
'kableExtra', 'knitr', 'lemon', 'lubridate',
'marginaleffects', 'modelsummary', 'patchwork',
'plotly', 'png', 'printr', 'quarto', 'randomNames',
'readr', 'reshape2', 'rmarkdown', 'rnaturalearth',
'rnaturalearthdata', 'sf', 'shiny', 'sparkline',
'stargazer', 'synthpop', 'tidyverse', 'tmap', 'WDI')
About
Chapter last updated: 09 December 2025
This website serves as slides and script for workshops/seminars on data visualization taught by Paul C. Bauer .1 Original material is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license. Where I draw on other authors material (I do so extensively) other licenses may apply. Please note the references in the syllabus as well as the citations and links in the script. If you have feedback or discover errors/dead links please let me know (mail@paulcbauer.de). And make sure to install all the necessary packages before you use the script.
- Current version can be found at https://paulcbauer.github.io/applied-data-visualization.
- Interested in a data visualization workshop at your institution/company? Please contact me at mail@paulcbauer.de.
1 Workshop versions & schedule(s)
Freiburg (MPI: Max Planck Institute): 2 days/12h
Hours: 9:00 - 12:00, 13:00 - 16:00
- Focus on principles (2/3) rather than techniques (1/3)
- Challenge: What to teach in the age of AI
- Day 1
- 9:00 - 10:00: About
- 10:00 - 11:00: Introduction
- 11:00 - 12:00: Quality of graphs
- 12:00 - 13:00 – Lunch break –
- 13:00 - 16:00: Grammar of graphics & Ggplot I
(Exercises: Done 2.2, 2.3, 4.2, 6.2, 6.5, 6.7, 8.1, 9.2 Skipped 5.2., 5.6, 5.7,7.4
- Day 2
- 9:00 - 10:00: Discussion of participant graphs
- 10:00 - 12:00: Visualizing descriptive statistics 1-5
- 12:00 - 13:00 – Lunch break –
- 13:00 - 14:30: Visualizing statistical models 1-4 (skip 4.3)
- 14:30 - 16:00: Visualizing geographic data 1-6
Freiburg (University): 1.5h * 14 weeks = 21h
- Covers almost all of the content in the script. Different foki are set depending on participants demands.
Gesis: 4 days/18h
Hours: 10:00 - 12:00 and 13:00 - 15:30
- Covers almost all of the content in the script. Different foki are set depending on participants demands.
Giessen: 2 days/10h
Hours: 10:00 - 16:00 (1 h lunch break + shorter breaks)
- 2 Introduction
- 3 Quality of Graphs
- 4 Grammar of graphics & Ggplot
- 5 Visualizing descriptive statistics (1-4)
- 6 Visualizing statistical models (1-4)
Giessen: 2 days/10h
Hours: 10:00 - 16:00 (1 h lunch break + shorter breaks)
- 2 Introduction
- 3 Quality of Graphs
- 4 Grammar of graphics & Ggplot
- 5 Visualizing descriptive statistics (1-4)
- 6 Visualizing statistical models (1-4)
Wuppertal: 1 day/7h
Hours: 9:00 - 12:00 and 13:00 - 17:00 (1 h lunch break + shorter breaks)
- 2 Introduction
- 3 Quality of Graphs (Skip 4, 5)
- 4 Grammar of graphics
- 5 Visualizing descriptive statistics (1-4)
- 6 Visualizing statistical models (1-4)
- 9 Interactive data visualization (intro, theory, plotly)
Bremen: 1 day/7h
Hours: 9:00 - 12:00 and 13:00 - 17:00 (1 hour lunch break, shorter breaks inbetween)
2 Introduction (skip 6/8)
3 Quality of Graphs (skip 5)
13 Academic posters
4 Grammar of graphics
5 Visualizing descriptive statistics (1-4)
[6 Visualizing statistical models (1-4)]
[12 Visualizing text data]
[9 Interactive data visualization (maybe Shiny/Plotly)]
I hope you are fine with the schedule?
- Whenever you need a break let me know!
2 Instructor: Dr. Paul C. Bauer
Current: Senior Researcher & Team Lead Digital Society Observatory at Gesis CSS department, External fellow at MZES
Previously:
- BA/MA (Konstanz, Bordeaux, Barcelona) → PhD (University of Bern) → Max Weber Fellow (European University Institute) → MZES Research fellow (MZES, Mannheim) → Postdoc/lecturer (SODA, Department of Statistics, LMU & Freiburg, Department of Politics)
Research (see Google Scholar): Substantive.. political sociology2 + Methods/data3
Workshops (mostly Gesis): Applied Data Visualization, Interactive Data Analysis with Shiny, Applied Machine Learning (with R)
Contact:
mail@paulcbauer.de; www.paulcbauer.de; Github; LinkedIn
3 Your turn
- Let’s check our the survey results…
- Name?
- [Country? (Affiliation?)]
- Discipline
- Current research question(s): 2 sentences
4 Script & material
- Literature: See syllabus.
- Website/script: https://bookdown.org/paul/applied-data-visualization/
- Find it: Google “applied data visualization paul”
- Document = slides + script (Zoom in/out with
STRG + mousewheel) - Code: can all be found in the script
- Data: can usually be downloaded over links in the script. If not we’ll share the files.
- Full screen: F11
- Navigation: TOCs on left and right
- Search document (upper left)
- Document generated with quarto
- Possible: Right-click on graphs and open in new tab
- Motivation: Have a go-to script for participants (and ourselves!)
- Content: Mixture of theory, lab sessions, exercises and pure code examples for discussion
5 Online vs. offline (skip!)
- Negative
- Screen fatigue
- I can’t run around to check your code
- Less engaging, less social
- Voice
- Screen sharing…
- Less screen space than classroom
- Positive
- We see the graphs where they are mostly consumed ;-) (on a screen)
- Remember: “How is your graph consumed (smartphone)?”
- Participation from everywhere
- We see the graphs where they are mostly consumed ;-) (on a screen)
- Rule: Please keep your camera online!
- Distracting animals/children/partners are a welcome distraction!
- Yawning, leaving, looking bored etc. allowed!
- Use a virtual background if you like!
6 Strategy & Goals/Learning outcomes
- Hopefully you don’t expect too much (managing expectations!)
- Data visualization has become a profession
- e.g., New York Times Graphics Department, Mike Bostock (formerly NYT), Gregor Aisch, etc.
- Some of these graphics involve advanced programming skills that we don’t have/learn (JavaScript etc.)
- Learn some fundamental principles of (data) visualization
- Spotting bad and good graphs
- Tufte’s principles/concepts
- Grammar of graphics (Cleveland, Wickham) & Ggplot
- Learn how to visualize in R
- Making better graphs (for your publications/reports)
- Learn different useful graphs for exploration & presentation
- Explore simple descriptive graphs and more complicated graphs of statistical models (e.g., coefficient plots)
- Make first steps in interactive visualization (exploration!)
7 Software we will use
- Open-source software!
- Q: What speaks for open-source software?
- R (only viable competitor is Python)4
- Script/exercise were built using R version 4.5.1 (2025-06-13 ucrt).
- You can switch R versions in Rstudio.
- Install the necessary packages using the code below.
- Ggplot25
- Plotly6
- Shiny: See other workshop
- Note: Ideally cite the software you use in your research especially when it is open-source (see
citation("ggplot2"))
8 Structure (1)
- How to structure a dataviz workshop/seminar?!
- Hard classify graphs/data visualizations
- Description vs. explanation
- Exploration vs. presentation
- From data to viz
- Decision tree: Choose according to data type
- Choose according to category, e.g., distribution vs. correlation vs. ranking etc.
- BUT: who can read which graphs? (later!)
- Awareness of different approaches → creativity/ideas
- …the more graphs you have seen the better!
- …go through different great examples.
9 Structure (2)
- Distinctions are only so helpful… same graph can be used for exploration, description, explanation etc.
- Rationale: What do we need in every-day work?
- Grasp quality of graphs
- Understand underlying logic: Research question → Data → Graph
- Use graphs to describe data (simple summaries) and to visualize results of statistical models (t-tests, regressions etc.)
- What is your story?
- Structure of this workshop: See syllabus and TOC
10 Helpful resources
- https://www.r-graph-gallery.com/
- Classification: Distribution; Correlation; Ranking; Part of whole; Evolution; Map; Flow
- https://www.data-to-viz.com/
- Presenting the choice of graph as a decision tree
- A collection of dataviz caveats (what to avoid!)
- https://shiny.rstudio.com/gallery/
- Gallery of shiny apps (most visualize data)
- A Compendium of Clean Graphs in R (base R)
- Michael Friendly’s website
- flowingdata.com
- R cheat sheets
- 1 dataset 100 visualizations
- Competitions (a few for inspiration…)
- Bad-vis-browser
Footnotes
The first iteration of the workshop was taught in May 2020.↩︎
Trust, polarization, social media, fake sources/news↩︎
Causal inference, experiments, text data, data visualization, machine learning, big data↩︎
Creators: Core contributors and thousands of package authors.↩︎
Creators: https://github.com/tidyverse/ggplot2↩︎
Creators: https://github.com/plotly/plotly.js; https://github.com/ropensci/plotly↩︎