Thursday, 20 December 2012

Google Fusion Tables Info Windows

A short post today related to info windows for Google Fusion Tables maps. In case you didn't know, an info window is what pops up when you click on an area of a Google map - as shown below. I've blogged about this in the past and today am sharing some more tips in relation to how to get a Google Street View snapshot of an area to appear in the info window. I just added this in to my new SIMD website.

This page tells you how to add a Street View snapshot and there isn't really much to it. You just need to make sure you have an API console key (baffled? see this for how to get one) which is just a key code that you need to make it work.  All you need to get one is a Google account. The other thing you'll need is two columns in your table specifying a latitude and longitude. I do this in ArcGIS before importing the data into Fusion Tables. Once you've done this you can add in the Street View code to the Fusion Tables info window layout (via Tools, Change info window layout... as below) and then add in the code via the Custom tab.

I've added in an Employment page to my new SIMD site where this is all put into practice - I have an info window chart, some data and a Google Street View snapshot in it, plus some text. Here's the code that makes it work - I'm certainly not a coding expert so apologies if it is a bit messy. If you're into this kind of thing, I hope you find it useful. 

You can change the dimensions from 400x400 to whatever you like. The curly brackets specify which column the lat/long comes from so you will need to make sure that this matches the name of your lat/long columns.

The only downside to this is that the image it displays is fairly random and not always representative of the area people click on. Sometimes, no image is available.

Tuesday, 18 December 2012

SIMD2012 - An Interactive Website

With the release of the latest version of the Scottish Index of Multiple Deprivation I thought I would take the time to put together an interactive mapping website so that people who are interested in exploring spatial patterns of deprivation could easily interact with the data. The official Scottish Government interactive mapping site has some nice features but I find it a bit cumbersome and the map interface is too small for my liking so that's why I've produced my own version, based on Google Fusion Tables.

Putting this together has prompted me to develop some additional mapping tools using Fusion Tables code and these can be accessed via the 'Tools' tab on the new website. The 'search and zoom' allows you to enter a place you want to look for and when you hit 'Search' the map immediately pans and zooms to that location.   The other tool I've created simply lets you turn the SIMD map layer on and off, which is quite a useful feature.

I've just looked at the relative ranks of places within Scotland in this site. For details of absolute change you can see the employment and income domain data available from the new SIMD 2012 website.