Skip to content

Introduction

Getting to know each other

Welcome to Data Analysis in Political Science! We'll start our first session by getting to know one another.

Tell us:

  • Who you are: Your name, the topics in politics and society that fascinate you, and what you would like to do after your Bachelor's or Master's.
  • Your background: Your prior experience (if any) with data, statistics, or programming. (No prior coding experience is required!)
  • Your expectations: What you hope or expect to get from this class.

The Syllabus

We will walk through the core structure, expectations, and roadmap of the course:

  • Structure: 12 bi-weekly class meetings across two semesters (Fridays 08:00–11:15 in Classroom A.116).
  • Evaluation Breakdown:
    • 50% Milestones: 5 cumulative milestones (10% each) building your empirical research step-by-step.
    • 30% Participation: Student Group Live Demos (2 per group), peer discussion ("I like, I wish, I wonder"), and class engagement.
    • 20% Research Paper: An original, fully reproducible empirical paper (~4,000–5,000 words in Typst).
  • Review the full course policies, objectives, and communication guidelines on the 📘 Syllabus.

A Quick Word About LLMs (ChatGPT, Claude, Gemini, ...)

What are they? What is the intuition behind it?

ChatGPT is a Large Language Model (LLM) designed to generate human-like text based on the input it receives. It is part of the GPT (Generative Pre-trained Transformer) family of models and relies on deep learning algorithms to generate coherent and contextually relevant responses in a conversational format.

Using LLMs as a learning tool

  1. Ask Open-Ended Questions: Instead of seeking direct answers, pose open-ended questions that encourage exploration of concepts. For example, ask, "What factors influence voter behavior in elections?" to gain a deeper understanding of political behavior.
  2. Request Explanations and Summaries: Use LLMs to explain complex topics in simpler terms or to summarize articles and books. For instance, you might ask, "Can you summarize the main theories of public opinion formation?" to clarify your understanding of how public opinion is shaped.
  3. Engage in Discussion: Treat your interaction as a conversation. Ask follow-up questions, such as, "How do social media platforms impact public opinion during elections?" This encourages critical thinking and helps you explore the nuances of political behavior.
  4. Seek Practical Examples: When learning new concepts, ask for real-world applications or examples. You could inquire, "Can you provide examples of how political campaigns have successfully influenced public opinion?" This contextualizes your knowledge and makes it more relatable.
  5. Reflect and Review: After receiving information, take time to reflect on what you've learned. For example, summarize the key factors that affect public opinion in your own words, or discuss with the LLM how these factors might apply to current political events to solidify your understanding.

Science & The Scientific Method

  1. Goal is inference: We seek to learn about the world from data.
  2. Procedures are public: Methods and materials should be transparent and reproducible.
  3. Conclusions are uncertain: We quantify uncertainty and avoid overclaiming.
  4. The content is the method: The contribution lies in clear, defensible procedures.

Is a literature review a contribution?


A Cutting-Edge Toolbox

Warning

Getting started is the hardest part! Setting up your tools is tedious, but once everything is in place, your research workflow will continuously improve and can elevate your work to new heights. Invest the effort now, and your future self will thank you!

Writing with Typst

Typst is a lightweight, open-source tool for creating clean, formatted documents. Think of it as a text editor made for scientific papers, notes, or reports which include figures, citations, or even math. Combined with Git, your research becomes reproducible, versionable, and easy to manage.

Hacking with VS Code

Visual Studio Code is a free code editor that helps you write and organize your project files in one place. Beyond coding, you can use it to manage documents, run scripts, and integrate extensions for Python, Git, Typst, and more, essentially making it your all-in-one research workspace.

Collaborating on GitHub

Git provides version control to track changes to your files, while GitHub hosts your projects online, making it easy to share, collaborate, and back up your work. Using Git and GitHub ensures reproducibility, maintains a history of your work, and simplifies collaboration with anyone around the globe.

Analyzing Data with Python

Python is the open-source programming language we will use for quantitative political science, leveraging three core libraries:

  • pandas: For high-performance tabular data structures, data filtering, subsetting, and recoding.
  • Altair: For declarative statistical visualization and exploratory plots.
  • statsmodels: For linear regressions (OLS) and hypothesis testing using intuitive formula syntax.

Hack-Time

This is Fine...

First lines of code in Typst

Since we will use Typst from Day 1 for scientific writing and all milestone submissions, let's create your first document with simple formatting:

  1. Create a new document on Typst and paste the following snippet:
= Political Behavior & Public Opinion
== First Steps with Typst

This document was created with *Typst* for our _Data Analysis_ course.

=== Research Hypotheses
- *H1:* Higher political interest increases voter turnout.
- *H2:* Partisan identity influences media consumption.

We can even write math formulas easily: $Y = beta_0 + beta_1 X + epsilon$
  1. Export and compile your document to PDF (paper.pdf).

Check the 📚 Guide to Academic Citations in Typst to see how citations and .bib bibliography files are handled in Typst (we will cover this if time allows).

Onboarding

Follow the automated setup scripts on the Onboarding page to install VS Code, Python, the Jupyter extensions, and data science libraries on your computer with a single command.

The Assignment


Get Ready for Next Session: Think. Explore. Practice.

Think

Explore

  • Live Demo (Group 1): Typst for Scientific Writing (syntax, document structure, .bib citations, exporting PDF). Group 1 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 Typst Writing Guide and Typst Documentation to follow along and lead the peer discussion.

Practice

  • Complete your local programming setup via the Onboarding guide.
  • Complete Milestone 1 - Idea (Due Friday, Sep 25 at 08:00 before class via email).