-
Notifications
You must be signed in to change notification settings - Fork 2
Week 07: APIs
- In-class midterm work
- Terminology: web API vs. generic use of "API"?
- Internet primer, protocols, HTTP requests
- API keys and URIs, example APIs
https://github.com/keshrath/ImageLoaderThreads
The midterm is located at https://github.com/whoisbma/Code_2_SP19/tree/master/Week_07/midterm_prompt and the goals are to:
- replace the buttons with and their properties with a button class
- make use of an approach for global state management
- move pertinent data from inside to outside the sketch in whatever format you choose
- make the buttons actually do something neat. incorporate techniques like child classes for extra credit.
You're free to make updates to the midterm code but you'll be given credit for whatever you turned in at the end of class.
- openweathermap.org
- wordnik.com
- https://developer.nytimes.com
- https://opendata.cityofnewyork.us
- JSON viewer browser extension (useful!) - https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh?hl=en-US
- Overview of HTTP - https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview
- Daniel Shiffman on XML and JSON - https://youtu.be/rqROpUNb2aY
- A great data viz for Processing series by Matthew Epler https://vimeo.com/album/2573675?page=1
- A general tutorial on data https://processing.org/tutorials/data/
- Jer Thorp's writing on data https://www.jerthorp.com/writing
- Programmable Web - https://www.programmableweb.com/
Make sure to carefully review the API docs on the site of the API you use. It will often take some digging to find out how to retrieve the data you are looking for. For example, here's the documentation for the current weather API- https://openweathermap.org/current. Look for examples of API calls and test them in your browser with your own API key.
- Wind Map - http://hint.fm/wind/
- Exo - https://vimeo.com/41655330
- We Were Strangers Too - https://www.jerthorp.com/wewerestrangers
- Casualties - https://benfry.com/casualties/
- Gabriel Gianordoli's pinterest - https://www.pinterest.com/gianordoli/dataviz-general/
Your assignment for this week is to research and use one of the APIs we discussed, or find your own. Create a digital illustration using data pulled from that API in your sketch.
You can get 5 possible points on this homework. You'll get a point for each of the following, so pick and choose:
- correctly uses a web API to retrieve and interpret data
- visualizes interpreted data in some creative fashion
- communicates the interpreted data rationally (is it clear? logical?)
- uses a wide range of data rather than a single data point (the wind map covers the entire US, not a single city)
- updates data over time rather than only once (perhaps it requests data from the API once every minute?)
- is interactive, incorporating selectable elements or responding to user input in some other way
- uses classes/objects as containers for interpreted API data
- uses state machines in some way, globally or for class instances
Submit via Github and Canvas as usual.