Using MAPZEN data and the LeafletR package to create a Leaflet map in R
Data Category: Mapping tools
Data Description: MAPZEN is a cool website that has freely available GIS data for metro areas; country, region and city boundaries; and descriptions of different places (found in Who’s On First). MAPZEN uses the geojson data format, which allows you to map the files to an interactive map on the internet (Leaflet map, in this case) using the leafletR package. Here, I’ll map Australia. I will admit to not knowing how to use a Leaflet map to its full utility, but Leaflet maps allow users to click on parts of your map to interact with the data you have saved to different features on the map. The code below simply plots Australia on the map.
Data Use Policy: https://mapzen.com/terms/
Instructions First download the Australia border file from mapzen.com: https://mapzen.com/data/borders/. You’ll need to click on Australia and then the “GEOJSON” button with the file size written below it. We’ll just use the regions.geojson file here.
Create the map:
A map similar to the one below will be created in the html file (but you’ll be able to see the whole world and zoom in and out).
Spatial Ecology @ MSU
Click 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)