ropensci/mregions

Name: mregions

Owner: rOpenSci

Owner: rOpenSci Labs

Description: MarineRegions R client

Created: 2015-12-08 15:45:37.0

Updated: 2018-05-30 12:02:16.0

Pushed: 2018-05-25 20:29:28.0

Homepage:

Size: 4713

Language: R

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

mregions

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:

Install
all.packages("mregions")

Development version

ools::install_github("ropenscilabs/mregions")

ary("mregions")
GeoJSON

Get region

 <- mr_geojson(key = "Morocco:dam")

Get helper library

all.packages("leaflet")

Plot data

ary('leaflet')
let() %>%
dProviderTiles(provider = 'OpenStreetMap') %>%
dGeoJSON(geojson = res1$features) %>%
tView(-3.9, 35, zoom = 10)

map

Shape

Get region

 <- mr_shp(key = "MarineRegions:eez_iho_union_v2", maxFeatures = 5)

Get helper library

all.packages("leaflet")

Plot data

ary('leaflet')
let() %>%
dProviderTiles(provider = 'OpenStreetMap') %>%
dPolygons(data = res2)

map2

Convert to WKT

From geojson

 <- mr_geojson(key = "Morocco:dam")
s_wkt(res3, fmt = 5)

1] "MULTIPOLYGON (((41.573732 -1.659444, 45.891882 ... cutoff

From shp object (SpatialPolygonsDataFrame) or file, both work

s_wkt(mr_shp(key = "MarineRegions:eez_iho_union_v2"))

1] "GEOMETRYCOLLECTION (POLYGON ((-7.25 ... cutoff
Get OBIS EEZ ID
bis_eez_id("bulgarian exclusive economic zone")

1] 71
Contributors
Meta

rofooter


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.