mregions
- Get data from http://www.marineregions.org
Some data comes from the Flanders Marine Institute (VLIZ) geoserver
mregions
is useful to a wide diversity of R users because you get access to all of the data MarineRegions has, which can help in a variety of use cases:
install.packages("mregions")
Development version
devtools::install_github("ropenscilabs/mregions")
library("mregions")
Get region
res1 <- mr_geojson(key = "Morocco:dam")
Get helper library
install.packages("leaflet")
Plot data
library('leaflet')
leaflet() %>%
addProviderTiles(provider = 'OpenStreetMap') %>%
addGeoJSON(geojson = res1$features) %>%
setView(-3.9, 35, zoom = 10)
Get region
res2 <- mr_shp(key = "MarineRegions:eez_iho_union_v2", maxFeatures = 5)
Get helper library
install.packages("leaflet")
Plot data
library('leaflet')
leaflet() %>%
addProviderTiles(provider = 'OpenStreetMap') %>%
addPolygons(data = res2)