This repository contains the code and materials for the master's thesis "Elections and Climate Attitudes: How Do Peopleβs Views on Climate Change and Policies Shift During an Election?" by Paraskevas K. Leivadaros, supervised by Kyuri Park at the University of Amsterdam (MSc in Data Science, 2025). The thesis examines how public perceptions of climate change, willingness to pay, and support for climate policies shift during election periods, using survey data and temporal analysis methods.
- Does support for climate policies (like carbon taxes or emissions standards) change during elections? And is this support influenced by personal or community-level perceptions of climate harm?
- Does willingness to pay for climate solutions vary during elections and what factors influence it?
- Does political ideology moderate the relationship between perceptions of harm and willingness to pay?
- π Observations: 5,667
- π Variables: 20 numeric (11 float64, 9 int64)
- π Time Range: 2020β2021 (Waves 2,3 and 4, centered on U.S. election)
Dimension | Variables |
---|---|
Climate concern | cc4_world , cc4_wealthUS , cc4_poorUS , cc4_comm , cc4_famheal , cc4_famecon |
Willingness to pay (WTP) | ccSolve100 , ccSolve50 , ccSolve10 , ccSolve1 , ccSolve0 (merged into ccSolve ) |
Policy support | cc_pol_tax , cc_pol_car |
Political orientation | pol_party , pol_lean , pol_ideology |
Demographics | dem_income , dem_male , dem_age , dem_educ |
- Global and community-level concern about climate change is consistently higher than personal or economic concerns.
- Support for policies, particularly emissions standards (
cc_pol_car
), remains high across waves, while willingness to pay (WTP) drops when financial costs increase. - Political identity strongly predicts policy support, but is weakly correlated with general concern.
- Dimensionality reduction (PCA, ICA, Factor Analysis) highlights three core constructs:
- Climate impact perception
- Willingness to pay
- Political/policy alignment
π Full visualizations are available in notebooks/1-eda.ipynb
, including:
- KDE plots and histograms
- Correlation heatmaps (Spearman)
- Dimensionality reduction results (PCA, ICA, Factor Analysis)
- Panel VAR (PVAR) is used to model temporal dynamics of climate perceptions, policy support, and WTP.
- Election-period effects are evaluated via subgroup comparisons and time-aligned estimations.
- PCMCI+ algorithm from
tigramite
identifies time-lagged causal relationships among variables. - Results from PVAR and PCMCI+ are compared to validate robustness of causal inferences.
- Interaction effects between harm perception and political ideology are tested to identify conditional influences on WTP and policy attitudes.
- Multicollinearity is addressed using a composite harm index.
π data/
π docs/
βββ paraskevas-leivadaros-master-thesis.pdf
π notebooks/
βββ 1-eda.ipynb # Exploratory data analysis
βββ 2-modeling-and-inference.ipynb # Time Series and Causal Analysis
π results/
π scripts/
π LICENSE
π README.md
π requirements.txt
π setup.py
This project requires Python 3.13.0 and pip 25.1.1. To avoid conflicts with system-wide packages, we recommend installing Python via a package manager (like Homebrew) and using a virtual environment.
If you donβt have Homebrew installed, run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then install Python 3.13.0:
brew install python@3.13
Add it to your shell (if needed):
echo 'export PATH="/opt/homebrew/opt/python@3.13/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
Upgrade pip
:
python3 -m pip install --upgrade pip
-
Download Python 3.13.0 from the official website:
https://www.python.org/downloads/release/python-3130/ -
During installation:
- β Check βAdd Python to PATHβ
- β
Enable
pip
in the installer options
-
After installation, confirm with:
python --version pip --version
git clone https://github.com/paraskevasleivadaros/climate-opinions-and-elections.git
cd climate-opinions-and-elections
python3 -m venv venv
-
macOS/Linux:
source venv/bin/activate
-
Windows (Command Prompt):
venv\Scripts\activate
-
Windows (PowerShell):
.\venv\Scripts\Activate.ps1
which python
Expected output (macOS/Linux):
/Users/yourname/climate-opinions-and-elections/venv/bin/python
pip install .
This installs all dependencies from setup.py
π For more help:
- Python: https://www.python.org/
- pip: https://pip.pypa.io/en/stable/installation/
- Homebrew: https://brew.sh/
- Election periods do not significantly alter general climate attitudes, but subtle shifts in WTP and policy support occur among independents.
- Support for carbon taxes is strongly predicted by previous policy support (e.g., emissions standards).
- Multicollinearity in interaction models affects precision, prompting dimensionality reduction through index construction.
Tool/Library | Purpose |
---|---|
pandas |
Data manipulation and panel structuring |
numpy |
Numerical operations and array handling |
statsmodels |
PVAR (Panel Vector Autoregression) estimation |
tigramite |
Time-lagged causal discovery using PCMCI+ |
matplotlib |
Static plotting |
seaborn |
Statistical graphics for exploratory data analysis |
plotly |
Interactive network visualizations |
networkx |
Construction and layout of causal graphs |
graphviz |
Rendering directed acyclic graphs (DAGs) |
skimpy |
Quick summaries and data diagnostics |
- Supervisor: Kyuri Park
- Faculty of Science β University of Amsterdam
- The creators of open-source survey datasets and Python libraries
Paraskevas K. Leivadaros
π§ paraskevasleivadaros@gmail.com
π GitHub | LinkedIn
If you use this repository, please cite the thesis:
Paraskevas K. Leivadaros, Elections and Climate Attitudes: How Do Peopleβs Views on Climate Change and Policies Shift During an Election?, University of Amsterdam, 2025. PDF