The Election Committee has removed the files from their website, but they remain accessible unaltered in my original project. Additionally, they are partially available in the historical section of the Knesset Election Site.
- Corrections were made to the 1992 election records using the 926 PDF document.
- The data for the 19th Knesset was transformed from PDF to DOCX format and then processed with
fix_19.py
to normalise text for comparison purposes and to rectify any errors in rows. - To execute
process_stations.py
, which processes station data from xls and xlsx files for various elections, cleans up addresses, and standardizes station numbers,xlrd
version 1.2.0 must be installed. process_elections.py
is used to process and store voting data across different Knesset elections and compile vote totals by station and bloc.- The script
locations.py
requires a Google API Key to perform geocoding of addresses into latitude and longitude coordinates. This script reads TSV files, identifies unique addresses, and employs the Google Maps API for geocoding. - The
combine.py
script merges station data with election results and geocoded locations to produce an extensive dataset. points.py
processes the combined TSV files and generates a JSON file for each election with geocoded voting data, categorised by political blocs and voting counts.
- Python 3.x
- A Google API Key for
locations.py
to access the Google Maps Geocoding API.
The scripts generate output files in the output
directory, structured as follows:
output/stations/
: Contains TSV files with processed station data for each election.output/elections/
: Contains TSV files with election results.output/locations.tsv
: Contains geocoded locations with latitude and longitude.output/combined/
: Contains the final combined TSV files for each Knesset election.output/points/
: Contains JSON files with processed geocoded voting data for each election, categorised by political blocs.