000-gerryWybory.sql
-- generates the district-level candidate results table (gerryWybory
) -- first main data table used in computations005-compECDF.R
-- computes empirical CDFs for candidate votes010-gerryListy.sql
-- generates the aggregate electoral list results table (gerryListy
)020-gerryKoalicje.sql
-- generates the potential functional coalitions table (gerryKoalicje
)025-koalicje.R
-- the algorithm for detecting functional coalitions030-gerryGminyAux.sql
-- generates the per-township aggregate stats table (gminy
)040-gerryAggr.sql
-- generates the aggregate party results table (gerry
) -- second main data table used in computations050-gerryWybPostProcess.sql
-- post-processing ofgerryWybory
table -- computes means, effective numbers of competitors, etc.060-gerryRank.sql
-- post-processing ofgerry
table -- computes rankings070-gerryGminyAuxPostproc.sql
-- post-processing ofgminy
table - computes winners, runner-ups, and effective numbers of coalitions080-gerryHypoSV.sql
-- generates the vote-shifted results tables (gerryHypoWybory
andgerryHypoSV
)090-gerryOkregi.sql
-- generates the district-level aggregate stats table (gerryOkregi
)
-
100-anonAlphaFit.R
-- R code for fitting$\alpha$ parameters -
110-qFit.R
-- R code for fitting$q$ parameters -
115-qFitHypo.R
-- R code for fitting$q$ parameters for vote-shifted results tables -
210-qFit.R
-- R code for fitting$p$ parameters -
130-gammaFit.m
-- Mathematica code for fitting the$p$ parameter distribution -
135-gammaFitUpdate.sql
-- SQL script that saves the results of130-gammaFit.m
to the database -
150-expSeats.m
-- Mathematica code for computing seat expectations -
155-expSeatsUpdate.sql
-- SQL script that saves the results of150-expSeats.m
to the database -
160-seatsDist.R
-- R code for computing seat count distributions -
165-pValues.sql
-- SQL code for computing empirical seat$p$ -values -
200-effThold.R
-- compute effective seat thresholds
250-np.R
-- compute non-parameteric seats-votes regression curve300-normalizeV.R
-- compute normalized vote percentages350-outliers.sql
-- compute outlier detection scores360-outliersNorm.sql
-- normalize outlier detection scores
chapter-3-2.sql
-- generate tables for Chapter 3.2chapter-3-2-plots.R
-- generate plots for Chapter 3.2
400-partisanBias.R
-- compute requisite vote swings405-gerrySwing.sql
-- initialize vote swing simulation tables410-gerrySwingV.R
-- vote swing simulations420-uniformSwing.R
-- uniform swing simulations (old version)chapter-3-3.R
-- generate tables for Chapter 3.3chapter-3-3-plots.R
-- generate plots for Chapter 3.3
500-wastedVotes.sql
-- compute wasted vote counts550-efficiencyGap.R
-- compute efficiency gap indiceschapter-3-4.sql
-- generate tables for Chapter 3.4
600-malapp.sql
-- compute malapportionment indices650-malappParty.sql
-- compute party-specific malapportionment indiceschapter-3-5.sql
-- generate tables for Chapter 3.5chapter-3-5.R
-- statistical model for Chapter 3.5
700-monotonicity.sql
-- compute non-monotonicity index720-incumPacking.sql
-- compute incumbency packing index740-polarWBP.sql
-- compute mayoral polarization index750-tiltClusWBP.R
-- precinct clustering for tilt computations760-tiltWBP.sql
-- compute mayoral election tilt770-tiltRDA.sql
-- compute council election tiltchapter-3-7-polar.sql
-- generate tables for Chapter 3.7chapter-3-7-polar.R
-- generate plots for Chapter 3.7
-
krakow.sql
-- generate tables -
krakow0.sql
-- generate tables -
krakow1-thold.R
-- compute effective seat thresholds -
krakow2-q.R
-- estimate$q$ parameters -
krakow3-p.R
-- estimate$p$ parameters -
krakow2-expectS.sql
-- compute expected seats -
krakow2-sDist.R
-- compute seat distributions -
krakow2-pValues.sql
-- compute$p$ -values -
krakow4-np.R
-- compute non-parametric seats-votes curves -
krakow5-norm.R
-- compute normalized votes -
krakow6-outliers.sql
-- identify outliers -
krakow7-swing.R
-- swing simulations -
krakow7-swing2.R
-- swing simulations -
krakow8-waste.sql
-- compute wasted votes -
krakowStats.sql
-- aggregate stats -
chapter-3-8-wyniki.R
-- generate election result plots for Chapter 3.8 -
chapter-3-8.R
-- generate method plots for Chapter 3.8
900-suspects.sql
-- generates thesuspects
table920-suspectsAggr.sql
-- aggregation of suspicion indices950-intent.sql
-- aggregation of intent indicatorschapter-4-1.sql
-- generate tables for Chapter 4.1chapter-4-1.R
-- generate plots for Chapter 4.1chapter-4-5.sql
-- generate tables for Chapter 4.5chapter-4-5.R
-- generate plots for Chapter 4.5
Author: Dariusz Stolicki
Jagiellonian Center for Quantitative Political Science, Jagiellonian University, Krakow, Poland
Copyright (C) Jagiellonian University 2016-2022
Supported under NCN grant no. 2014/13/B/HS5/00862