Data Driven Compositions



In the video above Aaron Koblin shares some of his data driven online generative art projects. Aaron is an artist and creative technologist who at the time of this video (~2012) was the creator and head of the Data Arts Team at Google. Now he co-runs a company focused on cinematic (and fitness) VR experiences with Chris Milk, a music video director Aaron first started working with around the same time he gave this talk (towards the end he mentions a coupe of collaborations with Chris Milk).

There's all sorts of data we can pull from and use as inputs into our algorithmic compositions. We've already started exploring one of them, URL parameters which is data we can add to the URL and then later access in our code to alter some detail of our generative art. In the notes below we'll explore a number of other ways to have different types of data drive some aspect of our generative systems.

Time and Date



We've spoken a lot about conceptual art this quarter. One of the artists referenced in the video we watched the first day of class was On Kawara. Like so many works from the conceptual art movement, On Kawara's pieces lend themselves quite nicely to modern day remixes for exploring generative art concepts. We'll specifically be taking a look at how we might remix his Date Paintings (discussed in the video above). JavaScript (the language itself) has a built-in Date object which can be used to pull the current date and time from the computer running your code.





As with so much of the JavaScript API (as well as the Web APIs) there also exists a library which will make it easier for us to work with the Date object called moment.js.





The links below are all different remixes of Kawara's Date Paintings. It's worth noting that the Date Paintings aren't the only pieces we can draw inspiration from, there are data driven concepts/themes running throughout On Kawara's practice, watch this video on his Self-Observation piece as another example.

Geolocation

We can also make work that responds to the specific location of our audience (remember, our works are online, anyone around the world can access them through a web browser). Modern Web browsers provide an API for accessing the users Geolocation (not to be confused with the location API we discussed last week which refers to the URL in the address bar). Like all Web APIs you can view their documentation and work with it directly, but the nn.min.js library we've been using has a nn.askForGPS method which makes this much easier to work with.





The Weather (via REST APIs)

Often times the data we want to use isn't available directly via JavaScript or any Web APIs, instead it's data stored on someone else's server. When others make data on their server's available to others they usually do this in the form of a "REST API". For example, the The National Weather Service provides a free API we can use to get the forecast of a particular area. Third party REST APIs make data available to other programmers through "endoints", URLs which you can request data from, rather than websites. For example: https://api.weather.gov/gridpoints/LOT/75,72/forecast will return forecast data for Chicago. In order to generate that URL it took a few steps which I'll walk through below.





That's only an overview on how to use REST APIs, for a more detailed walk through as well as other important considerations and examles see the class notes on how to fetch data.

The Cut-Up Method (More REST APIs)

a dadaist poem

You may recall the "the cut-up method" from our reading on Randomness earlier this quarter. The "method" proposed by the writer William Burroughs as well as Tristan Tzara's "To Make a Dadaist Poem" (1920). Which centers around creating new pieces of writing by re-arranging other texts randomly. In the case of Tzara's Dadaist poems the source was always news papers, which he would "cut-up" and then randomly re-arrange. Check out this modern remix on that piece by Nick Turgeon (2022).

To create something like this we'll need to use a REST API which we can query for news data. Refer to the notes on how to fetch data from third pary REST APIs. Then take a look at this netnet example where I recreate the a dadaist poem.