ppo
This module contains functionality to download data from the Plant Phenology Ontology data portal.
Uses rppo to get data from http://plantphenology.org/
Example:
```python
from springtime.datasets.ppo import RPPO
dataset = RPPO(
genus="Quercus Pinus",
termID="obo:PPO_0002313",
limit=10,
years=[2019, 2020],
area=dict(name="somewhere", bbox=[-83, 27,-82, 28])
)
dataset.download()
df = dataset.load()
df
```
RPPO
Bases: Dataset
Download and load PPO data.
Attributes:
Name | Type | Description |
---|---|---|
years |
timerange. For example years=[2000, 2002] downloads data for three years. |
|
genus |
str
|
plant genus, e.g. "Quercus". See PPO documentation. |
termID |
str
|
plant development stage, e.g. "obo:PPO_0002313" means "true leaves present". See PPO documentation. |
area |
Optional[NamedArea]
|
A dictionary of the form
|
limit |
Optional[PositiveInt]
|
Maximum number of records to retreive |
timeLimit |
PositiveInt
|
Number of seconds to wait for the server to respond |
exclude_terms |
list[str]
|
termIDs to exclude from the results |
infer_event |
None | Literal['first_yes_day', 'last_yes_day']
|
whether to keep all (state-based) observations or infer the phenological event by setting it to "first_yes_day" or "last_yes_day". |
to_recipe()
Print out a recipe to reproduce this dataset.
download()
Download data.
load()
Load data from disk.
ppo_get_terms()
Call rppo:ppo_get_terms, save and load result.