def createTable(self): query ='CREATE TABLE mytable (name: STRING, result: NUMBER)' encoded_query = urllib.urlencode({'sql' : query}) headers = {'Authorization' :'GoogleLogin auth=' + self.auth_token,'Content-Type' :'application/x-www-form-urlencoded' , } serv_req = urllib2.Request(url='https://www.google.com/fusiontables/api/query' , data=encoded_query, headers=headers) serv_resp = urllib2.urlopen(serv_req) return serv_resp.read()
CREATE TABLE mytable (name: STRING, result: NUMBER)
INSERT INTO 123456 (name, result) VALUES ('Kat', 12)
SELECT * FROM 123456 WHERE name = 'Kat'
UPDATE 123456 SET result = 13 WHERE ROWID = '301'
DELETE FROM 123456
DROP TABLE 123456
Find other tables to merge with
map = new google.maps.Map(document.getElementById('map_canvas' ), { center: new google.maps.LatLng(35.5 ,-122.2 ), zoom:10 , mapTypeId: google.maps.MapTypeId.ROADMAP }); layer = new google.maps.FusionTablesLayer(123456 , { map: map, query:'SELECT Lat FROM 123456 WHERE result > 12' });
http://code.google.com/apis/maps/documentation/javascript/overlays.html#FusionTables
functionhttp://code.google.com/apis/charttools/index.htmlchangeData () { var query ="SELECT Year, Austria, Bulgaria, Denmark, Greece FROM 641716" ; query = encodeURIComponent(query); query ="http://www.google.com/fusiontables/gvizdata?tq=" + query query = new google.visualization.Query(query); query.send(getData); } functiongetData (response) { new google.visualization.BarChart(document.getElementById("visualization" )). draw(response.getDataTable(), {title:"Yearly Coffee Consumption by Country" , width:600 , height:400 , vAxis: {title:"Year" }, hAxis: {title:"Cups" } }); }
Source: WikiEDData
Available with a Maps Premier License