Visualizing with TileMill

While browsing through the the schedule for Open Data Camp 4, I came across and etherpad entry containing details of the ‘Data and Maps’ crash course on Day 2.

Tilemill (by Mapbox)fascinated me and I downloaded and installed it. It has a wonderful crashcourse to introduce beginners to the map designing scene. The Map styling is done using CartoCss which is similar to CSS. The interface has layers like Photoshop and good import and export features(Mapbox free accounts offer 3000 map views/month and 50 MB space). Poking around in the documentation provided you will be able to locate data set sources, shape files and how to import data.

Below I shall explain how I went about re-doing a class assignment using TileMill.

Earlier this semester we played around with Processing to visualize data sets. I decided to try visualizing a data set that I had prepared earlier. Not knowing any way to scrape data off a website, I had manually collected the statewise distribution of the US olympians by birth(excluding/clubbing athletes of foreign origin).

Before I could use the data, I had to geocode the data. To do this I first uploaded my Excel sheet to Google Drive and then installed a script (Tools > Script Gallery > Search 'Geo' > Install 'Geo' by . This helps convert addresses into lat, long values which TileMill can identify. I used Mapquest to convert for me and it was far from satisfactory, maybe the Yahoo provider would work better. I then used Google Map to manually get the co-ordinates. Alternatively you could use GetLatLong to get/verify co-ordinates.

Next I published the datasheet on the web via Drive (inbuilt) and used the csv format as a datasource for a layer in Tilemill.

I also used the US State border line shape file provided by the US Census.

With a bit of tweaking with the CartoCss, I was able to come up with a fairly decent looking visualization with minimal interactivity.

Statewise distribution of US Olympians 2012 (excluding foreign born)
Statewise distribution of US Olympians 2012 (excluding foreign born US Citizens)

Do feel free to critique the visualization choices so that I can improve them. This was an experiment to see how TileMill works and what I can do with it.

Disclaimer: There could be a manual error when I created the data set hence I am not linking the dataset here.

Update: Here’s a more detailed tutorial for beginners.


Author: iNOsaint

Inosaint. The Evil Genius. The Mad Hunter. I go by many names!

2 thoughts on “Visualizing with TileMill”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s