Interactive maps and charts in R
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Randy George, an expert in web map applications, has been fascinated with computer graphics (especially maps) since the early '80s. For much of that time, he says, the technology for mapping has been pretty static:
The main stay of web mapping applications for the last couple of decades has been three tier: Model – SQL, View – web UI, and Controller – server code. There are many variations on this theme: models residing in image tile pyramids, SQL Server, PostGIS, or Oracle; controller server code as Java, C#, or PHP. The visible action is on the viewer side. Html5 with ever expanding JavaScript libraries like jQuery, bootstrap, and angular.js make life interesting, while node.js is pushing JavaScript upstream to the controller.
But now, with the advent of the R language, things have changed. “R changes things in the geospatial world”, says Randy, and R has “evolved into a useful platform for ad hoc spatial analysis”. In his blog post, “The R Project for Maps”, he gives several examples of using R for creating maps, including this one of using the leaflet package to create an interactive map of census data:
Randy also gives several other examples of interactive R graphics behond maps, including this weather chart with an interactive slider based on the dygraphs package:
I've only included static screenshots of the various maps and charts above, so be sure to follow the link to Randy's post linked below for the interactive versions with the R code used to create them.
Maps for the Web: The R Project for Maps
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.