Interactive maps and charts in R

June 10, 2016
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

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:

Census

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:

New haven

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

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, 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.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)