Prerequisites
What You Need Before Starting
This textbook is designed for college undergraduates with no prior coursework in political science. However, you'll get the most from it with the following preparation:
Required: Basic Statistical Literacy
You should be comfortable with:
- Descriptive statistics: Mean, median, mode, standard deviation, percentages
- Basic probability: Understanding that a "70% chance" means something specific
- Correlation vs. causation: Knowing that two things moving together doesn't mean one causes the other
- Reading charts and tables: Interpreting bar charts, line graphs, scatter plots, and cross-tabulations
If you need a refresher, Appendix A: Research Methods Primer covers these topics with political examples.
Required for Python Chapters: Introductory Programming
Seven chapters (5, 10, 16, 21, 27, 33, 37) include Python code. For these, you should be able to:
- Write and run Python scripts
- Use variables, loops, conditionals, and functions
- Import and use libraries (especially
pandasandmatplotlib) - Read and manipulate data in DataFrames
- Create basic plots
If you've completed an introductory Python course or worked through a tutorial like Automate the Boring Stuff with Python, you have enough. Appendix B: Python and Data Toolkit Reference provides setup instructions and a quick reference guide.
Note: You can skip Python chapters without losing the conceptual thread of the book. Each lab chapter has a companion theory chapter that covers the same material conceptually.
Helpful but Not Required
- American government basics: Familiarity with the U.S. electoral system (Congress, Electoral College, primaries) will help, but we explain key institutional features as they arise.
- Media literacy: Experience critically evaluating news sources and claims will give you a head start on Parts V and VII.
- Spreadsheet skills: If you're comfortable with Excel or Google Sheets, many of the analytical concepts will feel familiar.
Software Setup
For the Python lab chapters, you'll need:
- Python 3.9 or higher — We recommend the Anaconda distribution
- Jupyter Notebook or JupyterLab — For interactive coding
- Required packages — Listed in
requirements.txt; install withpip install -r requirements.txt
Detailed setup instructions are in Appendix B, Section B.1.
The ODA Dataset
Python chapters use the OpenDemocracy Analytics (ODA) Dataset, a realistic synthetic dataset designed for this textbook. It includes:
| Table | Records | Description |
|---|---|---|
oda_polls.csv |
~2,400 | Survey results from 2018–2024 across 50 states |
oda_voters.csv |
~50,000 | Synthetic voter file with demographics and history |
oda_ads.csv |
~8,500 | Political advertising records with spend and targeting |
oda_speeches.csv |
~1,200 | Transcribed political speeches with metadata |
oda_donations.csv |
~35,000 | Campaign finance records |
oda_media.csv |
~15,000 | News articles with source and topic coding |
The dataset is introduced in Chapter 5 and used throughout all Python chapters. Column specifications and codebooks are in Appendix C.