From Insights to Visualization¶
Theory¶
Suggested Conceptual Reading & Discussion¶
Code: Live Demo & Hands-on Lab¶
Student Group Live Demo (Group 4)¶
- Topic: Filtering Survey Rows & Univariate Charts (boolean masks,
.value_counts(), distributions with Altair). - Review the Live Demo Guidelines & Schedule.
The Data Science Pipeline¶
Extracting Insights from Observations¶
Tip
To run Python scripts in VS Code, follow 📘 Running Python Scripts in VS Code.
- Download and open the interactive Python visualization scripts directly in VS Code:
- Open
05_data_exploration_rows.pyand10_visualization_insights.pyfrom the Course Materials
- Open
- Practice creating charts with Altair: defining encodings (
x,y,color), adding tooltips, and saving/exporting chart figures.
Application¶
Start your Research Project Script¶
- In VS Code, create an exploratory Python script (such as
exploration.pyoranalysis.py) to serve as the foundation for your research project's empirical analysis. - Begin developing and organizing clean, reproducible code using pandas and Altair that will generate the figures and tables for your paper.
Get Ready for Next Session: Think. Explore. Practice.¶
Think¶
- How do your DV and IV relate to each other when examined together? Think about whether your relationship is continuous-by-continuous (scatter plot), categorical-by-continuous (box/bar plot), or categorical-by-categorical (grouped frequency chart).
- What substantive story do your preliminary bivariate figures tell, and does it align with your original hypothesis?
- Suggested Reading: Panish, A. R. (2025). Informed or Overwhelmed? Disentangling the Effects of Cognitive Ability and Information on Public Opinion. British Journal of Political Science, 55, 1-24. - Highlights modern data visualization standards in political science for presenting survey interaction effects and group differences clearly.
Explore¶
- Exploratory Visualizations with Altair: Review bivariate charting techniques in Altair (scatter plots, grouped bars, color/size encodings) and explore the Altair Bivariate Visualizations Gallery to prepare for Milestone 3.
Practice¶
- Export your two Altair figures as images and integrate them with accompanying text into your Typst manuscript.
- Complete Milestone 3 - Exploration (Due Friday, Nov 20 at 23:59 via email).