Relies on the NYT/NPR AP election loader to get results from the AP API. Demonstrates a method putting those results into a PostgreSQL database using the COPY method and the loader's CSV output.
git clone https://github.com/nprapps/ap-election-loader && cd ap-election-loader
mkvirtualenv ap-election-loader
pip install -r requirements.txt
export AP_API_KEY=<your API key>
This will create all tables and load initial data:
./bootstrap.sh
./update.sh