Skip to content

Instantly share code, notes, and snippets.

@nathanows
Last active August 29, 2015 14:18
Show Gist options
  • Save nathanows/69277054e9ba7fdb3b2d to your computer and use it in GitHub Desktop.
Save nathanows/69277054e9ba7fdb3b2d to your computer and use it in GitHub Desktop.
Jet Fuel Notes

API Endpoints (/api/v1/...)

  • /poverty/map(?year=2014) (state geo.json data with any coloring/shading options applied (maybe a color intensity?)

  • /poverty/markers(?year=2014) (any individual points or markers we want on/in the states, possible year filter)

  • /poverty (general data set information (data set name, updated_at, avail. years, etc))

  • /poverty/state/tweets (last 50 tweets within predefined poverty twitter hashtags) OR /poverty/tweets?state=XX

  • /poverty/state/tweets/sentiment (sentiment scale score of last 2000 tweets)

  • /poverty/state/data(?year-2014) (more chosen state data, for example actual numbers/%'s, that could be overlaid on state)

  • /poverty/state/images (if we wanted to pull in instagram photos)

  • /overview (contains an overview, list of available datasets/endpoints (poverty, drug use, etc), etc.)

Mapping:

  • Sample D3 based map
    • http://bl.ocks.org/mbostock/4699541
    • Seems like with some customization this could be a good basis for our main map
    • Its also cool that its based on D3 which it sounded like we all kind of wanted to play with a little?

State Data Nesting:

  • Seems like this could go one of two ways, either state specific routes /CO/, /NY/, etc, or a state code could just be passed through as a filter to a more generic route /tweets?state=CO&year=2014 (which may be better the more I think about it... seems like this might allow you to minimize the complexity and number of api requests allowing more filtering to be done on the front-end)
  • In the same vein, I'd guess sentiment is probably just saved as a tweets data attribute -->> { data: { sentimentality: 0.75, sentimentailty_verbose: 'Slightly Negative', pulled_at: 'dateTimeObj', tweets: {[ {id: 1, user: sdfsdf, user_prof_link: 'www.twitter.com/sdfsdf' user_img: 'http://ssdfsdf.com', text: 'sdfsdfsdf', time: 'dateTime', trigger_hashtags: ['#poverty', '#poor']}, {...}, {...} ]} } }

Main Data/Reports

  • Need to decide on one sample report to focus on to start with
  • If we made available years clear (i'm thinking something in the /poverty endpoint), i think we could process data on an annual basis without too much extra work, I'm guessing it would just be providing a filter option to the endpoints above where I included a filter parameter
  • the /poverty/state/data endpoint was for storing things like actual reporting statistics so we could overlay those on the map... or something like that...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment