Learn how to replicate our fair redistricting analysis in your own community
Our methodology is open source and can be applied to any jurisdiction. Whether you're a data scientist, activist, or concerned citizen, you can use these tools to ensure fair representation in your community.
All our code, methodology, and tools are freely available on GitHub. You can download, modify, and use them for your own redistricting analysis.
# Fair Maps Redistricting Analysis
import gerrychain
import geopandas as gpd
# Load your jurisdiction's data
districts = gpd.read_file('your_county.geojson')
# Generate fair redistricting plans
plans = generate_ensemble(districts,
num_plans=10000,
top_plans=25)
# Analyze and rank plans
results = analyze_fairness(plans)
Download census blocks data from the Census Bureau or from our GitHub repository.
Install the required Python packages and set up your analysis environment.
pip install gerrychain geopandas pandas numpy shapely
Set the parameters for your specific jurisdiction and analysis goals.
Execute the Markov Chain Monte Carlo algorithm to generate thousands of possible redistricting plans.
Review the top plans and their fairness metrics to understand the range of possible fair outcomes.
Share your findings with local officials, community groups, and the public to advocate for fair redistricting.
Generating 10,000 redistricting plans requires significant computational resources. We recommend:
You'll need to obtain and prepare several types of data:
Technical analysis is just the beginning. You'll also need:
We're here to help you succeed! Whether you need technical support, guidance on data collection, or advice on community engagement, our team is ready to assist.
We are happy to help you get started and answer any questions you have.