clairemiller.net

Putting it on a map – Google, BatchGeo and Fusion Tables

| 11 Comments

Having posted recently about ways to combine Google Fusion maps or add basic postcode search (I’m going to revisit this one soon) I kind of forgot to write a post covering the basics.

I’m pretty convinced that people mainly care about how a story is relevant to them and where they live so being able to break information down to small areas and put it on a map is really handy.

Having spent some (actually, quite a lot of) time trying to put some maps together, these are the things I’ve found work quite well depending on what info you have and what you want to do with it.

For more tips and ideas on working with data, buy Get Started with Data Journalism

Simple maps

Let’s grab some data to get started, I’m going for dentists in Cardiff and Vale (because it’s useful and fairly easy to find)

Go here and then copy and paste the table into a spreadsheet programme, and perform a bit of tidying – you’ll need to delete the ticks and area headings and add a some column headers.

Much better.

(Can’t be bothered to organise the data, just grab the above .xls file: Dentists)

Most basic way of mapping things is to create a basic Google map and start adding points.

First log in to your Google account and open maps. Then click on My Places and Create Map.

You can now give your map a title and description before you start adding the points.

There are two ways to add points:

–          Zoom to where you want to add a mark, then click on the add placemark button, then drop the marker where you want it.

–          Or if you’re not quite sure where the marker should go, put the location in the top bar to search for it first, then add the marker as above.

Add in your pin name and description, fiddle about with the styles and you’re on your way to a lovely map.

Click the link (looks like a small chain) icon to get the embed code (make sure the map is set to public first).

As you will quickly realise this is not very efficient, fine if you’re working with a small amount of data but not for anything large scale, we need something better.

Making maps with lots of points

The easiest way is just to feed the data into a website that does all the work for you. One example in BatchGeo.

Handily the site is really easy to follow, with plenty of step by step instructions.

Go to the website and copy and paste your data table into the box.

Click Validate and Set Options to set the location column and style the info box (what I have failed to do here is set a title column which will generate the pin’s title, I’d recommend doing that). You can also chose to group pins in categories.

Once you’re happy with the options, just click Make Google Map and it will do all the work.

Once done it will tell if it’s managed to geocode all the pins and give you the opportunity to drag any that are in the wrong place to the right spot.

Once you’re done, the site will email you with your embed code. You can also download the kml file (geographic file) for the map by scrolling to the bottom of the page.

Fusion Tables

Unfortunately, I can’t embed BatchGeo maps in the work website and importing the kml into Google Maps hits the display limits (you can only have so many points on a page).

Mapping solution: Google Fusion Tables

Firstly save your data table as a csv (especially if it’s big) or xls file.

Then open up Google, sign in and go to Documents. Click the create link on the right and pick Table and follow the instructions to upload your file.

When uploading you need to have just the first row as column headings, so make sure you shrink them down first.

Once your table is all loaded up, you can map it. First you need to make sure you’re using the address to find location, go to Edit and Modify Columns and check that the address column has the type location.

Once you’ve checked that, you can go to Visualise, then Map to see the points on a map. It will probably take a few seconds to visualise.

If you’re lucky everything will be in the right place (or at least appear to be).

You can also customise the markers. Before uploading (yes, should have said this earlier) you need to add a column named Marker (or something similarly self-explanatory) and fill it in with the names of markers, which can be found here (click on one to get its name).

I’ve decided to highlight the dentists still taking NHS patients in a different colour marker to make them stand out. Re-upload your spreadsheet with marker column.

Switch back to the map view. Click Configure styles on the top row and you get the option to customise the markers, The first tab gives you the option to change all the markers to the same thing.

The second lets you use the data in one of the columns to customise the markers. Select this one and chose the Marker column from the drop down menu and click save.

The third tab lets you set different markers for groups of numbers, e.g. items with a value of 1 to 5 are red, those with values 6-10, green.

Last thing to do is customise the info window you see when you click on a marker.

Click Configue info window on the top line. The first tab will lets you select which items to display in a simple column title: data format.

The custom tab allows you to write html using data points, just write your code and where you want the relevant item of data to appear, click the name on the left.

For this map, I think we’ll keep it simple and just get rid of the marker column, swap the telephone number to under address and make it italic. Save, then click Share in the top right corner to make public and shareable, and your map is done.

11 Comments

  1. Thanks for this, it’s very clear and one day may be useful for me

  2. Pingback: Putting it on a map – Longitudes and Latitudes | clairemiller.net

  3. Thank you so very much for putting this in simple terms and not having to use Batchgeo is a bonus!

  4. Yes – thanks for this! Forgot how to do all the fusion table stuff.

  5. Thank you! I feared hours of research to figure this out and came across your site first – and you solved my problem immediately!

  6. Thank you for posting this. Do you know of a relatively easy way to make the map searchable by latitude and longitude?

    • I’m not sure there’s a relatively easy way to do it, the only way I’ve been able to make searches work is by borrowing code from sites where they have a searchable google map set up and then adapting that.

  7. It is possible to use it inside an iframe? I am trying to show it in Joomla wrapper, but it does not works 🙁

  8. You can check our SVB Mapper at http://www.svbgroup.com.au – It is an excel add in downloadable from the site. Free for initial use and if you have small set of data. You can do all the filtering etc and cool icons in excel. You can also draw polygons around points and analyse the stats ….

  9. Those are some great tools for making maps. There is another great one for mapping spreadsheet data, EasyMapMaker.com.

    It’s free and has lots of great features, including data exporting, filtering (distance and user defined data), custom descriptions, maker labeling, and so much more. It’s the easiest way to make the most complex map from your spreadsheet data.

Leave a Reply

Required fields are marked *.