Tunesquare

A recent project of mine has been the development of a small python program called Tunesquare. Tunesquare creates an aural representation of a foursquare user’s entire check-in history. I was motivated to start this project while searching the web for a good check-in visualization tool. After WeePlaces stopped supporting foursquare check-ins, I was looking for a good website to view my foursquare check-ins on a map 1. It occurred to me that while tons of apps built around the foursquare API visualize a user’s check-in history, no one had attempted to create a non-visual representation of the data. Tunesquare does just that. Given a user’s check-in history, the program creates a sequence of MIDI notes whose length and pitch are determined by the latitude and longitude of the user’s check-ins 2. For interested parties, a rough version of the program is included below (along with a few notes for myself).

Tunesquare 0.1
Developed by Dave Holtz
Dependencies: numpy, Foursquare (A python wrapper for the Foursquare API), tkSnack
Things that need to be done:
– Envelope the sine wave to eliminate clipping.
– Fine-tune the use of the longitude and latitude for better musicality.
– Integrate into a web interface.
– Add map visualization (possibly with Google Maps).

While the application will eventually live within a web interface, for now you can still download it and run it from the command line. Here’s a brief tutorial of how to do that. From the command line, you can call tunesquare like you would any other python script.

python tunesquare.py














Once you provide your foursquare log-in information, the command line should produce the following prompt:

Code Returned in Redirect (Check Browser): 














A browser window will also have opened itself, and its from here that you want to grab the code to feed the command line. An example is seen in the image below.

The code required in Tunesquare
The code you should copy into your command line.

The rest is totally straightforward. TuneSquare should produce the MIDI aural representation of your Foursquare check-in history.

Notes:

  1. Incidentally, 4sqmap is great for this.
  2. Tunesquare goes through the notes sequentially, with each note corresponding to one check-in.

Leave a Reply

Your email address will not be published. Required fields are marked *