So (what now seems an age ago) I took my annual holiday, and went back (for the 5th time) to my favorite country…India.
While digging out the back-pack from the back of the wardrobe, I came across our stash of photo’s…about 5 albums of old holidays, and a huge box of photos in the pending/holding-queue! (this will mean nothing to anyone under 30, who may never have owned a physical photograph 😀 ). I also have copious amounts of pen-drives, hard-drives and clouds of other holiday photos, which rarely get an outing. So while we were away…travelling about, having a wicked time, taking snaps I was trying to think of a better way to create a holiday album, that was fun, engaging, and would capture the experience. So it got me thinking…Photos (and their meta-data) are data, our route path could be captured as long/lat nodes, Tableau makes data fun and engaging…
so I created Our Indian Advizture* 🙂 …
*Credit to my fellow Tableau Ambassador, Toby Erkson, for the name….after this post, all naming-rights on the Advizture brand, will be transferred back to the creator! 😉 )
As I was thinking through the data I’d need, the structure, grain …etc it became apparent that this was quite a repeatable process (so could be replicated for any holiday), and I also found some handy little tech solutions for getting the data I needed, so thought I’d share my experience and findings…Although I used Alteryx to bash files together, add a few calculations…etc. this was purely for ease/speed and could have done it in Excel, without too much extra trouble. I’d also like to share my design thoughts, if for no other reason that I can talk about one of my fave subjects….flags!!
So we traveled around quite a bit, on a variety of different forms of transport, so I wanted to get the route nodes of the routes we took…I was messing about with some Indian Railway shapefiles, when I came across this awesome (and very easy to use) site that let you grab (in a downloadable text file) the route-points of any Google Map route! gps visualizer. As Google Maps have all railway, bus and (using waypoints) any driven route, I was able create all my routes from here…
Simply type the route from-to, select the transport mode, select your train…and copy the URL. Then go to gps visualizer and copy it in
and hit convert….and voila 🙂
So I did this for each of my routes, and appended them together in Alteryx (could have copied and pasted into a single Excel, or used Tableau 9.3’s new, and very nifty, Union feature…there was a great Think Data Thursday video on all things union that is well worth a watch).
So that’s my routes, but I now want a way to select a destination, and see the photos from that place. The most natural UI for this seemed to be a map. I know that my photos all have GPS in their meta-data, which leads me onto my next tech find. I though I was going to have to manually grab this from each photo, but no!…step in ExifTool (if you can’t follow from the instructions from the link, there’s less geeky how-to here). In short, download the utility/tool, point it at your folder of photos, type in “exiftool -csv -filename -imagesize -gps:GPSLatitude -gps:GPSLongitude ./ > long.csv” hit enter, and….
I now have a file with all my photos and GPS.
So I now have a datasource at the route/point-path grain, the Route Data
(I’ve also added a ‘Last Path Indicator’, so the row that represents the final point of a route is marked. I can then pick that up as my destination, and with some careful naming becomes my blend-field, so I can move from route map to photos)
I also wanted to add a few in-transit photos (which I did via custom shapes), and some other points of interest, so created manually a simple tab, where I can join via specific Route/RecordID’s to populate the rows where I wanted these to appear)
Route Data – Extra
and the other datasource at the photo grain, Destination Photo Data
Destination Photo Data
I hosted the photos on Google Photos and then grabbed the image URL
To make life easier (and to account for the fact I have portrait, square and landscape images, and don’t have responsive control over the Tableau web-viewer object) I mounted all my photos onto a single-sized Indian flag. Within the Google Photo image address, is the size you want it returned as (at the end of the URL string). I played with this, so every image was returned at the same size, and so fits (without scroll-bars) into the Tableau web-viewer object.
From here the actual build was fairly easy. Like all projects, time spent up-front thinking about the data grain/shape is got back, 10 fold, when we get to the Tableau part!. I created a map of my routes (just a line mark, using the RecordID on path), and then created the Destination Map (where you can view the photos) and created a blend field, so we can use the Route Map to select the destination….there is a little more to it, but that’s basically it.
As discussed previously, the viz elements (maps and web-viewer for photos) seemed the best choice for what I am trying to achieve. In terms of colour pallet, for a Viz about India…the Indian flag appeared the obvious choice. National flags (in particular) generally provide a pretty good pallet, and are especially relevant if your viz is about that country. Unlike State/City flags, which are a bit of a mixed bag, most national flags it seems (being on the national stage) are well designed, using really good pallets. Flags (well good flags) actually encompass many of the best design principles…the below (excellent) video, from Roman Mars, on the art of Vexillology (the study of flags) explains this far better than me.
Warning…watching this video will leave you obsessed with your state/city flag, and unless you live in Amsterdam (where you flag rocks!), you will be onto your city hall for a re-design!
Improvements (If I had the time/tech!)
Like all good trips round India, it comes with a good dose of self reflection/evaluation!…so in that spirit, there is one thing I think could really improve my viz…To use non-default maps. Firstly I want to say that I love Tableau’s default maps…if I had to pick a single map, to be the jack-of-all trades (that is the life of the Tableau map), I couldn’t think of a better one. However, I think the colour pallet and subject (and general feel) would have suited an older style map (not quite a “There be dragons”, but something a little more hand-drawn), and for the Photo-selector it’s got to be a satellite map. Some of the places were so beautiful that I think the photo-selector would be really enhanced if you had something more google-earthy. I’m really keen to try out MapBox, especially after getting this tech leg-up courtesy of (another fellow Ambassador), who has shared his how-to’s/do’s/don’t from several week deep in MapBox in this fantastic 3 part post…Bill Lyon’s creating satellite background map in MapBox Part 1 Part 2 Part 3
Hope you enjoy my Advizture, half as much as I enjoyed the real thing 🙂
You can find the final version on Tableau Public, where you can also download it (NB. due to re-sizing issues on the web-object, if you download it there is a DT tab, which looks much better when using Tableau viewer/desktop)