Four Ways Developers Can Use Google Fusion Tables

Guest Author, October 27th, 2010

This guest post comes from Mano Marks, lead Developer Advocate for Google Maps and Earth. He has been helping individuals and organizations integrate Google Earth, Maps and other Google developer tools into their sites for the last four years. You can follow Mano on Twitter.

Google Fusion TablesA little over a year ago, Google released a new product called Google Fusion Tables. Fusion Tables allows you to upload, merge, share, and visualize large tables of tabular data. Basically, we wanted to answer the question “I have a spreadsheet. I want to share it with people and create a map/bar chart/storyline/other visualization.” Google Spreadsheets, while powerful, couldn’t handle the 100 meg upload we allow for Fusion Tables. And, being Google, we also provided something for developers.

There are four basic ways you can integrate Fusion Tables with your web app.

First, the easy way is to embed a visualization in an iframe. There’s a link on each visualization, and it looks something like this:

<iframe width="500px" height="300px" scrolling="no" src=" col0%2Ccol1%2Ccol2%2Ccol3%2Ccol4%2Ccol5%2Ccol6%2Ccol7%2Ccol8%2Ccol9%2Ccol10 from 245609 &h=false&lat=12&lng=-144&z=2&t=1&l=col9"></iframe>

That’s pretty basic, but hardly ProgrammableWeb worthy.

A second way, more fun for developers, is the Google Fusion Tables API. Using OAuth for authentication, you can programatically interact with Fusion Tables. The API isn’t your usual Google Data API, but actually SQL-like statements issued by HTTP GET and POST. You can do basic CRUD: Create, Read, Update, and Delete operations on tables, rows, columns and views. For instance:

CREATE VIEW 'myView' AS (SELECT geometry, ex_NAME_0 AS country, ex_NAME_1 AS region FROM 265118 WHERE ex_NAME_0 contains ‘United’)

Which creates a view from a table, limiting it to only countries where the word “United” appears, and selecting only three columns.

A couple of fun notes: Creating a VIEW means that it is easy to share subsets of your data in different ways, which means that you can give edit access to only a portion of your data, limiting only certain rows and columns. Also, once you create a TABLE or VIEW, if you make it public and exportable, it is instantly available for use by others, no authentication needed.

The third way is to load it into a Google Maps API app using a FusionTablesLayer. This allows you to load a FusionTable, using a restrictive query if you want, into an existing JavaScript Map API V3 application. It also gives you access to mouse clicks on the layer, so you can capture data like the row that is being displayed and the infowindow HTML and control the output.

Finally, you can get map data as a KML file, either exporting it directly as KML or getting a NetworkLink that updates periodically, so you can capture the most recent data. You could load this into the Maps API (though the FusionTableLayer makes more sense) or you could load it into Google Earth or the Google Earth API.

Google Fusion Tables is still a new product, though we’re ramping up, especially after the transition from to The API is still in labs, too. There’s a great community ready to help with questions, and we’re actively seeking your feature requests.

Both comments and pings are currently closed.

4 Responses to “Four Ways Developers Can Use Google Fusion Tables”

December 1st, 2010
at 2:53 pm
Comment by: Google Evolves Spatial Offerings with Fusion Tables | It's All About Data

[...] and easy to use. If you’re interested in more information about developing for Fusion Tables, this post from ProgrammableWeb gives a clear overview, or you can check out five samples from Google of what [...]

December 18th, 2010
at 1:22 pm
Comment by: Ahmed

You can use CaroView for the Google cloud to create and publish your custom online map and your geo data in the Google app engine cloud
CaroView is Opensource

- Configure, author and publish your map from the browser, no programming required
- Render your Geodata from Google fusion Tables and external sources (GeoRSS, KML, ArcGIS Server)
- Select from a large number of plugins to use in your map: twitter, yelp, events, weather and much more
or you can test on

February 17th, 2012
at 2:11 pm
Comment by: johny why

hi, is there any way to link a fusion table to an external kml feed? Specifically, i need to filter a live kml link which returns too many locations for my mapping app. thanks!

February 17th, 2012
at 2:22 pm
Comment by: Mano Marks

@johnwhy, no Fusion Tables can’t consume NetworkLinks from KML. However, you could use the Fusion Tables API to load live data in. You would need to have a server set-up to consume the KML, turn it into data and the post that data to Fusion Tables using the API:

Follow the PW team on Twitter

APIs, mashups and code. Because the world's your programmable oyster.

John Musser
Founder, ProgrammableWeb

Adam DuVander
Executive Editor, ProgrammableWeb. Author, Map Scripting 101. Lover, APIs.