“Who even is Jason?” – was the (sarcastic) question of the hour during this past week’s Interactive Exhibit Design studio. This week we learned about JSON data and how we can use JSON data from websites in our Processing code.
In our studio session we used an API key from openweathermap.org to pull weather information from their JSON data. And using Processing we created a text box to present the data we were interested in.
At first I found the JSON data difficult to parse. But once I started to understand the way in which the data was nested it became a bit easier to understand. It helped that our example was using the weather, so I understood what words were connected with which concepts (“temp” is temperature, “sunrise” is sunrise etc). I think this will be a much steeper learning curve with other data sets, especially when there are more units and more esoteric labelling systems. I’m still not entirely clear how to know when to refer to a piece of data as a float (number with decimal), int (number without a decimal), string (word), or PImage (image), except through educated guesses and trial and error. And since there is no standard system for API and JSON data, I fear I may have to rely on both more often than not.
Once I figured out how to extract the information I was looking for from the JSON data I started thinking about how this type of data could be used in a museum exhibit. There is something powerful about having real-time information on display, but displaying something like the weather, which (generally) takes quite a while to change, isn’t very exciting. And while museum exhibits don’t have to be exciting, the good ones generally are. You want to be able to interact with it, and see some kind of change without having to make a return visit several hours or days later.
How could we make JSON data more interactive?
Because I was already thinking about the weather (and I have a natural maritime history bias) I wonder if we could use the JSON data to talk about maritime history.
If we set things up to answer a simple question we can still give the audience some of that powerful real-time response data. Here’s my potential scenario:
The audience/visitor is learning about maritime history, the perils of bad weather, and the importance of being aware of the weather when you’re working at sea. They input different dates into the device and using historical weather data they receive a response about whether or not it’s safe to head out on the water. This would allow the visitors to put in whatever date they want – birthdays, anniversaries, etc – and connect them to the data in a way that is potentially more meaningful. The responses could be more than just a safe/not-safe dichotomy as well. There could be different levels of safe (as in life) : calm and sunny – good wind for sailing – rough seas – STAY ON LAND. the different reactions could be based on different data from the weather – including wind speed and wave heights.
It would be interesting to see if this kind of data can be harnessed in other ways as well.