[This article was first published on mages' blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Last year at the Google I/O conference Mitchell Foley presented new developments of the Google Chart Tools API and one of the new features he mentioned were timeline charts (about 6 min into the talk). Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Timeline charts are a great way of visualising different dates/events over time and are now also supported by googleVis from version 0.5.0 onwards (currently only available from GitHub). Here is an example, showing classroom allocation in the afternoon. The exact times and durations are given when you hover over the bars.
I can swap around the bar and row labels to show the rooms by languages:
Here is another example, inspired by Jason Bryer's timeline package, showing the US presidents and UK prime ministers during World War II. For
gvisTimeline
I have to remove the line breaks in Jason's data.And finally a more complex example from the Google Chart Tools API documentation showing the terms of the first US presidents with various options set to change the colours and s:
Read more »
To leave a comment for the author, please follow the link and comment on their blog: mages' blog.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.