fivethirtyeight / data

Data and code behind the articles and graphics at FiveThirtyEight
https://data.fivethirtyeight.com/
Creative Commons Attribution 4.0 International
16.76k stars 10.95k forks source link

2016 Election Forecast data feed #72

Closed jjaquinta closed 7 years ago

jjaquinta commented 8 years ago

(Feature request rather than data issue.) Will you have a data feed for the 2016 Election Forecasts that can be used in 3rd party apps? I've been writing voice applications for the Amazon Echo, including "Tweet Poll" which used "IBM Insights for Twitter" for state-by-state sentiment analysis of candidates during the primary season. I'm interested in writing an interface that surfaces the daily 538 forecast. I would love to know if there is going to be a data feed for that, and what Terms and Conditions would apply to it. (Or who to talk to about setting up an app specific feed.)

MarHai commented 8 years ago

+1

Some sort of data feed or API would be great to have. Any plans on that?

TamzinHadasa commented 8 years ago

+1

Eflores89 commented 8 years ago

+1

rdarin commented 8 years ago

+1

Want to leave a note saying that I'm not interested in it for any commercial application at all, simply for playing with other ways to visualize the output. Would love to see this implemented for the community.

johnrb68 commented 8 years ago

+1

nigel327 commented 8 years ago

+1

khyew commented 7 years ago

FYI you can scrape http://projects.fivethirtyeight.com/2016-election-forecast/mobile-bar.html for the polls-only percentages. The response is gzip-encoded and looks like this:

    <body>
        <a href="http://projects.fivethirtyeight.com/election-2016/primary-forecast/?ex_cid=mobilebar&amp;v=1">
            <div id="promo" class="mobile-bar">
                <div data-url="http://projects.fivethirtyeight.com/2016-election-forecast/?ex_cid=mobilebar&amp;v=1" class="data-wrap js-data-wrap">
                    <h3 class="title">
                        Chance of winning<span></span>
                    </h3>
                    <p class="value-wrap">
                        Clinton<span class="value">81.4%</span>
                    </p>
                    <p class="value-wrap">
                        Trump<span class="value">18.6%</span>
                    </p>
                </div>
                <div class="cta">
                    <span class="caret">❯</span>
                </div>
            </div>
        </a>
        <script src="//projects.fivethirtyeight.com/2016-election-forecast/js/mobile-bar-promo.js?v=87b9f41dac2f9cfbaf6a5510fb0ace97"></script>
    </body>
ascheink commented 7 years ago

Hi everyone, you can grab most of the data in the forecast here:

http://projects.fivethirtyeight.com/2016-election-forecast/summary.json

Let me know if there is anything that's not in that file that would be useful, and we can look into adding it. We definitely encourage people to build new interfaces to our forecast. I highlighted a few of my favorites here:

https://twitter.com/ascheink/status/783393969111756800

Feel free to email me if you have any questions, or if you build something you'd like to share: andrei.scheinkman@fivethirtyeight.com.

rpearl commented 7 years ago

@ascheink is the prediction percentage over time--the data used to generate the "chances over time" chart for each state available as json?

ascheink commented 7 years ago

@rpearl http://projects.fivethirtyeight.com/2016-election-forecast/NY.json

bycoffe commented 7 years ago

@jasonborneman The senate data for each state is available at similar URLs:

http://projects.fivethirtyeight.com/2016-election-forecast/senate/US.json http://projects.fivethirtyeight.com/2016-election-forecast/senate/NY.json

There is no summary.json file for the senate.