Skip to content

Commit 5219cd9

Browse files
authored
Merge pull request #33 from terraref/met
small tweaks to met examples
2 parents 33df46a + edc464c commit 5219cd9

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

sensors/01-meteorological-data.Rmd

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ output: html_document
77
knitr::opts_chunk$set(echo = FALSE, cache = TRUE)
88
99
api_url <- "https://terraref.ncsa.illinois.edu/clowder/api"
10-
output_dir <- "~/data/downloads/"
10+
output_dir <- file.path(tempdir(), "downloads")
1111
dir.create(output_dir, showWarnings = FALSE, recursive = TRUE)
1212
1313
```
@@ -108,13 +108,18 @@ Here is the json representation of a single five-minute observation:
108108

109109
The data represent 5 minute summaries aggregated from 1/s observations.
110110

111+
First, this is what the API looks like
112+
113+
https://terraref.ncsa.illinois.edu/clowder/api/geostreams/datapoints?key=Pb3AUSqnUw&stream_id=4807&since=2017-01-02&until=2017-01-31
114+
111115
```{r met-geostream}
112116
library(dplyr)
113117
library(ggplot2)
114118
library(jsonlite)
115119
116120
url = ""
117-
mac_weather.list <- jsonlite::fromJSON('https://terraref.ncsa.illinois.edu/clowder/api/geostreams/datapoints?key=Pb3AUSqnUw&stream_id=3208&since=2017-01-02&until=2017-12-31', flatten = FALSE)
121+
mac_weather.list <- jsonlite::fromJSON('https://terraref.ncsa.illinois.edu/clowder/api/geostreams/datapoints?key=Pb3AUSqnUw&stream_id=4807&since=2017-01-02&until=2017-01-31')
122+
#mac_weather.list <- jsonlite::fromJSON('https://terraref.ncsa.illinois.edu/clowder/api/geostreams/datapoints?key=Pb3AUSqnUw&stream_id=3208&since=2017-01-02&until=2017-12-31', flatten = FALSE)
118123
119124
# change time to human-readable
120125
mac_weather <- mac_weather.list$properties %>%

traits/03-access-r-traits.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ Now the same query can be reduced to:
7474

7575
```{r sv_area}
7676
sorghum_height <- betydb_query(table = 'search',
77-
trait = "plant_height",
78-
site = "~MAC",
77+
trait = "canopy_cover",
78+
site = "~Season 6",
7979
limit = 'none')
8080
```
8181

0 commit comments

Comments
 (0)