VoterRoll is a Python application that compares county voter roll files with the National Change of Address (NCOA) database and identifies voters who moved out-of-state or out-of-country.
- Compares county voter roll files with the NCOA database.
- Identifies voters who moved out-of-state or out-of-country.
- Copies and renames voter roll files for each county.
The descriptions below are intended primarily for software engineers and software maintainers.
- Python 3.6 or higher
- Clone the repository:
git clone https://github.com/yourusername/VoterRoll.git
- Navigate to the project directory:
cd VoterRoll
- Create a virtual environment:
python -m venv voterroll
- Activate the virtual environment:
- On Windows:
voterroll\Scripts\activate
- On Windows:
- Install the required packages:
pip3 install -r requirements.txt
- Ensure the
voters_moved.xlsx
file is in the same directory asVoterRoll.py
. - Run the main script:
python VoterRoll.py
-
Install pyinstaller
pip3 install pyinstaller
-
Run pyinstaller
pyinstaller --onefile --add-data "voters_moved.xlsx;." VoterRoll.py
or, to clear cache and temp files,
pyinstaller --onefile --clean --add-data "voters_moved.xlsx;." VoterRoll.py
-
Locate VoterRoll.exe file in dist directory
cd dist ls
-
County directory file naming convention:
countyname_X where: countyname = name of Colorado county X = an integer value representing the relative population size of the county
-
NCOA (National Change of Address) file naming convention:
YYYYMMDDNCOAXXtoXX_countyname.xlsx where: YYYY = year MM = month DD = day NCOA = constant string XX = integer countyname = name of Colorado county
-
County voter roll (VR) file naming convention:
VRYYYY_MM_countyname.xlsx where: VR = constant string YYYY = year MM = month countyname = name of Colorado county
-
voters_moved file naming convention:
countyname_voters_moved.xlsx where: countyname = name of Colorado county voters_moved = constant string
-
colorado_voters_moved directory This directory contains one file for each county. It collects all voters_moved.xlsx files in one directory.
-
VoterRoll.py is the main Python script for processing voter roll and NCOA files.
-
Log files Log files are located in the "logs" directory in file "logs.txt". "logs.txt" is in JSON format.
-
requirements.txt Dependencies file for VoterRoll project.
-
Dockerfile Docker configuration file.
-
Create or modify Dockerfile as required.
-
Build the docker image file.
docker build -t voterroll-app .
-
Run the docker image file.
docker run -it --rm --name voterroll-container -v /mnt/c/Users/gpu7/VoterRoll:/app/data voterroll-app
This project is licensed under the MIT License - see the LICENSE file for details.
Richard Casey [email protected]
This project uses third-party libraries listed in requirements.txt
.