Skip to contents

Tools to get marine regions data from Includes tools to get region metadata, as well as data in 'GeoJSON' format, as well as Shape files. Use cases include using data downstream to visualize 'geospatial' data by marine region, mapping variation among different regions, and more.


mregions gets data from


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:

  • Visualize marine regions alone

  • Visualize marine regions with associated data paired with analysis

  • Use marine region geospatial boundaries to query data providers (e.g., OBIS (

  • Geocode - get geolocation data from place names

  • Reverse Geocode - get place names from geolocation data


Scott Chamberlain

Francois Michonneau

Pieter Provoost

Michael Sumner

Lennert Schepers

Salvador Fernandez [email protected]


if (FALSE) {
## GeoJSON
### Get region
res <- mr_geojson(key = "Morocco:dam")

### Plot data
if (!requireNamespace("leaflet")) {
leaflet() %>%
  addProviderTiles(provider = 'OpenStreetMap') %>%
  addGeoJSON(geojson = res$features) %>%
  setView(-3.98, 35.1, zoom = 11)

## Shape
### Get region
res <- mr_shp(key = "MarineRegions:eez_iho_union_v2")
leaflet() %>%
  addProviderTiles(provider = 'OpenStreetMap') %>%
  addPolygons(data = res)

## Convert to WKT
### From geojson
res <- mr_geojson(key = "Morocco:dam")
mr_as_wkt(res, fmt = 5)

### From shp object (`SpatialPolygonsDataFrame`) or file, both work
mr_as_wkt(mr_shp(key = "Morocco:dam", read = FALSE))
## spatial object to wkt
mr_as_wkt(mr_shp(key = "Morocco:dam", read = TRUE))