14 November 2012

Timeline Maps with googleVis & Twitter Bootstrap Carousel (& updated Slidify)

I've wanted to create timeline maps with interactive googleVis Geomaps for a while. These would be a nice way to quickly show the spatial distribution of some data over time.

It turns out that it's pretty easy to do with a plugin for Twitter Bootstrap called Carousel. Carousel is probably intended for regular picture slide shows. But because it can hold iframes, it can pretty much include anything, even interactive maps.

Here is a short slide show with examples and code for how to combine googleVis and Twitter Bootstrap Carousel to create interactive timeline maps.

Note: I used the newest version (0.3.1) of Ramnath Vaidyanathan's Slidify to create the presentation. He is really putting a lot of good work into that package. I especially like the choice to set the default slide framework to Google's I/O 2012 style. It has many features you don't find in other HTML slide frameworks. Particularly useful here, it begins to load iframes when you are on the previous slide rather than waiting until you get to the slide with the iframe.

  • Code for the example website with a googleVis Carousel timeline map shown in the presentation.
  • Code for the presentation on GitHub. (Note: the code I used to 'Slidify' the presentation is virtually identical to Ramnath Vaidyanathan's example.

Update (16 Nov. 2012): Ramnath Vaidyanathan has created a great demonstration of how to use the whisker package to include this timeline map directly into Slidify slides.


Markus said...

Great post and I really like the new Slidify look!

I had some luck with creating animated geo charts using googleVis and a bit of JavaScript. You find an example and code in the following post from March 2012:
Changes in life expectancy animated with geo charts

Thanks for sharing!

Christopher Gandrud said...

Nice, I added your post to the presentation.

Erin said...

Hi Christopher!

Where is the code, please?


Christopher Gandrud said...

Hi Erin

All of the code is linked to in the presentation, but it is probably a good idea for me to highlight it in the post.

Updating . . .