W7 – Mapping Twitter Data

I have always been fascinated with web mapping, so this week’s readings were particularly interesting. I really enjoyed the presentation of Alan McConchie and Beth Schechter’s, “Anatomy of a Web Map.” It’s interesting to see the progression of web maps from static images to interactive tile-based layers to multi-level data-driven interfaces for exploring the world. I have seen maps load tiles before, but I was surprised to learn that these are raster images. I had always assumed maps used vector tiles for scalability. I was also impressed by the amount of free and open source tools, libraries, and Application Programming Interfaces (APIs) available. The level of customization achieved through Stamen and TileMill is incredible. My favorite custom tile sets include “Ísland” by Konstantin Käfer, “Shadow Play” by Tom MacWright, and “Baltimore Retro” by Mapbox. I would love to build a custom tile set if I had the time and resources.

This week’s readings also appealed to me because I am building a custom map for my group’s final project. My first mapping idea for our topic, Food Trucks of LA, involved GPS tracking devices on food trucks. However, GPS devices are too expensive to supply each truck with their own device and there is little value in tracking only one or two at a time. Although most food trucks have regular schedules, they communicate their location to followers via social media (primarily twitter). The various Twitter APIs are free to use and well documented, so some kind of Twitter-Google Maps mashup seemed appropriate for our small budget project. I couldn’t find any mapping tools online that supported twitter data, so I asked Miriam. She recommended I speak with Yoh Kawano, campus GIS coordinator and member of the Digital Humanities Collaborative at UCLA. Yoh’s project “Mapping Twitter” ( http://gis.ats.ucla.edu/sandbox/maptwitter/ ) was very close to how I had envisioned my food truck map to work. It displays the “what and where” of Twitter via Google Maps API and real-time Twitter data. After meeting with Yoh, he agreed to help me make my map and graciously offered to share his code with me. The main difference between our maps is how the twitter search function works. Yoh’s site uses keywords to search all tweets within a user-defined radius while my data is restricted to only the most recent tweets from a list of popular food trucks in LA. Yoh’s code includes custom JavaScript functions that parse and display the JSONs (JavaScript Object Notation) returned by PHP (PHP: Hypertext Preprocessor) queries to Twitter. I have been tweaking Yoh’s user search function to display the location of each food truck tweet. The biggest challenge so far is that less than 1% of all tweets are made on geo-enabled devices. An even smaller portion of these geo-tagged tweets is made from the trucks’ actual location and not in-route. Further testing is needed to assess the feasibility of using geo.coords to track the locations of food trucks in LA.