The last couple of weeks I’ve been getting accustomed to Google Fusion Tables.
For those who haven’t yet noticed it – Fusion Tables is a new (still in Beta) Google product for data storage: a kind of database.
Some major cool things about Fusion Tables:
- it’s really accessible (use the usual OAuth2 authentication as for all other Google services to script interaction), or use the web interface to manually edit your tables.
- If you include geo data in your tables, you can easily (and I mean really easily!) display your data on a map.
- They’re really clever about geo data… a text address, longitude/latitude, polygons, shapes, … dump it into a “Location” type field, and it will probably be understood.
- Google::Fusion – an object oriented (perl) interface to Google::Fusion tables
- Net::OAuth2 – the authentication module
Net::OAuth2 isn’t actually a new Perl module, but in its previous state it wasn’t really usable for command line applications, so I reworked it a bit. Both of these modules are very raw/alpha – they are lacking in documentation, error handling, unit tests…. all the things one would expect in productive code… but I want to get them out there now so other people can start using and abusing them.
Here’s a wee screencast of pfusion in action:
And a short instruction to install (I hope it’s complete…):
git clone git://github.com/robin13/Net-OAuth2.git git clone git://github.com/robin13/Google-Fusion.git vi ~/.fusion
Edit to look like this, with the id/secret of your application. If you haven’t got an id/secret yet, you’ll have to register an application for this purpose on the Google API Console and be sure to make it an “installed application” (not “web application”)
--- client_id: 372296649547.apps.googleusercontent.com client_secret: XDy8Y8xTuwN90F3h7ljCuw4i
# And now run fusion:
perl -I ./Google-Fusion/lib -I ./Net-OAuth2/lib ./Google-Fusion/bin/pfusion
If authentication is successful, you should be able to interact with Fusion Tables to your hearts content, and should find a .fusion.auth file in your home directory with your current tokens (you only have to enter the authentication code the first time).
I hope you have fun with it, and give me some nice pull requests on those repositories!