Introduction to LeafletMegan KressSeptember 12, 2016
What Is Leaflet?Leaflet is an open-source JavaScript library found at http://leafletjs.com/. Its purpose is to embed R code in your webpage to produce interactive maps.
Leaflet Example
Install LeafletLeaflet is available as a package on CRAN (https://cran.r-project.org/web/packages/leaflet/index.html), so it can easily be downloaded from the command line in RStudio:
Simple Map Using Leaflet
See the Shiny app version of this R code here.
Note: The “%>%” symbol is a magrittr pipe operator (http://blog.revolutionanalytics.com/2014/07/magrittr-simplifying-r-code-with-pipes.html). The code below is equivalent to the above code and does not use pipes.
0 Comments
Leave a Reply. |
Spatial Ecology @ MSUClick on "Category" below to search for R code compiled by the Zarnetske Spatial & Community Ecology Lab and students in MSU's Spatial Ecology graduate course (FOR870/FW870) Category
All
Archive
October 2016
|