nprapps/ap-election-loader

Name: ap-election-loader

Owner: NPR visuals team

Description: basic AP election loader

Created: 2015-11-10 15:45:24.0

Updated: 2017-10-01 22:15:21.0

Pushed: 2016-02-03 18:14:26.0

Homepage: null

Size: 8

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

AP ELECTION LOADER

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.

Getting started
Install the software
clone https://github.com/nprapps/ap-election-loader && cd ap-election-loader
rtualenv ap-election-loader
install -r requirements.txt
Export environment variables
rt AP_API_KEY=<your API key>
Bootstrap the database

This will create all tables and load initial data:

otstrap.sh
Update results
date.sh

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.