knitr::opts_chunk$set( comment = "#>", collapse = TRUE, warning = FALSE, message = FALSE, fig.path = "tools/img/" )
R wrapper for the Sea Around Us API.
The Sea Around Us data are licensed to the public under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License.
Please read the data use policy described in the DATA_USE file.
This software is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. See the LICENSE file for a full statement of the License.
When querying the API, please be respectful of the resources required to provide this data. We recommend you retain the results for each request so you can avoid repeated requests for duplicate information.
IMPORTANT MESSAGE: Please do not attempt to download the entire Sea Around Us database. This has the effect of overloading our systems and will cause outage of our website. We will be pleased to provide access to the entirety of our data to any colleague interested in a collaboration. Thank you for your cooperation.
Mac via Homebrew
$ brew tap homebrew/versions $ brew install v8-315 gdal
Linux via apt-get
$ sudo apt-get install libgdal1-dev libgdal-dev libgeos-c1 libproj-dev
CRAN version
install.packages("seaaroundus")
Dev version
remotes::install_github("ropensci/seaaroundus")
library(seaaroundus)
list available eezs
head(listregions('eez'))
get species data for Brazil as a data frame
head(catchdata("eez", 76))
use alternative API environment (available on all functions)
NOTE: alternative API environments may not always be publically accessible or stable
head(catchdata("eez", 76, env="qa"))
get top 3 species data for Brazil as a data frame
head(catchdata("eez", 76, limit=3))
get reporting status data by value for Brazil as a data frame
head(catchdata("eez", 76, measure="value", dimension="reporting-status"))
get species data for Brazil as a chart
catchdata("eez", 76, chart=TRUE)
eez vs high seas percent catch data frame
NOTE: data not available until SeaAroundUs global paper is released
head(eezsvshighseas())
eez vs high seas percent catch graph
eezsvshighseas(chart=TRUE)
marine trophic index for Brazil as a data frame
head(marinetrophicindex("eez", 76))
marine trophic index for Brazil as graph
marinetrophicindex("eez", 76, chart=TRUE)
get cells for a shape in WKT format
wkt <- "POLYGON((2.37 43.56,13.18 43.56,13.18 35.66,2.37 35.66,2.37 43.56))" res <- getcells(wkt) res[1:10]
get datagrid of cell data for a given year and list of cells
head(getcelldata(2005, c(89568,90288,89569)))
Regions:
Measures:
Dimensions:
seaaroundus
in R doing citation(package = 'seaaroundus')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.