/
POWO.Rmd
119 lines (86 loc) · 3.09 KB
/
POWO.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
title: "POWO"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{POWO}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
[Plants of the World Online (POWO)](http://www.plantsoftheworldonline.org/) is a database of information on the world's flora. It curates information from published floras and other sources of floristic information. POWO covers much of the same grounds as WCVP - you can get taxonomic information for names from it. But it also has more general information about taxa, like descriptions, lifeforms, images, and distributions.
```{r setup}
library(kewr)
library(dplyr)
library(tidyr)
```
## Searching POWO for taxa
Searching POWO works by exact matching, so any mispellings or unrecognised orthographic variants will not be matched.
For example, searching `Ulex europeaus` will not return any results:
```{r}
results <- search_powo("Ulex europeaus")
results
```
But searching `Ulex europaeus` will:
```{r}
results <- search_powo("Ulex europaeus")
results
```
## Pagination
By default, `search_powo` limits the number of results returned to 50. If you are expecting more results, you can increase this limit.
```{r}
results <- search_powo("Ulex", limit=100)
results
```
However, for searches with a large number of results, this may not be practical. In this case, or if you just don't know how many results to expect, you can request the next page of results.
```{r}
ulex_page1 <- search_powo("Ulex")
ulex_page2 <- request_next(ulex_page1)
bind_rows(
tidy(ulex_page1),
tidy(ulex_page2)
)
```
## Keyword searches and filtering
You can perform more complicated searches using keywords and filters.
For example, you can search for all accepted species in a particular family.
```{r}
results <- search_powo(list(family="Ephedraceae"),
filters=c("accepted", "species"))
results
```
As well as taxonomic keywords, it is possible to search by other characteristics.
For example, finding all accepted legumes with blue flowers.
```{r}
blue_flowers <- search_powo(list(flower="blue", family="Fabaceae"),
filters=c("accepted"))
blue_flowers
```
Another use is to get a checklist of accepted species in a country.
```{r}
checklist <- search_powo(list(distribution="Mexico"),
filters=c("accepted"))
checklist
```
A full list of keywords and filters can be found in the help page for `search_powo`.
## Looking up information about a taxon
As well as searching by keyword, it is possible to use the IPNI ID of a taxon to look up its record in POWO. To get the IPNI ID, you can search WCVP, POWO, or IPNI, or use KNMS to find matches for the name.
```{r}
ipni_id <- "119003-2"
record <- lookup_powo(ipni_id)
record
```
Optionally, you can choose to request the distribution information for the taxon as well.
```{r}
record <- lookup_powo(ipni_id, distribution=TRUE)
tidied <- tidy(record)
tidied %>%
select(fqId, distribution) %>%
unnest(cols=distribution) %>%
select(-introduced) %>%
unnest(cols=natives)
```