1 / 17

Google Fusion Tables API

Google Fusion Tables API. Inneke Ponet. Google Fusion Tables. Google Fusion Tables: S tore, share, query and visualize data. API to run SQL-like queries  applications that use Fusion Tables as a database. Writing an application. Send API statements to Goolge Fusion Tables:

makaio
Download Presentation

Google Fusion Tables API

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Google Fusion Tables API Inneke Ponet

  2. Google Fusion Tables Google Fusion Tables: • Store, share, query and visualize data. • API to run SQL-like queries applications that use Fusion Tables as a database.

  3. Writinganapplication • Send API statements to Goolge Fusion Tables: • queries: HTTP GET requests; • inserts, updates and deletes: HTTP POST requests. • The API is language agnostic. • It doesn’t have a mechanism for submitting the GET and POST requests.  Use existing code libraries (Java, Javascript, .NET, PHP, Python, Objective-C).

  4. Query example • Exploring tables • https://www.google.com/fusiontables/api/query?sql=SHOW TABLES tableid,name 274409,StoreInventory https://www.google.com/fusiontables/api/query?sql=DESCRIBE 274409 column id,name,type col0,Product,string col1,Inventory,number

  5. Fusion Tables with other APIs • Google Maps API • Fusion Tables Layer • Google Chart Tools • Data source

  6. Google Maps • Geographic data in a Fusion Table: • Geocode of a street address, a name of a city, a name of a country; • latitude, longitude pair; • KML. • FusionTablesLayer: • interface to a Fusion Table, • automatic rendering of the location data, • clickable overlays.

  7. Example Google Maps var chicago = new google.maps.LatLng(41.948766, -87.691497);map = new google.maps.Map(document.getElementById('map_canvas'), {center: chicago, zoom: 12,mapTypeId: 'roadmap'});var layer = new google.maps.FusionTablesLayer({ query: { select: 'address',from: '198945',where: 'ridership > 5000' }});layer.setMap(map);

  8. Example Google Maps

  9. http://www.mtbguru.com/

  10. Google Chart Tool

  11. Example Google Chart google.load('visualization', '1', {'packages':['corechart']}); functionchangeData() { var queryText = encodeURIComponent( "SELECT Year, Austria, Bulgaria, Denmark, Greece FROM 641716"); var query = new google.visualization.Query( 'http://www.google.com/fusiontables/gvizdata?tq=' + queryText); query.send(getData); } functiongetData(response) { new google.visualization.BarChart(document.getElementById('visualization')). draw(response.getDataTable(), {title:"Yearly Coffee Consumptionby Country", width:600, height:400, vAxis: {title: "Year"}, hAxis: {title: "Cups"}} ); }

  12. Example Google Chart

  13. Example Google Chart 2 google.load('visualization', '1'); functionloadData(year) { var queryText = encodeURIComponent( "SELECT 'Male name', 'Reverse rank‘ FROM 642040 WHERE year = '" + year + "‘ ORDER BY 'Male name'"); var query = new google.visualization.Query( 'http://www.google.com/fusiontables/gvizdata?tq=' + queryText); query.send(getData); } functiongetData(response) { var outputDiv = document.getElementById('visualization'); var tc = new TermCloud(outputDiv); tc.draw(response.getDataTable(), null); }

  14. Example Google Chart 2

  15. Example Fusion Tables http://www.google.com/fusiontables/DataSource?dsrcid=851292 <iframe width="500px" height="300px" scrolling="no" src="http://www.google.com/fusiontables/embedviz?viz=MAP&q=select+col0%2C+col1%2C+col2%2C+col3+from+851292+&h=false&lat=51.020456&lng=4.899438550000001&z=10&t=1&l=col2"></iframe>

  16. Example Fusion Tables

  17. Fusion Tables in other applications • Custom applications (HTTP GET and POST). • Google Maps with FusionTableLayer. • Google Chart and Fusion Tables as data source. • Visualization in an HTML page.

More Related