Marine Regions Data from 'Marineregions.org'

Tools to get marine regions data from < http://www.marineregions.org/>. 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.


Build Status codecov.io rstudio mirror downloads cran version

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:

  • 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 (http://www.iobis.org))
  • Geocode - get geolocation data from place names
  • Reverse Geocode - get place names from geolocation data
install.packages("mregions")

Development version

devtools::install_github("ropenscilabs/mregions")
library("mregions")

GeoJSON

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)

map

Shape

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)

map2

Convert to WKT

From geojson

res3 <- mr_geojson(key = "Morocco:dam")
mr_as_wkt(res3, fmt = 5)
 
#> [1] "MULTIPOLYGON (((41.573732 -1.659444, 45.891882 ... cutoff

From shp object (SpatialPolygonsDataFrame) or file, both work

mr_as_wkt(mr_shp(key = "MarineRegions:eez_iho_union_v2"))
 
#> [1] "GEOMETRYCOLLECTION (POLYGON ((-7.25 ... cutoff

Get OBIS EEZ ID

mr_obis_eez_id("bulgarian exclusive economic zone")
## [1] 71

Contributors

Meta

  • Please report any issues or bugs.
  • License: MIT
  • Get citation information for mregions in R doing citation(package = 'mregions')
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

rofooter

News

mregions 0.1.6

BUG FIXES

  • Bug fixes for slight changes in the Marineregions web services

mregions 0.1.4

http://marineregions.org/ changed some of their services. Thus, we had to change the way some functions work, remove functionality of some parameters, and add new functions. We are still in the process of making it all work smoothly.

NEW FEATURES

  • new function mr_features_get() to fetch features of many different data types, including geojson, shp, kml, and more.
  • new function mr_layers() to list layers

MINOR IMPROVEMENTS

  • Tidying man pages throughout package to reduce down to 80 line width
  • mr_names() changed behavior. You used to be able to get all names/regions, but now you have to specify a layer you want information for.
  • mr_names_search() internals changed to account for changes in mr_names().

mregions 0.1.0

NEW FEATURES

  • released to CRAN

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("mregions")

0.1.6 by Scott Chamberlain, 7 months ago


https://github.com/ropenscilabs/mregions


Report a bug at https://github.com/ropenscilabs/mregions/issues


Browse source code at https://github.com/cran/mregions


Authors: Scott Chamberlain [aut, cre], Francois Michonneau [ctb], Pieter Provoost [ctb], Michael Sumner [ctb]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports httr, jsonlite, xml2, wellknown, rappdirs, sp, data.table, tibble

Suggests roxygen2, testthat, geojsonio, rgdal, rgeos, knitr, rmapshaper

Enhances leaflet


See at CRAN