Visualising twitter point data in Processing

Processing is an open-source graphic, animation and interaction generating applications which allows a code based environment for development. The example displayed in the video below visualises tweets around London and allows the user to navigate and interrogate the data.

As is evident in the video the main aspect of this code is the keyboard based interaction of the scene. Panning around the scene is available with the traditional A,W,S,D navigation scene and zooming and tilting available using ‘z’ and ‘l’.

The navigation is created through the use of the processing keyPressed() function. This code is in its own .pde file within the main sketch to simplify the sketch structure. In order to create the pan and zoom feature, the camera function is used.

Camera() function syntax:
camera(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ)

By setting both eyeX and centerX (and the same for Y) to be the same variable the camera will always remain directly above the image. Consequently by adding or subtracting from the cameraX and cameraY variable the scene appears to move.

Processing file available Here

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply