Skip to content

Commit 601a811

Browse files
committed
minor changes to enable book to compile
1 parent 7f0a448 commit 601a811

6 files changed

Lines changed: 22 additions & 13 deletions

_bookdown.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
book_filename: "terraref-tutorials"
2-
output_dir: "book-output"
2+
output_dir: "docs"
33
language:
44
ui:
55
chapter_name: "Chapter "
6-
rmd_files: ["index.Rmd", "traits/00-BETYdb-getting-started.Rmd", "traits/01-simulated-sorghum.Rmd", "sensors/05-command-line-hyperspectral-workflow.Rmd"]
6+
rmd_files: ["index.Rmd", "traits/00-BETYdb-getting-started.Rmd", "traits/01-simulated-sorghum.Rmd", "traits/02-danforth-phenotyping-facility.Rmd",
7+
"traits/03-maricopa-field-scanner.Rmd","traits/04-agronomic-metadata.Rmd"]#, "sensors/05-command-line-hyperspectral-workflow.Rmd"]

sensors/01-meteorological-data.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "01-meteorological-data.Rmd"
33
output: html_document
44
---
55

6-
```{r setup, include=FALSE}
6+
```{r met-setup, include=FALSE}
77
knitr::opts_chunk$set(echo = FALSE, cache = TRUE)
88
99
api_url <- "https://terraref.ncsa.illinois.edu/clowder/api"

sensors/02-sensor-metadata.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ date: "`r Sys.Date()`"
66
output: html_document
77
---
88

9-
```{r setup, include=FALSE}
9+
```{r sensor-metadata-setup, include=FALSE}
1010
knitr::opts_chunk$set(echo = TRUE, cache = TRUE)
1111
library(jsonlite)
1212
library(dplyr)
@@ -43,7 +43,7 @@ knitr::kable(par_metadata$content$rsr)
4343
```
4444
#### PAR sensor RSR curve
4545

46-
```{r rsr-curve}
46+
```{r par-rsr-curve}
4747
par_rsr <- data.frame(wavelength = unlist(par_metadata$content$rsr$wavelength),
4848
response = unlist(par_metadata$content$rsr$response))
4949

sensors/03-laser-scanner-3D.Rmd

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ output: md_document
77

88
```{r setup, include=FALSE}
99
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, cache = TRUE)
10-
```
11-
12-
13-
Based on documentation for the `readLiDAR` package
14-
15-
```{r}
1610
library(rLiDAR)
1711
library(ggplot2)
1812
library(dplyr)
1913
library(rgl)
2014
theme_set(theme_bw())
15+
```
16+
17+
18+
Based on documentation for the `readLiDAR` package
19+
20+
```{r import-las}
2121
# Importing LAS file:
2222
2323
lasfile <- "~/terraref/documentation/tutorials/data/51458297-0d25-416a-91a5-a2f0ae1a1083__Top-heading-east_0.las"
@@ -26,14 +26,22 @@ LAS <- readLAS(lasfile) %>%
2626
as_data_frame %>%
2727
mutate(Z = (Z - min(Z)))
2828
29+
```
30+
31+
```{r downsample-las}
2932
LAS_sample <- LAS %>%
3033
filter(Z>200) %>%
3134
sample_frac(size = 0.01)
35+
```
3236

37+
```{r lidar-cluster}
3338
xyz <- LAS_sample[,1:3]
3439
# Getting LiDAR clusters
3540
set.seed(1)
3641
clLAS <- kmeans(xyz, 32)
42+
```
43+
44+
```{r lidar-visualization}
3745
# Set the points id
3846
id <- as.factor(clLAS$cluster)
3947

traits/01-simulated-sorghum.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ knitr::kable(variables %>%
198198
select(name, description, units))
199199
```
200200

201-
```{r all_sorghum}
201+
```{r all_sorghum, cache=TRUE}
202202
203203
204204
site_id <- betydb_query(table = 'sites', sitename = "Central IL Plot D")$id

traits/02-danforth-phenotyping-facility.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Which columns do we want?
7373

7474

7575

76-
```{r}
76+
```{r danforth-sorghum-cleanup}
7777
danforth_sorghum <- danforth_sorghum %>%
7878
dplyr::select(date, scientificname, cultivar, entity, trait, mean, units) %>%
7979
mutate(label = paste0(trait, ifelse(units == '', '', paste0(' (', units, ')'))), date = lubridate::ymd(date), genotype = cultivar)

0 commit comments

Comments
 (0)