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

https://github.com/eduardszoecs/rartenfinder

R Client for the artenfinder API (http://artenfinder.rlp.de)
https://github.com/eduardszoecs/rartenfinder

api-client r ropensci

Last synced: about 2 months ago
JSON representation

R Client for the artenfinder API (http://artenfinder.rlp.de)

Awesome Lists containing this project

README

        

---
output:
md_document:
variant: markdown_github
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/EDiLD/rartenfinder?branch=master&svg=true)](https://ci.appveyor.com/project/EDiLD/rartenfinder)
[![Travis-CI Build Status](https://travis-ci.org/EDiLD/rartenfinder.svg?branch=master)](https://travis-ci.org/EDiLD/rartenfinder)
[![Coverage Status](https://img.shields.io/codecov/c/github/EDiLD/rartenfinder/master.svg)](https://codecov.io/github/EDiLD/rartenfinder?branch=master)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/rartenfinder)](https://cran.r-project.org/package=rartenfinder)

# rartenfinder

R Client for the artenfinder API (http://artenfinder.rlp.de)

## Installation

### Development version from GitHub

```{r eval=FALSE}
install.packages("devtools")
devtools::install_github("EDiLD/rartenfinder")
```

```{r}
library('rartenfinder')
library('dplyr')
```

## Usage

### Query metadata

#### Available taxagroups

```{r taxagroups}
get_taxagroups() %>%
head()
```

#### Available taxa

##### List all available taxa
```{r taxa}
get_taxa() %>%
head() %>%
select(-eu_guid, gid)
```

##### Query taxa by regex:
```{r taxa_regex}
get_taxa(name_regexp_ci = '^Udea.*$') %>%
head() %>%
select(-eu_guid, gid)
```

##### Query taxa by group
```{r taxa_group}
get_taxa(taxagroup = 'Flechten') %>%
head() %>%
select(-eu_guid, -gid)
```

### Query observations
```{r observations}
get_observations(scientific_name = 'milvus milvus', year = 2017) %>%
head() %>%
select(id, lat, lon, datum)
```

### Plotting

#### Phenogram
```{r phenogram}
df <- get_observations(scientific_name = 'Gonepteryx rhamni', year = 2017)
plot_phaenogram(df, 'weekly')
```

#### Interactive map
```{r eval=FALSE}
plot_mapview(df)
```