I’ve been pondering what new data sets to add to the GeoSandbox for a while now. It’s been a couple of weeks since the last addition, and I felt things were getting a little stale. Once again, a single tweet set my mind in motion. This time it was @briantimoney who said “2011 is the year tweet maps replace coffeeshop-finding as the go-to demo scenario in geo.” An RT by @billdollins cemented the statement in my head, and there was no going back after that. Obviously if the GeoSandbox is to remain the cutting-edge tool that it is, I’d have to move quickly.
All I wanted to do was to make a push-pin style map of the people who follow me on Twitter. Simple as that. I did not want to get into learning APIs and writing any kind of code, and I didn’t want to get into auto-updating, or anything like that. KISS. A little searching led to the following workflow:
MyTweeple – Export to CSV – Import to Fusion Table – Visualize on map –
Export to KML – Convert to shapefile – Put it into GeoServer.
More extensive searching might reveal a more efficient process, but this is what I came up with. From the time I first read the tweet to the point the data was in the GeoSandbox took about one hour.
My Tweeple to CSV
Once I signed into the MyTweeple site, I chose the Tools tab, and then the Export All (csv) option. This allowed me to save a csv spreadsheet containing up to 5,000 of my followers (I only have ~560). There are a lot of extraneous columns that can be done away with. All I really wanted was the name and address columns. Some sorting and editing of the address column can help out, too. Not everyone includes an address in their bio, and some have addresses that obviously won’t geocode properly. These were deleted.
Fusion Table to KML
I’ve heard a lot of talk on the inter-tubes lately about Google Fusion Tables, so I’ve been looking for something to give this new tool a test drive. This was my chance, and it did not disappoint. All I had to do was go to the Fusion Table page, select New Table>Import Table, and browse to the MyTweeple.csv file I saved earlier.
I double checked a few addresses, and then clicked on the Visualize>Map link. The geocode routine ran for a few minutes, and produced a map showing all of the people who follow me on Twitter. It was like magic.
Clicking the Export to KML link allowed me to save the KML file to my computer, where I then converted it to a shapefile (I used the KML to Layer tool in ArcToolbox, but I’m sure there are many other ways to do this). From there it was just a matter of adding the shapefile to my GeoServer as I’ve outlined in previous posts.
So there you have it. My somewhat convoluted way of showing my Twitter followers in the GeoSandbox.