Category Archives: Data

The ISS Flying through SPACE!

For the data project I wanted to find a simple API to play around with. The position of the international space station is one that is readily available (and doesn’t require a key!). I decided it would be fun to draw the ISS in p5 (well, a basic representation of it), and change its color based on the current position of the ISS. I also decided to track its position to the actual positional data of the ISS. Finally I wanted to make it look like it was flying through space (wee!), so I added loads of ellipses, made them all white, and had their positions change randomly — making it appear as if the station was flying rapidly through a star-field.

Here’s the Code

Here’s it in action

Data

Using a CSV from NYC OPEN DATA, I plotted instances of rat reporting throughout the city of New York. After troubleshooting for a while, I figured out that p5 couldn’t support a file that size (the original file had 1159419 lines, so next time I’ll use the API). My project involves 150 reporting of rats in the city of new york.

I mapped the x and y coordinates to my width and height to get a map like visualization.

code: https://github.com/dl2514/NYC-rats

visualization: https://dl2514.github.io/NYC-rats/

League of Legends API

For this assignment. I decided to work with Riot’s API for League of Legends. Specifically, I thought it would be interesting to compile some personalized stats for players, such as winrate and how they did in lane against specific champions. I’m guessing that most people in the class don’t play, so basically it just tracks how well you do in the game. Right now, it simply looks at a player’s match history and then stores all of the games and the relevant statistics in a Google Spreadsheet. To make this work, I used Google App Script to be able to access a user’s Google Drive. Here’s the Spreadsheet that resulted from the script: https://docs.google.com/spreadsheets/d/1cg35tjZKfClkMnU8z3s9BSCmy56Dvty5qzLcA675yCg/edit?usp=sharing

The cool thing about the script is that it checks for new games every hour, so I just have the script running continuously and I can just check back on the spreadsheet whenever I like. I chose to use Google App Scripts because I had to familiarize myself with the system for a project I’m working on for a nonprofit organization. Here’s the code for the script (sans the API key for Riot):

 

Data

Using the NASA Astronomy Picture of the Day API, I created a minimalist program that presents the viewer with everything that they could want to know about the picture of the day, except the actual picture. This encourages them to use their imagination and instills a sense of wonderment when picturing the cosmos. The program only shows the present day to emphasize the importance of living in the present. But the user can choose to go back and forward by pressing the left and right arrow keys. 

 

Through making this program, I learned after a lot of trial and error that there is something wrong with my p5. It can’t actually run this program, even though literally every other device/console/program/thing that was used to try to call the data worked, including but not limited to terminal, the google browser, and p5’s online editor.

 

https://github.com/jinpearl/data

 

Maps API

I used the Mapquest API to make a fun way to check how much a trip will cost and measured the length of time in units of a song I chose. I added the fun display just to give it motion, but it is not that interactive. I also think it only works for the continental US and I don’t know about cities with two part names like New York you may have to add a ‘+’ or something like that.

Here is the code and below is a video of it in action.