From Data to Insights¶
Theory¶
Suggested Conceptual Reading & Discussion¶
Code: Live Demo & Hands-on Lab¶
Student Group Live Demo (Group 3)¶
- Topic: Data Acquisition & Column Inspection (reading ANES data,
.shape,.info(),.describe(), column subsetting). - Review the Live Demo Guidelines & Schedule.
The Data Science Pipeline¶
Application¶
Tip
To run Python scripts in VS Code, follow 📘 Running Python Scripts in VS Code.
Working with Data¶
- Let's open and run
04_data_exploration_columns.pyin VS Code: - Practice reading data files with pandas, inspecting dataset structure (
.shape,.info(),.columns), calculating summary statistics (.describe()), and selecting columns.
Get Ready for Next Session: Think. Explore. Practice.¶
Think¶
- What are the empirical distributions of your key variables? Think about what a histogram or bar chart of your DV and IV should look like, and watch out for non-substantive response categories (e.g., "Don't know" or refused).
- How will you filter your survey sample to ensure your empirical analysis focuses on the relevant target population?
- Suggested Reading: Barber, M., & Pope, J. C. (2019). Does Party Trump Ideology? Disentangling Party and Ideology in America. American Political Science Review, 113(1), 38–54. - An outstanding example of using survey data and clean graphical displays to disentangle competing political identities.
Explore¶
- Live Demo (Group 4): Filtering Survey Rows & Univariate Charts (boolean masks,
.value_counts(), distributions with Altair). Group 4 prepares a 10–15 min demonstration and shares the handout on WhatsApp before class (groups can book a meeting with the instructor to get direction). - The class should review the course materials (
05_data_exploration_rows.py) and the Altair Simple Charts Documentation to follow along and lead the peer discussion.
Practice¶
- In your group project folder, create an exploratory Python script (
exploration.py) to inspect your DV and IV using04_data_exploration_columns.py. - Looking Ahead: Milestone 3 - Exploration will be due in Session 6 (Nov 20 at 23:59).