API and JSON

· · · · · · · · · · · · · · · · | Intro to Computational Media

Initially I had lofty ambitions.I wanted to work with the youtube api and build a video player of-sorts. Kind of a prelude to what I hope to do for my final project. But, well, the documentation was confusing, and I realized I should probably start with something simple.


Every time I code, I feel a bit like I am starting from scratch. It’s like I have to warm up the part of my brain that is learning to do this. I forget the simplest things. No matter how complex the last thing I built was, each time a start from scratch I feel like I have almost no idea what I am doing.


So for this project I decided to start slow and use the sketches from class. I scrapped my youtube idea (well, put it aside for now) and decided to work with the weather api. Since I already had a sense of how it worked.


The first thing I made was a simple “weather app” pulling from the OpenWeatherMap Api.





VIEW PROJECT HERE


It works pretty well and it helped me feel more confident with pulling .JSON formatted data into my code.


Next I decided to try and familiarize myself with the New York Times api and built a simple search tool:





VIEW PROJECT HERE


Again, I got something working and decided I should try and create a visualization of the data coming in.


I was interested in creating a tool that help visualize the number of times a subject matter came up in a week. This became a bit complicated because I was looking to find the total hits per day, which meant I had to pull a new data set for everyday of the week. I managed to create a sketch the cycles through an array of dates and calls for new data with every date – creating a graph on screen.





VIEW PROJECT HERE


After succeeding at creating this sketch I started to consider how useful it actually was. I realized, as I was playing with it and showing some friends, that is was most interesting to use it to build comparisons. To search one thing, view the results, and then search something else – ultimately comparing the results. So I thought, ‘ok I can build something that does that comparison for me’. I just need two data calls (what should I be calling that?) and maybe two functions that I could trigger in succession.


I actually did it:





VIEW PROJECT HERE


It’s a bit glitchy and something tells me there is a better way to do this. But I’m pretty happy to have gotten it working.


Hopefully I can manage the youtube api in the months to come. This was definitely good practice. I learned a lot


PROJECTS THAT INSPIRED ME:


http://www.oldnyc.org/


http://www.oldsf.org/#ll:37.784009|-122.408066&m:37.78362|-122.40745|18


http://ny.spatial.ly/


 

http://gothamist.com/2015/04/15/tree_map_nyc.php


http://www.citylab.com/design/2014/10/mapping-the-age-of-every-building-in-manhattan/381676/?utm_source=FB0410_4




I am very into mapping and now realize that almost all of these projects I have admired in the past are likely built using data from an api. Which is awesome.


also into:


http://onesecond.designly.com/



No Comments

Leave a comment