On May 21, the Obama administration launched Data.gov, a web site that provides access to raw data from federal government agencies. Access to this raw data is useful, but to unleash the power of the data, you need tools for visualizing it. Today, we're going to show you how to use Google Fusion Tables to visualize and analyze data from Data.gov. Fusion Tables, which we launched in Google Labs in June, is a system for managing data in the cloud, combining powerful features of desktop database systems with easy-to-use collaboration tools. You can read more about it on the Google Research Blog.

Before we start with Fusion Tables, let's find a data set from Data.gov to use. Go to the Data.gov Raw Data Catalog and enter some keywords to find data you're interested in. I'm interested in recent earthquakes. Make sure you select the "CSV/Text" file type - we need data in that format to be able to load it into Fusion Tables.


An important note here is that while Data.gov does a great job linking to data available from government agencies, the data can be formatted inconsistently because it's coming from many sources, and this can sometimes make it more difficult to use. For example, some data files marked as "CSV/Text" are downloadable only as self-extracting .exe files, which won't work for people using Mac OS or Linux. We hope that as Data.gov continues to grow, they'll work to ensure that not only is data available through the site, but that it's also made available in as many formats that are accessible by as many people as possible. For now, though, check to make sure that the data you're downloading is in straight .csv format.

Once you've conducted your search, locate the data you want to use. Right click on the green "CSV" button and use "Save File As..." to download the file to your computer. Make sure to name it with a .csv extension.


Now we're ready to load the data into Fusion Tables. Sign in and click on "New Table", then browse for the .csv file you just downloaded from Data.gov. Go through the next few screens until you finish the import dialog, and you'll see the data displayed in a table.


In this form, the data still isn't all that useful, but we can use Fusion Tables to look at it in a more interesting format. Click "Visualize" and then "Map", and you'll see the data placed onto a Google Map, which you can drag and zoom to look at specific regions. For the earthquake data, the map is showing markers where earthquakes have occurred in the past 7 days. Clicking on any marker will bring up details from the data about that item.


Another option is to visualize as an "Intensity Map". By selecting "Magnitude" as the Value and to plot Markers, we get a map where the markers have sizes relative to the weights of the earthquakes.


Finally, let's look at some of the more advanced options. Clicking "Show options" exposes powerful tools to filter and aggregate the data Fusion Tables is displaying. Click "Aggregate" and check the boxes to aggregate the Eqid field by Region, as shown below:


Click Apply, and visualize the data as a pie chart. Select "Region" as the entity and "Count" as the value, and you'll see a chart that represents the share of recent earthquakes in each region. You could also view this as an intensity map or in other forms. Clicking "Get Embeddable Code" below the chart gives you code you can use to embed the chart into your web site or blog, like we've done below.