Posts in leaflet

Easy Web Maps With R and Leaflet

I've been using R as a Geographic Information System (GIS) for a long time, and I've relied heavily on the excellent rgdal, maptools, and raster packages to process spatial data. One thing has always bugged me about this workflow, however. If I want to check or explore geographic data by clicking around on a map, I nearly always have to export it and open it up in another program like ArcGIS or QGIS. That's why I was really excited to learn that the folks at Rstudio have come up with a cool solution: they've written R wrappers for the leaflet javascript library which allows folks to quickly overlay vector data on an interactive web map.

In this post I'll describe how to build this map and share it on Rpubs or a self-hosted website. This assumes you have some familiarity with R and manipulating spatial data. For a great compendium of resources on GIS in R, see here

written in GIS, R, leaflet, maps Read on →