mr_geojson: Get a Marineregions geojson file

Description Usage Arguments Value Examples

View source: R/region_geojson.R

Description

Get a Marineregions geojson file

Usage

1
mr_geojson(key = NULL, name = NULL, maxFeatures = 50, ...)

Arguments

key

(character) Region key, of the form x:y, where x is a namespace (e.g., MarineRegions), and y is a region (e.g., eez_33176)

name

(character) Region name, if you supply this, we search against titles via mr_names function

maxFeatures

(integer) Number of features to return. Default: 50

...

Curl options passed on to GET

Value

an S3 class of type mr_geojson, just a thin wrapper around a list. The list has names:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# by key
res1 <- mr_geojson(key = "Morocco:dam")

# by name -- not working right now

if (requireNamespace("geojsonio")) {
  library("geojsonio")
  as.json(unclass(res1)) %>% map_leaf

  # MEOW - marine ecoregions
  as.json(unclass(mr_geojson("Ecoregions:ecoregions"))) %>% map_leaf()
}

## End(Not run)

mregions documentation built on May 2, 2019, 6:53 a.m.