Google Fusion Tables


Kathryn Hurley
Developer Programs Engineer, Google
Sept 24, 2011

ONA 2011

Agenda

What is Fusion Tables?

How can you use Fusion Tables?

Demo

Interactive visualizations

Examples

What is Fusion Tables?

What is Fusion Tables?

Data management system in the cloud that allows you to store, manage, visualize, and share your data.

*

* Source: Guardian "Deprivation mapped: how you show the poorest (and richest) places in England"

What is Fusion Tables? (cont.)

How can you use Fusion Tables?

What kind of data works well with Fusion Tables?

Let's take crime data as an example

 
"CRIME_CODE","CRIMECODE_DESC","Date","Address","WEAPONTYPE"...
2407,"ANNOYING AND ACCOSTING","2011-09-17 23:53:00.000","PRINCETON ST, Boston, MA",...
803,"A&B ON POLICE OFFICER","2011-09-17 23:36:00.000","LINDEN ST, Boston, MA",...
802,"ASSAULT & BATTERY","2011-09-17 22:45:00.000","BLUE HILL AV, Boston, MA","HANDS"...
...
Source: Downloaded from the cityofboston.gov

Upload your data

Go to docs.google.com

Select Create new > Table (beta)

Upload your data (cont.)

Select the file to import

Upload your data (cont.)

Set Table Metadata and Attribution

Upload your data (cont.)

Data is imported, table created

Share your data with others

Click the Share button in the top-right corner

Location data

Fusion Tables recognizes your location data, assigns type "Location"

Highlighted yellow means it hasn't been geocoded.

View on a map

Select Visualize > Map (or bar chart, or line chart, etc.)

Fusion Tables geocodes your addresses

And creates a map!

Demo

Let's take a look at Fusion Tables

1554144

Interactive visualizations

FusionTablesLayer in the Google Maps API

FusionTablesLayer in the Google Maps API

map = new google.maps.Map(document.getElementById('map_canvas'), {
  center: new google.maps.LatLng(42.32302, -71.08841),
  zoom: 11,
  mapTypeId: google.maps.MapTypeId.ROADMAP
});

layer = new google.maps.FusionTablesLayer({
  query: {
    select: 'Address',
    from: 1554144
  },
  map: map
});
        

FusionTablesLayer in the Google Maps API (cont.)

layer.setOptions({
  query: {
    select: 'Address',
    from: tableid,
    where: "'CRIMECODE_DESC' = '" + searchString + "'"
  }
}); 
        

FusionTablesLayer Builder

http://goo.gl/hX4uo

FusionTablesLayer in the Google Maps API - Legend

http://goo.gl/i7DjI

Fusion Tables in Google Chart Tools API

Fusion Tables in Google Chart Tools API (cont.)

    
google.visualization.drawChart({
 "containerId": "visualization",
 "dataSourceUrl": "http://www.google.com/fusiontables/gvizdata?tq=",
 "query": "SELECT WEATHER,COUNT() FROM 1554144"
   + where + " GROUP BY WEATHER",
 "chartType": "PieChart",
 "options": {
   "title":"Weather"
 }
});

Fusion Tables in Google Chart Tools API (cont.)

    
function changeChart(crime) {
 where = " WHERE CRIMECODE_DESC CONTAINS '" + crime + "'";
 drawVisualization();
}

Examples

Texas Tribune

WNYC

WBUR

Edmonton Journal

Contact us

General questions:
googletables-feedback@google.com


API questions:
fusion-tables-users-group@googlegroups.com


+Kathryn Hurley, @GoogleFT


API Documentation:
code.google.com/apis/fusiontables/

Questions?