Name: us-elections-polltracker
Owner: FT Interactive News
Description: 2016 US presidential election polling
Created: 2016-06-29 22:46:29.0
Updated: 2017-01-11 10:44:36.0
Pushed: 2018-01-02 05:22:51.0
Homepage: https://ig.ft.com/us-elections/polls
Size: 3780
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Partially based on the FT Brexit polling app.
A web service scraping data from Real Clear Politics' historical averages polling data feed for the 2016 general election between Trump v Clinton and publishing it as SVG charts.
The format for URLs looks like /polls.svg?size=300x400&type=both&background=fff1e0&startDate=July 1, 2015&endDate=June 29, 2016&fontless=true&state=us
.
|param|options|default|
|—|—|—|
|size|{number}x{number}|300x400|
|type|line
, area
|line
|
|background|hexcode (don't include the hash)|true
, false
|false
|
|startDate|Month day, year|July 1, 2015|
|endDate|Month day, year|<today's date>|
|fontless|true
, false
|true
|
|state|two-letter state abbreviation, us
|us
|
npm install
in it.env
file in the root of the project with these contents:BASE_URL=postgres://us@127.0.0.1/us2016
ER=us
TABASE=us2016
Make a database
psql --version
).createdb us2016
createuser --superuser us
npm run migrate
Run the scraper to populate the database: npm run scraper
(takes a few minutes)
npm install
, npm run dev
This software is published by the Financial Times under the MIT licence.
Please note the MIT licence includes only the software, and does not cover any FT content made available using the software, which is copyright © The Financial Times Limited, all rights reserved. For more information about re-publishing FT content, please contact our syndication department.