https://github.com/goodluckh/ai-redistricting
https://github.com/goodluckh/ai-redistricting
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/goodluckh/ai-redistricting
- Owner: GoodluckH
- License: mit
- Created: 2024-04-06T20:59:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-13T01:20:05.000Z (about 2 years ago)
- Last Synced: 2024-05-14T01:23:31.239Z (about 2 years ago)
- Language: Jupyter Notebook
- Size: 18.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
Political geometry analysis of Ohio
## 👻 About
The Ohio redistricting project is a comprehensive analysis of the
political geometry of Ohio. The project aims to provide a detailed
analysis of the political landscape of Ohio, including the current
congressional districts, the demographic distribution, and the political
leanings of the state. The project will also explore the impact of
gerrymandering on the political landscape of Ohio and propose
alternative redistricting plans that are fair and representative of the
state's population.
## 📚 Guide
### 🗂️ Organization
The repository is organized as follows:
```bash
ai-redistricting/
├── assets/ # Misc. assets
├── data/ # Data files - shapefiles and short burst files
├── output/ # Output images
├── src/ # Source code
│ ├── main.py # Main script for running the analysis
│ ├── Ohio_MAUP.ipynb # Notebook used to produce shapefiles
│ ├── Ohio_SB.ipynb # Notebook used to analyze short bursts
│ ├── sb.py # Script for producing short bursts data
│ └── gingleator.py # Gingleator helper for SB analysis
└──...
```
### 🚀 Quick Start
To reproduce the shapefiles, make sure you obtain the raw data from the
[Redistricting Data Hub](https://redistrictingdatahub.org/):
- [Census Data](https://redistrictingdatahub.org/dataset/ohio-block-pl-94171-2020-by-table/)
- [Congressional Districts](https://redistrictingdatahub.org/dataset/2022-ohio-congressional-districts-approved-plan/)
- [Election
Data](https://redistrictingdatahub.org/dataset/vest-2016-ohio-precinct-and-election-results/)
Once you have them, change the import paths in the `Ohio_MAUP.ipynb`
file to point to the correct location of the data files.
### 📈 Analysis
Make sure you have the required libraries installed, then run the
following command:
```bash
cd src
python3 main.py
```
Output images will be saved in the `output/` directory.
To run the short burst analysis:
```bash
cd src
python3 sb.py
```
Output data files will be saved in the `data/` directory.
## 📝 License
This project is licensed under the MIT License - see the
[LICENSE](/LICENSE) file for details.