/
tsc.Rmd
60 lines (48 loc) · 1.11 KB
/
tsc.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
title: "Threatened Species and Communities (TSC)"
output:
rmarkdown::html_vignette:
self_contained: false
vignette: >
%\VignetteIndexEntry{Threatened Species and Communities (TSC)}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
options(rmarkdown.html_vignette.check_title = FALSE)
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
```{r setup}
library(wastdr)
```
# Taxonomy
Use packaged data (fast, but older)
```{r}
data("tsc_data", package = "wastdr")
```
Load fresh data from TSC (slow, but up to date with TSC)
```{r, eval=FALSE}
get_all <- . %>%
wastdr::wastd_GET() %>%
wastd_parse()
taxon <- get_all("taxon")
taxon_fast <- get_all("taxon-fast")
vernacular <- get_all("vernacular")
crossreference <- get_all("crossreference")
community <- get_all("community")
```
## Inspect taxonomic data
```{r, fig.width=9}
rt <- . %>%
head() %>%
reactable::reactable(sortable = T, filterable = T)
tsc_data$taxon %>% rt()
tsc_data$taxon_fast %>% rt()
tsc_data$vernacular %>% rt()
tsc_data$crossreference %>%
head() %>%
listviewer::jsonedit()
```