electoral-data

Community

Analyze elections, turnout, and gerrymandering

Authorxjtulyc
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps you quantify electoral systems and map-level outcomes by turning CLEA election data into actionable measures of party systems, disproportionality, turnout patterns, and district-level gerrymandering.

Core Features & Use Cases

  • Effective Number of Parties (ENP): Computes Laakso-Taagepera effective party numbers for both votes and seats to summarize fragmentation.
  • Disproportionality & Party System Metrics: Calculates Gallagher disproportionality (and related measures) to compare vote-to-seat translation.
  • Ecological Regression & Turnout Modeling: Estimates group voting behavior (ecological regression/King’s EI framing) when individual-level data are unavailable and supports turnout modeling variables at the district level.
  • Gerrymandering Diagnostics: Computes efficiency gap and compactness-style indicators (e.g., Polsby-Popper using GIS geometry inputs) to evaluate packing/cracking and district shape.
  • Use case example: If you have CLEA lower-chamber election CSV data plus district shapefiles, you can produce election-level ENP/Gallagher summaries and district-level gerrymandering metrics in a single analytical workflow.

Quick Start

Use the electoral-data skill to load your CLEA CSV from CLEA_PATH, compute election-level ENP and Gallagher measures for a chosen country and year, and then calculate gerrymandering indicators using your district geometry and vote totals.

Dependency Matrix

Required Modules

pandasgeopandasnumpyscipymatplotlib

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: electoral-data
Download link: https://github.com/xjtulyc/awesome-rosetta-skills/archive/main.zip#electoral-data

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.