There's a very specific window of time when its reasonable waking hours in New York and in New Delhi – something I always have to keep in mind to speak to family and friends back home. I was curious to see if I could represent this through audio for this assignment. Given the amount of time I spend in front of a computer, specifically on the browser, I figured using my chrome browser history as a proxy for waking hours could be feasible.

This is a sonification of 2 days of chrome usage – a day in Delhi (8th July 2018) and a day in New York (22nd September 2018). I assigned an instrument to each location (nylon guitar for New York and the viola for Delhi), and compressed 24 hours down to 144 seconds – i.e. 10 minutes of browser history is represented in 1 second of audio. The pitch of the note reflects how many pages were visited in this 10-minute interval (though chrome's calculation of this is questionable).

Process

  • Chrome stores browsing history as a SQLite file, at ~/Library/Application Support/Google/Chrome/Default/History. The history is also accessible through Chrome's API in the browser, but I wanted an offline version. (One needs to copy the file instead of working with the original, to prevent chrome from having a fit)
  • I opened the database with DB Browser for SQLite. I've worked with chrome's history database before, and remembered that timestamps are stored in a weird way – as the number of microseconds from 01/01/1601. This post helped me figure out how to have the timestamps converted when I query the database, so I could reliably get data for a day of my choosing. (first convert to unixepoch time, which starts at 01/01/1970, and then use sqlite's datetime function to get a human-readable timestamp)
  • I used the following query to extract a single day of usage, gathering potentially interesting bits of data from the various tables, and saved this as a csv file:
SELECT 
visits.id as visit_id,
datetime(((visits.visit_time/1000000)-11644473600), "unixepoch", "localtime") as visit_local_time,
visits.from_visit as from_visit_id,
visits.transition,
urls.typed_count,
urls.id as url_id,
urls.url as url_link,
urls.title as url_title,
urls.visit_count as url_visit_count,
segments.name as segment_name
FROM 
visits
LEFT JOIN urls on visits.url = urls.id
LEFT JOIN segments on visits.segment_id = segments.id
WHERE visit_local_time >= '2018-09-22'  AND visit_local_time < '2018-09-23'
  • I then used the sonfication example from class and extracted and modified the code as needed to create a midi file from a single day of browsing history. I tried this with a few different days, playing around with the instruments I was using, primarily translating the number of visits over a duration of time to the pitch of the note. This intro to music theory for 'hackers' helped with understanding the underlying math of music.
  • Some of the days had long stretches of no activity, so I used the following query to group page visits into 1-minute intervals :
SELECT 
visits.id as visit_id,
datetime(((visits.visit_time/1000000)-11644473600), "unixepoch", "localtime") as visit_local_time, COUNT(*) cnt,
visits.from_visit as from_visit_id,
visits.transition,
urls.typed_count,
urls.id as url_id,
urls.url as url_link,
urls.title as url_title,
urls.visit_count as url_visit_count,
segments.name as segment_name
FROM 
visits
LEFT JOIN urls on visits.url = urls.id
LEFT JOIN segments on visits.segment_id = segments.id
WHERE visit_local_time >= '2018-09-22'  AND visit_local_time < '2018-09-23'
GROUP BY strftime('%s', visit_local_time) / 60
  • The number of rows returned indicated how many 'active' minutes there were in a day – I used this figure to select two days that had well spread browser activity
DB Browser for SQLite - grouping by 1-minute intervals
  • I played around some more with combinations of instruments, tried generating chords instead of single notes, and experimented with varying the duration of the notes based on the 'transition' value (Chrome's record of how one visited a page – as a typed link / reloaded page / link from another page etc). These iterations added layers of complexity that didn't really add much to convey the feeling of the time difference, so I decided to stick to a simple page visits <-> pitch relationship.
  • I ended up with alternating notes of 2 octave of c-major scale, nylon guitar @c2 and viola @c3. Since there's still some moment of complete silence, I added a kick drum to tie the whole piece together.

Code : https://github.com/noisyneuron/which-standard-time