Skip to content

fusiontables

Fanchao Zhou edited this page Feb 7, 2016 · 52 revisions

Google Fusion Tables

Google Fusion Tables (shortened as Fusion Tables) is a web app developed by Google in 2009. It's a tool for data management, visualization and sharing. Fusion Tables has two interfaces:

  • The Graphic Interface for Web Users
  • The API for Programmers

For Web Users:

You can have a basic ideas about Fusion Tables Here: Help Page for Fusion Tables.

Basically, Fusion Tables allows you to:

  • Find public data
  • Import your own data(CSV, KML, ODS, XLS, or Google Spreadsheets)
  • Manage your data
  • Visualize your data
  • Merge two tables
  • Share your data

To Find Public Data, go to Fusion Tables Public Data. Example: Starbucks Locations

Creating A Fusion Table

  1. Log in your google account(Better NOT be your A&M account).

  2. Open your Google Drive.

  3. In the sidebar on the left, click on "New->More->Connect More Apps"

  4. Search for Fusion Tables, click on "Connect"

  5. Now, again in the left sidebar, click on "New->More->Google Fusion Tables(A green icon with a white zigzagging line through it)"

  6. Choose one of the three options to create a new table.

Critical Concepts about a Fusion Table:

  • Table ID(Unique ID number of a table)
  1. In the menu, click on "file->about this table"

  2. The last entry is the table ID.

  • Access Control
  1. Click on "file->share"

  2. By default, a table is private at first-only the creator can access this table. To invite more editors, Type in the names or email addresses to be invited.

  3. To change the access settings, click on "change..." below "Who can access".

  • Table Management
  1. Edit Columns and Rows

  2. Add a new visualization style

  3. Merge two tables or Create a View(A subset of a table)

For Programmers:

It takes several steps to create a project, and interact with Fusion Tables in Java.

Acquiring and using a client ID

Every request your application sends to the Fusion Tables API needs to identify your application to Google.

If the request requires authorization (such as a request for an individual's private data), then the application must provide an OAuth 2.0 token with the request.

If the request doesn't require authorization (such as a request for public data), then the application must provide either the API key or an OAuth 2.0 token, or both—whatever option is most convenient for you.

So, OAuth 2.0 token works in both cases. Let's use the token!

To get an OAuth 2.0 token(https://developers.google.com/fusiontables/docs/v2/using#auth):

  1. Login your Google Account(Better NOT be your A&M account).

  2. Go to the Google Developers Console.

  3. In the top bar, Click on "Select a project". Then, in the dropdown menu, click on "Create a project...". Type in the project name, and create a project.

  4. Now, in the dashboard, click on the box "Use Google APIs". Then, in the left sidebar, choose "Overview". Then, search for "Fusion Tables". Select the only result, and click on "Enable API".

  5. In the left sidebar, choose "Credentials". Then, in the menu on the top, choose "OAuth consent screen". Type in your email address and the name of the project. Scroll down to the bottom and click on "Save".

  6. Now, in the top menu, choose "Credentials". Click on "New Credentials". In the dropdown menu, choose "OAuth Client ID".

  7. What to do next depends on the application type:

  • For a Java App: Choose the type "Other", and type in a name for the project. Click on "Create".

  • For an Android App: There is an additional step: Getting your package name and SHA-1 fingerprint.

https://developers.google.com/fusiontables/docs/v2/using#installed-applications

https://support.google.com/cloud/answer/6158849?hl=en#android

Using Fusion Tables in a Java project

First, download the Fusion Tables API(version 2) Client Library for Java from: https://developers.google.com/api-client-library/java/apis/fusiontables/v2

Learning the basic syntax

First, it's necessary to know the basic concepts in Fusion Tables: https://developers.google.com/fusiontables/docs/v2/getting_started#background-concepts

The Google Fusion Tables API v2.0 supports these approaches to sending requests to the Fusion Tables server:

Regardless of which you use, the URI starts with: "https://www.googleapis.com/fusiontables/v2"

  • Using REST for tables, columns, styles, and templates

Format: https://www.googleapis.com/fusiontables/v2/resourceID?parameters

  • Using SQL for rows

Format: https://www.googleapis.com/fusiontables/v2/query?sql=query, where query is a valid SQL query.

Details on Syntax in Fusion Tables:

Basic Operations: https://developers.google.com/fusiontables/docs/v2/getting_started#background-operations

More Details on the Basic Operations: https://developers.google.com/fusiontables/docs/v2/using#WorkingTables

References: https://developers.google.com/fusiontables/docs/v2/reference/

Useful Links

Help Page for Fusion Tables

Fusion Tables Public Data

Google Developers Console

OAuth 2.0 token

Getting a client ID for an Android App

Fusion Tables API Guidance

Fusion Tables API in Java

Clone this wiki locally