Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vlucet/rgeobon

The R interface to GEOBON's EBV open data portal API
https://github.com/vlucet/rgeobon

api-wrapper geobon package r

Last synced: 2 months ago
JSON representation

The R interface to GEOBON's EBV open data portal API

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# rgeobon

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Coverage Status](https://img.shields.io/codecov/c/github/vlucet/rgeobon/master.svg)](https://codecov.io/github/vlucet/rgeobon?branch=master)
[![R build status](https://github.com/VLucet/geobon/workflows/R-CMD-check/badge.svg)](https://github.com/VLucet/geobon/actions)

The goal of rgeobon is to provide an interface between R and the [GEOBON open data portal](https://portal.geobon.org/) RESTfull API (please note that the portal is currently in beta). It allows to consult the datasets available on the portal and download them.

## Installation

You can install rgeobon from GitHub:

``` r
devtools::install_github("vlucet/rgeobon")
```

## Example

This demonstrates the basic abilities of `rgeobon`. You can first get the list of all the available datasets:

```{r example}
library(rgeobon)
# Get the list of GEOBON datasets
dataset_list <- geobon_list()
dataset_list
```

From here, you can request information on a single record, and download the data associated with this record, if any is available.

```{r example_followup}
# List possible ids
dataset_list$id

# Get a specific record
geobon_get(id = 1)

# Download the data from that record into a temp directory
geobon_download(id = 1, path = tempdir())
```