NY Times Visualization

p5, journalism, data visualization

Tags: 

p5, journalism, data visualization

Tools: 

p5

Year: 

2020

1/9/21

Update: Found some time to revise and clean up the code, and everything is working!

  • I ended up using the Google Geocoding API to get the latitude and longitude coordinates of the article publish locations that are received from the Times Newswire API. (I initially tried the MapBox Geocoding API, but for some reason I wasn't able to get a valid object returned with the loadJSON call.)
  • I added interactivity to the locations' dot representations so that clicking on one will open the article(s) associated with that location in a new tab. (Shiffman's Clicking on Object's tutorial  was helpful here.)
  • I also added dynamic text that displays the name of each location as it's added to the map and the total number of mapped articles when the map is done loading.

Reflection: It was great learning how to work with APIs and experimenting with basic data visualization. I've always been fascinated by the NY Times' (and similar publications') global scope and diversity of reporting, and I think this project does a good job of conveying the scale and awe of that. It also offers an interesting new way to navigate and explore the news, following your curiosity about what's happening in specific regions of the globe, instead of via the default ways that the NY Times organizes its reporting. This could be developed even further to display information (like title or an image) about the article(s) published at that location when hovering over a dot, so you can know what you're about to open up before clicking on one. It also makes me wonder what other ways articles' metadata could be organized and visualized to allow for other possibilities navigating the news.

Link to revised p5.js sketch: https://editor.p5js.org/lucas.wozniak1/sketches/XY1QiIRKl

12/11

~~~ Still in process! ~~~

 

Objective: Update a world map in real time with geo-location symbols for new articles published to the NY Times.

 

Process: I used the MapBox API which I learned about from Shiffman's tutorial to load a world map. I used the Times Newswire API and Semantic API from NY Times to get the location info for the latest published articles and the geo-coordinates of those locations, respectively.

Outcome: Unfortunately, loading the geo-coordinates via the Semantic API has been coming up with a lot of errors. I think using one of these other APIs to get lat/lon coordinates for the location info from the Times Newswire API may be a better solution:

Google Geocoding API

MapBox Geocoding API

Next steps:

  • Fix the data loading errors
  • "Animate in" the publish locations
  • Allow interactivity so users can see which articles are published where

 

Link to early stage p5.js sketch: https://editor.p5js.org/lucas.wozniak1/sketches/7-0fN_2hp