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

November 14, 2012
By

(This article was first published on Christopher Gandrud (간드루드 크리스토파), and kindly contributed to R-bloggers)

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:
  • 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.

To leave a comment for the author, please follow the link and comment on his blog: Christopher Gandrud (간드루드 크리스토파).

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.