« « Conferences: How can we help more people feel dumb?

Hacking till it works is no longer enough » »

Answering some FAQs about Fusion Tables

Posted by on Oct 30, 2011 in Blog, Uncategorized | 2 Comments

I’ve recently gotten a few questions about Fusion Tables via email.  I’ll keep the questioners anonymous, but I think it’s worth sharing these answers with the community.

Some questions paraphrased.

Can I embed something with HTML/CSS/JavaScript using the Layer Builder on my Google Sites page/page that doesn’t play well with JavaScript?

This is part of my usual argument of why it’s a good idea to host your own website.  Whenever someone does something for you, you have less responsibility and less freedom.  But…you can embed the code in a wrapper.  If you have some other space, you can host the Web page there, and then bring it in with an iframe.  If you’re using Google Sites, you can wrap all of your code in a Google Gadget.  More details here, with links!

Where can I find shapefiles in a Google Fusion Tables friendly format?

You can convert your own shapefiles (shapes of various areas you want to shade for mapping, like states, counties, etc.) using shpescape.com.  However, many already exist imported into Fusion Tables.  You can search publicly available tables for shapefiles you may want to use.  Some especially helpful examples, for state and county boundaries from Census data, are here.

Once you have a table with geographic information, you can merge this with your own table containing numerical data that determines how the various shapes should be shaded.  Use the Merge command in the right most drop down menu at the top of your Fusion Table.

How do I best organize my data to display on a Fusion Tables map?

If you’re using shapes like I was talking about above, you want to make each row for one of those shapes.  The shape should be identified by a name that is also a field in the table with the geographic information.  For states, make sure you have a column with the name written out: “Virginia”, not just “VA” or “Va.”  Each number you want to reference, or each category, should be in a separate column in that row.  Beyond that, structuring data is something I have trouble explaining rules for, other than each cell is a small cubby hole.  We don’t put two things in a cubby, we keep like things near each other.  A place for every piece of data, every piece of data in a place a program can find it.

If I’m using the API to bring in custom Google Fusion Tables layers, do I customize those pop-up bubbles in the Fusion Table itself, or using the API?

You CAN do it using the API, but I prefer to keep this bit in the actual Fusion Tables interface.  Go to Visualize –> Map, click on Edit Info Bubbles, click on Custom.  Then, you can add HTML/CSS, using attributes from columns in your Fusion Table.  These styles will propogate through the API, unless you overwrite them in the API.  As I see it, the main reason to do that would be if you want to write some sort of conditional statement.  Only show the line with this variable, if the variable is not 0…or something like that.

Basically, unless you’re getting complex, customize your info bubbles on the actual Fusion Tables site.  Same with coloring your polygons.  If the site can’t get what you want done, then move to doing it through code.

My philosophy: Code helps you get beyond the normal interface.  You don’t get extra points for making your life more difficult, unless you’re doing it to learn.


More questions/help/group puzzling also available by contacting me in methods listed on the right rail.

« « Conferences: How can we help more people feel dumb?

Hacking till it works is no longer enough » »
  • http://twitter.com/palewire Ben Welsh

    Considering how Google has pushed recently to “monetize” power users of Google Maps and Google App Engine with huge price increases, how can we trust them to not do the same thing with Fusion Tables?


    Michelle Minkoff Reply:

    I share your concern, not to mention how sophisticated use of FT by bringing in FT layers into Google Maps API requires, well, Google Maps.

    But we can continue to use it as a source for learning about Web dev, and Web cartography, IMO.