Tutorial: Grabbing Data Using Google refine to Create Interactive Maps

When you think of creating a map which shows different locations, your first step must be getting langitude and longitude. Throughout Google refineavailable here– you can clean data and then, using a service as CartoDB, create an interactive map.

Google and Open Street Map offer free APIs

The video above -made by myself- talks about the importance of the Application Program Interface (API). This service is run by companies such as Google and Open Street Map, who provide free software. In brief, APIs are a type of database that we call to grab geocoding data.

In Google refine, a spreadsheet cleaner, we request latitude and longitude. The function we need is not always the same. It depends on the software:

For Google’s API:

"http://maps.googleapis.com/maps/api/geocode/json?&sensor=false&address=" + escape(value, "URL")

For Open Street Map’s API:

"http://nominatim.openstreetmap.org/search?" + "format=json&" + "q=" + escape(value, "url")

CartoDB and Google Fusion Tables

CartoDB is just one of many services in which you can change your spreadsheets into interactive maps. You may have problems trying to embed these maps using WordPress.

Some of the dirtiest restaurants in Birmingham. Source: Food Standards Agency

CLICK ON IT: Some of the dirtiest restaurants in Birmingham. Source: Food Standards Agency

Google Fusion Tables is probably the simplest one but also the more used app as well. In fact, you do not need any geocoding data, because the location is enough for this app.

CLICK ON IT. Source: Food Standards Agency

CLICK ON IT. Source: Food Standards Agency