Coder Social home page Coder Social logo

node-538's Introduction

538

A command line util to get the latest presidential polling odds from fivethiryeight.com.

DISCLAIMER: I have nothing to do with fivethirtyeight and this is not endorsed or supported by them and may break at any time if they change anything about their website. Please don't run this command any more than you have to, it still comes directly from their servers.

Installation

npm install -g 538

Usage

Type 538 into your console.

http://f.cl.ly/items/2X2X2A341S3x2m0y3D2u/Screen%20Shot%202016-08-10%20at%2012.47.15%20AM.png

Note: it's 100 characters wide, because I don't hate myself and use terminals with fewer columns, but I'd probably accept a nice PR that smartly adjusted to smaller terminals if you wanted.

Show me graphs when I open my terminal

Just add the 538 command to your ~/.bashrc or ~/.zshrc (or similar), and it'll run when you open your terminal. The request isn't always fast, so I don't really recommend doing this.

This might work if you have bash:

echo "\n538" >> ~/.bashrc

This might work if you have zsh:

echo "\n538" >> ~/.zshrc

Thanks

Obviously none of the data is mine. Go to http://projects.fivethirtyeight.com/2016-election-forecast/ and click their ads each time you use the command line tool.

I pretty much stole the idea from @nelhage - who is far, far smarter than me and also wrote this in python first: https://github.com/nelhage/util-scripts/blob/master/538

node-538's People

Contributors

slexaxton avatar erik-stripe avatar jwicks avatar

Stargazers

Karlie Verkest avatar Sara Robinson avatar Kenneth Auchenberg avatar Carlos Castillo avatar Kevin Ridgway avatar Erik Osheim avatar Daniel Gamage avatar Josh Bechard avatar Alex Z avatar Antonio Gómez-Maldonado avatar Nat Welch avatar Jeduan Cornejo avatar  avatar jack avatar Matt Hodges avatar Jimmy Moon avatar

Watchers

 avatar James Cloos avatar  avatar

node-538's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.