This repo contains a geodatabase and geojson files to use with LA County election results from the June 7, 2022 primary.
The files are in the geojson-by-race
directory.
To create the files yourself, run the create-shapefiles.ipynb
Jupyter notebook. It requires Python 3.7, pandas, geopandas, fiona, requests and xlrd. So:
pip install pandas geopandas fiona requests xlrd
This repo does not contain the election results. But if you run create-shapefiles.ipynb
it will download the data and create geojson files that include the election results as properties of each precinct. Those files will be saved into a new folder geojson-by-race-with-results
The DavidYanofsky.gdb
geodatabase was provided to me by the Los Angeles county. You can request your own copy through their order form. It costs $22 for them to mail a CD to you. And you'll have to mail them a check or go to Norwalk to pay.
I suggest you just use these files for free.