Welcome   /      /    Subscribe  

Creating graphics with Google Docs

Last week I taught a session on visualizing data at the Knight Center, highlighting free and easy-to-use multimedia tools. Over the next couple of days, I’ll be posting tutorials on everything we discussed. Last week I posted tutorials on basics of HTML and Tableizer, which converts a spreadsheet into HTML.

Today, we’re going to create interactive graphics using the same unemployment rate information we used with Tableizer.

If you haven’t already done so, create a Google Docs account. You do not have to have a GMail account to use Google Docs — you can use your work e-mail address or a Hotmail account or a Yahoo account or any other.

With Google Docs, you can create documents, spreadsheets and presentations, and upload files that have been saved in Microsoft Word or Excel, or Open Office. Google Docs also offers a few functions that those other programs do not, and lets you share with others so more than one person can add to or edit a file.

After logging in, create a new spreadsheet. Copy this table (start with “year”, highlight the rest of the table and copy the data — ctrl-C on a PC or command-C on Apple) and paste it into your new spreadsheet.

Year January February March April May June July August September October November December
1999 4.3 4.4 4.2 4.3 4.2 4.3 4.3 4.2 4.2 4.1 4.1 4
2000 4 4.1 4 3.8 4 4 4 4.1 3.9 3.9 3.9 3.9
2001 4.2 4.2 4.3 4.4 4.3 4.5 4.6 4.9 5 5.3 5.5 5.7
2002 5.7 5.7 5.7 5.9 5.8 5.8 5.8 5.7 5.7 5.7 5.9 6
2003 5.8 5.9 5.9 6 6.1 6.3 6.2 6.1 6.1 6 5.8 5.7
2004 5.7 5.6 5.8 5.6 5.6 5.6 5.5 5.4 5.4 5.5 5.4 5.4
2005 5.2 5.4 5.2 5.2 5.1 5.1 5 4.9 5 5 5 4.8
2006 4.7 4.8 4.7 4.7 4.7 4.6 4.7 4.7 4.5 4.4 4.5 4.4
2007 4.6 4.5 4.4 4.5 4.5 4.6 4.7 4.7 4.7 4.8 4.7 4.9
2008 4.9 4.8 5.1 5 5.5 5.6 5.8 6.2 6.2 6.6 6.8 7.2
2009 7.6 8.1 8.5                  

Save and name the spreadsheet: Click the “save” button above the blue toolbar on the right.

First, let’s create a chart. Fair warning: These are not the most beautiful charts you’ve ever seen.

(See what I mean?)

Gadgets

That works for a flat, non-interactive chart. But Google Spreadsheets can do better with gadgets. The great thing about gadgets: They’re interactive. The not-so-great thing: They’re picky, and usually require spreadsheets to be formatted in a specific way. We’re going to create two gadgets: The first will be an interactive version of the chart above; the second will be much more fun and will show how that unemployment rate has changed over time.

To make the first gadget, the table needs to be rearranged a bit — basically, each row needs to be a column. Lucky for you, I was bored on a Sunday night: Copy this table and paste it into a new sheet in your spreadsheet. (To add a sheet, click on the “add sheet” button under the spreadsheet.)

1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
4.3 4 4.2 5.7 5.8 5.7 5.2 4.7 4.6 4.9 7.6
4.4 4.1 4.2 5.7 5.9 5.6 5.4 4.8 4.5 4.8 8.1
4.2 4 4.3 5.7 5.9 5.8 5.2 4.7 4.4 5.1 8.5
4.3 3.8 4.4 5.9 6 5.6 5.2 4.7 4.5 5  
4.2 4 4.3 5.8 6.1 5.6 5.1 4.7 4.5 5.5  
4.3 4 4.5 5.8 6.3 5.6 5.1 4.6 4.6 5.6  
4.3 4 4.6 5.8 6.2 5.5 5 4.7 4.7 5.8  
4.2 4.1 4.9 5.7 6.1 5.4 4.9 4.7 4.7 6.2  
4.2 3.9 5 5.7 6.1 5.4 5 4.5 4.7 6.2  
4.1 3.9 5.3 5.7 6 5.5 5 4.4 4.8 6.6  
4.1 3.9 5.5 5.9 5.8 5.4 5 4.5 4.7 6.8  
4 3.9 5.7 6 5.7 5.4 4.8 4.4 4.9 7.2


Let’s build the first gadget:

That’s a nice graphic, but not as useful as it could be. So let’s rearrange the information again, and create a new gadget. This time, I assigned a date to go with each number. The gadget requires a specific date, so instead of “January 2005,” I used “Jan. 1, 2005.” (Google changes the format to 1/1/05.) It’s a funny-looking table, I know.

Date Unemployment rate
1/1/1999 4.3
2/1/1999 4.4
3/1/1999 4.2
4/1/1999 4.3
5/1/1999 4.2
6/1/1999 4.3
7/1/1999 4.3
8/1/1999 4.2
9/1/1999 4.2
10/1/1999 4.1
11/1/1999 4.1
12/1/1999 4
12/1/2000 4
2/1/2000 4.1
3/1/2000 4
4/1/2000 3.8
5/1/2000 4
6/1/2000 4
7/1/2000 4
8/1/2000 4.1
9/1/2000 3.9
10/1/2000 3.9
11/1/2000 3.9
12/1/2000 3.9
1/1/2001 4.2
2/1/2001 4.2
3/1/2001 4.3
4/1/2001 4.4
5/1/2001 4.3
6/1/2001 4.5
7/1/2001 4.6
8/1/2001 4.9
9/1/2001 5
10/1/2001 5.3
11/1/2001 5.5
12/1/2001 5.7
1/1/2002 5.7
2/1/2002 5.7
3/1/2002 5.7
4/1/2002 5.9
5/1/2002 5.8
6/1/2002 5.8
7/1/2002 5.8
8/1/2002 5.7
9/1/2002 5.7
10/1/2002 5.7
11/1/2002 5.9
12/1/2002 6
1/1/2003 5.8
2/1/2003 5.9
3/1/2003 5.9
4/1/2003 6
5/1/2003 6.1
6/1/2003 6.3
7/1/2003 6.2
8/1/2003 6.1
9/1/2003 6.1
10/1/2003 6
11/1/2003 5.8
12/1/2003 5.7
1/1/2004 5.7
2/1/2004 5.6
3/1/2004 5.8
4/1/2004 5.6
5/1/2004 5.6
6/1/2004 5.6
7/1/2004 5.5
8/1/2004 5.4
9/1/2004 5.4
10/1/2004 5.5
11/1/2004 5.4
12/1/2004 5.4
1/1/2005 5.2
2/1/2005 5.4
3/1/2005 5.2
4/1/2005 5.2
5/1/2005 5.1
6/1/2005 5.1
7/1/2005 5
8/1/2005 4.9
9/1/2005 5
10/1/2005 5
11/1/2005 5
12/1/2005 4.8
1/1/2006 4.7
2/1/2006 4.8
3/1/2006 4.7
4/1/2006 4.7
5/1/2006 4.7
6/1/2005 4.6
7/1/2006 4.7
8/1/2006 4.7
9/1/2006 4.5
10/1/2006 4.4
11/1/2006 4.5
12/1/2006 4.4
1/1/2007 4.6
2/1/2007 4.5
3/1/2007 4.4
4/1/2007 4.5
5/1/2007 4.5
6/1/2007 4.6
7/1/2007 4.7
8/1/2007 4.7
9/1/2007 4.7
10/1/2007 4.8
11/1/2007 4.7
12/1/2007 4.9
1/1/2008 4.9
2/1/2008 4.8
3/1/2008 5.1
4/1/2008 5
5/1/2008 5.5
6/1/2008 5.6
7/1/2008 5.8
8/1/2008 6.2
9/1/2008 6.2
10/1/2008 6.6
11/1/2008 6.8
12/1/2008 7.2
1/1/2009 7.6
2/1/2009 8.1
3/1/2009 8.5

Creating this gadget is very similar to the previous gadget. In the toolbar, click on Insert > Gadget. Click on the “charts” link on the left; on the left, add the “Interactive Time Series Chart.” Change the range to A1:B124. You should get an interactive gadget like this:


Tomorrow: Building interactive graphics with Many Eyes.

No comments

Comments are closed.