Skip to content

Commit dfce7fc

Browse files
committed
fix canopy_height query ... using sitename now.
1 parent 76b631f commit dfce7fc

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

traits/03-access-r-traits.Rmd

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Create a file that contains your API key. If you have signed up for access to th
3333
3434
# Example with the public key:
3535
writeLines('9999999999999999999999999999999999999999',
36-
con = 'traits/.betykey_public')
36+
con = '.betykey_public')
3737
```
3838

3939
#### R - using the traits package
@@ -51,7 +51,7 @@ sorghum_info <- betydb_query(table = 'species',
5151
api_version = 'v1',
5252
limit = 'none',
5353
betyurl = "https://terraref.ncsa.illinois.edu/bety/",
54-
key = readLines('traits/.betykey', warn = FALSE))
54+
key = readLines('.betykey', warn = FALSE))
5555
5656
```
5757

@@ -62,7 +62,7 @@ Notice all of the arguments that the `betydb_query` function requires? We can ch
6262

6363

6464
```{r set-up, echo = TRUE}
65-
options(betydb_key = readLines('traits/.betykey', warn = FALSE),
65+
options(betydb_key = readLines('.betykey', warn = FALSE),
6666
betydb_url = "https://terraref.ncsa.illinois.edu/bety/",
6767
betydb_api_version = 'v1')
6868
```
@@ -71,18 +71,18 @@ Now the same query can be reduced to:
7171

7272
```{r query-species-reduce, echo = TRUE, results = FALSE}
7373
sorghum_info <- betydb_query(table = 'species',
74-
genus = "Sorghum",
75-
limit = 'none')
74+
genus = "Sorghum",
75+
limit = 'none')
7676
```
7777

7878
### Time series of height
7979

8080
Now let's query some trait data.
81-
```{r sv_area, echo = TRUE, results = FALSE}
82-
sorghum_height <- betydb_query(table = 'search',
83-
trait = "canopy_height",
84-
site = "~Season 6",
85-
limit = 'none')
81+
```{r canopy_height, echo = TRUE, results = FALSE, cache = TRUE}
82+
sorghum_height <- betydb_query(table = 'search',
83+
trait = "canopy_height",
84+
sitename = "~Season 6",
85+
limit = 'none')
8686
```
8787

8888
```{r}

traits/06-agronomic-metadata.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Here are some key tables and fields that we will look at:
7171
| management_id | managements.id |
7272

7373

74-
```{r set-up, include = FALSE}
74+
```{r 06-setup, include = FALSE}
7575
7676
library(dplyr)
7777
library(tidyr)

0 commit comments

Comments
 (0)