Title: Managing and Visualizing your Geospatial Data with Fusion Tables
Hashtags: #io2011 #Geo
Feedback: http://goo.gl/79Lvg
Kathryn Hurley, James McGill
Guest Speaker: Simon Rogers, Guardian Datablog
May 10, 2011
A database in the cloud used to store and visualize your data
** Source: Guardian "Deprivation mapped: how you show the poorest (and richest) places in England"
Using Google Chart Tools to Create Interactive Dashboards
May 10, 02:30PM – 03:30PM / Room 1
CREATE TABLE newspapers (name: STRING, location: LOCATION, link: STRING)
INSERT INTO 123456 (name, location, link) VALUES ('NYT', 'New York', 'nyt.com')
SELECT * FROM 123456 WHERE name = 'NYT'
UPDATE 123456 SET location = 'New York, NY' WHERE ROWID = '301'
query = 'CREATE TABLE newspapers (name: STRING, location: LOCATION, link: STRING)'
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
}
serv_req = urllib2.Request(
url='https://www.google.com/fusiontables/api/query',
data=urllib.urlencode({'sql': query}),
headers=headers)
//returns tableid if successful
tableid = urllib2.urlopen(serv_req)
*Authorization steps omitted
Now launching to trusted testers
Sign up here:
fusion-tables-api-trusted-testers@googlegroups.com
{
...
"tableId": 12345,
"markerOptions": {
"iconName": "small-blue"
}
...
}

Sign up here:
fusion-tables-api-trusted-testers@googlegroups.com
var layer = new FusionTablesLayer({
select: 'column',
from: 200949,
});
layer.setMap(map);

var layer = new FusionTablesLayer({
select: 'column',
from: 12345,
where: "Age > 50"
});
var layer = new FusionTablesLayer({
query: {
select: 'column',
from: 12345,
},
suppressInfoWindows: true
});
google.maps.event.addListener(layer, 'click', doSomethingCool);

var layer = new FusionTablesLayer({
query: {
select: 'geometry',
from: 815230,
},
styles: [{
polygonOptions: {
fillColor: "#00FF00"
}
}]
});
var layer = new FusionTablesLayer({
...
{
where: "bird_species > 300",
polygonOptions: {
fillColor: "#0000FF"
}
}]
});
var layer = new FusionTablesLayer({
...
{
where: "population > 5", /* People per km² */
polygonOptions: {
fillOpacity: 1.0
}
}]
});
var newStyle = {
where: 'plant_species > 1000',
polygonOptions: {
fillColor: "#FF0000"
}
};
function updateStyle() {
// Replace one existing style.
var oldStyles = layer.get('styles');
oldStyles[1] = newStyle;
layer.set('style', oldStyles);
}
google.maps.event.addDomListener(
document.getElementById('some_button'),
'click',
updateStyle);
var layer = new FusionTablesLayer({
query: {
select: 'column',
from: 12345,
where: "bird_species < 100"
},
styles: [{
where: "bird_species > 100",
polyline: {
strokeColor: "#FF0000",
}
}]
});
