You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/04-synthesis-data.Rmd
+95-77Lines changed: 95 additions & 77 deletions
Original file line number
Diff line number
Diff line change
@@ -9,34 +9,34 @@ The second analysis compares greenness from image data with canopy cover.
9
9
## Get and join data
10
10
11
11
Here we combine two dataframes.
12
-
The first contains all the canopy height values for 2017, which was created in the traits vignette.
13
-
The second is the cumulative growing degree days for all of 2017, which were calculated from the daily minimum and maximum temperatures in the weather vignette.
12
+
The first contains all the canopy cover values for 2018, which was created in the traits vignette.
13
+
The second is the cumulative growing degree days for all of 2018, which were calculated from the daily minimum and maximum temperatures in the weather vignette.
14
14
They are combined by their common column, the date.
We are interested in how growing degree days affects canopy cover.
63
63
To investigate this, we are going to model and plot their relationship.
64
+
We are using a logistic growth model here because it is appropriate for the shape of the GDD-cover relationship.
65
+
66
+
The logistic growth model is specified as
67
+
68
+
$$y = \frac{c}{1+e^{a + b * \textrm{x}}}$$
69
+
70
+
where $y$ is the response variable canopy cover, $x$ is the predictor growing degree days, $c$ is the asymptote or maximum canopy cover, $a$ is the initial value for canopy cover, and $b$ is the steepness of the curve. (reference)
71
+
64
72
We want to know the relationship for each cultivar, so we'll start of by determining the parameters of the model for one of the cultivars in our dataset.
65
-
We are using a logistic growth model here because it is appropriate for the shape of the GDD-cover relationship.
73
+
We provide estimated values for the asymptote $c$ and initial canopy cover value $a$, and provide canopy cover $y$ with corresponding growing degree days $x$ for one measurement of the chosen cultivar.
74
+
75
+
The below provides better estimates for the $c$, $a$, and $b$ parameters, which are used to plot the model as an orange line on top of the black points which are actual values.
geom_line(aes(x = gdd_cum, y = mean_predict), color = "orange") +
101
+
labs(x = "Cumulative growing degree days", y = "Canopy Height")
102
+
```
103
+
104
+
We then calculate the inflection point for this cultivar's model.
105
+
106
+
The maximum growth rate is the change in canopy cover per day at the rate of maximum growth. The growing degree day at which maximum growth is obtained is called the _inflection point_. This occurs near the midpoint of the y-axis, or $\frac{c - a}{2}$.
labs(x = "Cumulative growing degree days", y = "Canopy Height")
107
152
```
108
153
@@ -112,15 +157,9 @@ The last thing that we are going to do is assess the difference in this relation
112
157
We are going to use the inflection point from the logistic growth model, which indicates when canopy cover stops increasing as quickly with increasingly more warm days.
113
158
The resulting inflection points for each cultivar are plotted as a histogram.
114
159
115
-
```{r plot_inflections}
116
-
ggplot(all_cultivars) +
117
-
geom_point(aes(x = gdd_cum, y = mean)) +
118
-
geom_line(aes(x = gdd_cum, y = mean_predict), color = "orange") +
119
-
geom_vline(aes(xintercept = inf_point)) +
120
-
facet_wrap(~cultivar, scales = "free_y") +
121
-
labs(x = "Cumulative growing degree days", y = "Canopy Height")
In this examnple we will extract our plot data from a series of images taken in May of Season 6, measure its "greeness" annd plot that against the plant heights from above in this vignette.
131
170
132
-
The chosen statistic here is the normalised green-red difference index, NGRDI=(R-G)/(R+G) (Rasmussen et al., 2016), which uses the red and green bands from the image raster.
171
+
The chosen statistic here is the normalised green-red difference index, $\textrm{NGRDI}=\frac{R-G}/{R+G}$ (Rasmussen et al., 2016), which uses the red and green bands from the image raster.
133
172
134
173
Below we retrieve all the available plots for a particular date, then find and convert the plot boundary JSON into tuples.
135
174
We will use these tuples to extract the data for our plot.
These are the names of the full field RGB data for the month of May.
156
192
We will be extracting our plot data from these files.
157
-
A compressed file containing these images can be found on [Google Drive](https://drive.google.com/file/d/1UuVHHcyf9sxjX9fEUpD4qa9LGlBR0XnK/view?usp=sharing).
158
-
Be sure to extract the image files into a folder that's accessible to the code below.
193
+
A compressed file containing these images can be found on [Clowder](https://terraref.ncsa.illinois.edu/clowder/files/5c8175874f0c78f6486d6870?dataset=5c81709a4f0c78f6486d686c&space=).
194
+
The code below downloads the image files into a .zip file, which takes a few minutes, and then unzips that file so the image files are accessible.
0 commit comments