Skip to content

Commit

Permalink
Merge pull request #41 from weecology/2023-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwhite authored Aug 21, 2023
2 parents b64248f + 6b82866 commit 1e00ec1
Show file tree
Hide file tree
Showing 25 changed files with 174 additions and 83 deletions.
2 changes: 1 addition & 1 deletion content/lessons/R-empirical-dynamic-modeling/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Empirical Dynamic Modeling in R"
linkTitle: "R: Empirical Dynamic Modeling"
type: book
weight: 24
weight: 26
summary: R Tutorial on fitting and making forecasts using empirical dynamic modeling
show_date: false
editable: true
Expand Down
14 changes: 14 additions & 0 deletions content/lessons/R-empirical-dynamic-modeling/material.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: "Data & Software"
weight: 1
type: book
summary: Software installation requirements
show_date: false
editable: true
---

## Software installation requirements

* `ggplot2` R package: `install.packages('ggplot2')`
* `portalr` R package: `install.packages('portalr')`
* `rEDM` R package: `install.packages('rEDM')`
19 changes: 19 additions & 0 deletions content/lessons/R-forecasting-gams/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Forecasting with GAMs in R"
linkTitle: ""
type: book
weight: 19
summary: "Using generalized additive models for making forecasts"
show_date: false
editable: true
---

{{% callout note %}}

**Learning Objectives:**
* First lesson objective
* Second lesson objective

{{% /callout %}}

{{< list_children >}}
2 changes: 1 addition & 1 deletion content/lessons/R-species-distribution-models/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Species Distribution Models in R"
linkTitle: "R: Species Distribution Models"
type: book
weight: 20
weight: 22
summary: An R tutorial on using fitting simple species models and making forecasts based on these models
show_date: false
editable: true
Expand Down
19 changes: 19 additions & 0 deletions content/lessons/R-time-series-GAMS/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Fitting time-series GAMS in R"
linkTitle: ""
type: book
weight: 18
summary: " "
show_date: false
editable: true
---

{{% callout note %}}

**Learning Objectives:**
* First lesson objective
* Second lesson objective

{{% /callout %}}

{{< list_children >}}
7 changes: 1 addition & 6 deletions content/lessons/R-time-series-decomposition/r_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ editable: true

### Written version of the lesson. It will vary from the videos, but the core info is the same.
### You may find it helpful to watch the videos without "in R" in their title as these are more informative videos with visuals that are not present in the written document.
---
title: "Decomposition"
author: "Morgan Ernest"
date: "September 20, 2018"
output: html_document
---

## Inherent scales within a time series


Expand Down
10 changes: 5 additions & 5 deletions content/lessons/R-time-series-modeling/r_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ Modify the max orders, if needed, and rerun the model.

## White noise model - Simplest Time series

## Data setup
### Data setup

Let's start by getting our environment ready to go by loading our rpackage and data.

We're going to be using the rpackage forecast today. Forecast is the package developed by Rob Hyndeman as an aid to learning basic forecasting techniques in R. It makes some of the modeling approaches more user friendly.
---

```{r}
library(forecast)
```
Expand All @@ -91,7 +91,7 @@ whitenoise = ts(rnorm(273,0.18))
```
Reminder: set.seed is fixing that random draw so we all have the same numbers. rnorm() pulls random draws from a normal distribution. And we've asked it to pull 273 observations from a normal distribution with mean 0.18

## Fit the white noise model
### Fit the white noise model
Now let's fit this white noise model (the equation above) to our data. We'll use the meanf function from the forecast package. It fits a model where you have a mean and assumes data are independent and identifcally distributed (so no time series structure)

```{r}
Expand Down Expand Up @@ -175,7 +175,7 @@ Let's see how this model performs relative to the white noise model we plotted b
plot(NDVI.ts)
lines(fitted(MA2), col='blue')
```
SO, just with the information about correlated errors at short time intervals, we are able to generate a plot that doesn't look ridiculuously different from the observed data.
SO, just with the information about correlated errors at short time intervals, we are able to generate a plot that doesn't look ridiculously different from the observed data.

The next step whenever we fit any model is to check how its fitting our data. Are there signals in our residuals that indicate something is amiss. With a time series model, we're often looking to see if we left any autocorrelation unaccounted for.

Expand Down Expand Up @@ -213,7 +213,7 @@ There are differences between this fit and the non-seasonal ARIMA we fit above,
```{r}
summary(season_MA2)
```
JUst like before, we see the model structure at the top, and the cofficient values that it fit to the data for that model structure. sMA refers to that seasonal MA component that we added to this model.
JUst like before, we see the model structure at the top, and the coefficient values that it fit to the data for that model structure. sMA refers to that seasonal MA component that we added to this model.

And, let's check the residuals:
```{r}
Expand Down
19 changes: 19 additions & 0 deletions content/lessons/ask-us-anything/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Ask us anything"
linkTitle: ""
type: book
weight: 20
summary: "Ask us anything you've been wondering about forecasting and we'll talk about it"
show_date: false
editable: true
---

{{% callout note %}}

**Learning Objectives:**
* First lesson objective
* Second lesson objective

{{% /callout %}}

{{< list_children >}}
10 changes: 10 additions & 0 deletions content/lessons/ask-us-anything/discussion_questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Discussion Questions"
weight: 2
type: book
summary: " "
show_date: false
editable: true
---

Bring any questions related to the course that you've been wanting to ask we'll talk about them.
10 changes: 10 additions & 0 deletions content/lessons/ask-us-anything/instructor_notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Instructor Notes"
weight: 4
type: book
summary: " "
show_date: false
editable: true
---

This material generates a lot of questions from students so we recommend setting aside one or more days for students to either submit questions in advance, or just bring them to class, and you answer/discuss them.
2 changes: 1 addition & 1 deletion content/lessons/course-wrap-up/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Wrap up: Can we (and what should we) forecast in ecology?"
linkTitle: "Course wrap up"
type: book
weight: 27
weight: 29
summary: "Synthetic discussion of how to use forecasting in ecology given the strengths, weakness, and approaches we've learned."
show_date: false
editable: true
Expand Down
2 changes: 1 addition & 1 deletion content/lessons/course-wrap-up/material.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ editable: true

## Reading

[Prediction, precaution, and policy under global change](https://doi.org/10.1126/science.1261824)
[Prediction, precaution, and policy under global change](https://landscapepartnership.org/maps-data/climate-context/cc-resources/ClimateSciPDFs/Science-2015-Schindler-953-4.pdf/app-download-file/file/Science-2015-Schindler-953-4.pdf)
2 changes: 1 addition & 1 deletion content/lessons/data-driven-forecasts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Data-driven models for forecasting"
linkTitle: "Data-driven models"
type: book
weight: 23
weight: 25
summary: A discussion of data-driven models, how they compare to process models, and how they can be used for forecasting, with a focu on Empirical Dynamic Modeling
show_date: false
editable: true
Expand Down
2 changes: 1 addition & 1 deletion content/lessons/election-forecasts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Election forecasts"
linkTitle: "Election forecasts"
type: book
weight: 22
weight: 24
summary: Discussion of modelling approaches and data challenges in election forecasting
show_date: false
editable: true
Expand Down
4 changes: 2 additions & 2 deletions content/lessons/election-forecasts/material.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ show_date: false
editable: true
---

* Reading:[A User's Guide to FiveThirtyEight's 2016 Election Forecast](https://fivethirtyeight.com/features/a-users-guide-to-fivethirtyeights-2016-general-election-forecast/)
* Reading:[Another model to forecast the house elections? Meet Mr. P](https://www.thecrosstab.com/2018/04/20/mrp-house/)
* Reading: [A User's Guide to FiveThirtyEight's 2016 Election Forecast](https://fivethirtyeight.com/features/a-users-guide-to-fivethirtyeights-2016-general-election-forecast/)
* Reading: [Another model to forecast the house elections? Meet Mr. P]()

2 changes: 1 addition & 1 deletion content/lessons/ethics/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Ethics of Ecological Forecasting"
linkTitle: "Forecasting Ethics"
type: book
weight: 26
weight: 28
summary: Discussion focused on ethical issues that can arise when we make predictions about the future
show_date: false
editable: true
Expand Down
2 changes: 1 addition & 1 deletion content/lessons/hurricane-forecasts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Hurricane Forecasts"
linkTitle: "Hurricane Forecasts"
type: book
weight: 21
weight: 23
summary: Learn how the field of hurricane forecasting approaches data and model challenges
show_date: false
editable: true
Expand Down
2 changes: 0 additions & 2 deletions content/lessons/hurricane-forecasts/instructor_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,3 @@ Finding a good and - most improtantly - accessible reading to introduce ecology

> Do you think numerical weather prediction is a good model for ecological forecasting? What issues would we have in applying this approach? Can we overcome them?
* Instructor note: push the students to think about applying something like this to their systems. What types of 'fundamental equations' would they need? What type of data? How intensively collected? How close are we to being able to do this in ecology?

4 changes: 2 additions & 2 deletions content/lessons/intro-to-forecasting/material.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ editable: true

## Readings

* [Ecological forecasting and data assimilation in a data‐rich era](https://pdfs.semanticscholar.org/9ddf/dd71c64715c6c474ac04f6505f3eb95d3e8b.pdf). **Only read through the end of the "Uses of Models for Ecological Forecasting" section.** We are reading the begining this paper because it provides a good background in ecological forecasting.
* [Forecasting Principles & Process Chapter 1](https://www.otexts.org/fpp/1). **Skip section 1.5 on case studies.**
* [Ecological forecasting and data assimilation in a data‐rich era](https://esajournals.onlinelibrary.wiley.com/doi/full/10.1890/09-1275.1). **Only read through the end of the "Uses of Models for Ecological Forecasting" section.** We are reading the beginning this paper because it provides a good background in ecological forecasting.
* [Forecasting Principles & Process Chapter 1](https://otexts.com/fpp3/intro.html). **Skip section 1.5 on case studies. Watching videos is optional**
19 changes: 19 additions & 0 deletions content/lessons/intro-to-gams/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Introduction to Generalized Additive Models (GAMs)"
linkTitle: "Intro to GAMS"
type: book
weight: 17
summary: "An introduction to generalized additive models and how then can be used with time-series"
show_date: false
editable: true
---

{{% callout note %}}

**Learning Objectives:**
* First lesson objective
* Second lesson objective

{{% /callout %}}

{{< list_children >}}
2 changes: 1 addition & 1 deletion content/lessons/scenarios/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Scenario based forecasting"
linkTitle: "Forecasting scenarios"
type: book
weight: 25
weight: 27
summary: Discussion of scenario based approaches to forecasting, which explore general classes of future outcomes to facilitate decision making.
show_date: false
editable: true
Expand Down
2 changes: 1 addition & 1 deletion content/lessons/scenarios/material.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ editable: true

## Reading

[Why global scenarios need ecology](https://pdfs.semanticscholar.org/9c80/a836268cda3be37dce4b6c381601b5e1ce9e.pdf)
[Why global scenarios need ecology](https://d1wqtxts1xzle7.cloudfront.net/43697691/Why_global_scenarios_need_ecology20160313-1679-1sayw8s-libre.pdf?1457918888=&response-content-disposition=inline%3B+filename%3DWhy_global_scenarios_need_ecology.pdf&Expires=1692630235&Signature=Bw3SbMDUGVEOnhJk1pdkUWXe6IlyNnMvMPTZASllRPaMjNu51X85gBEnTamr-I2e1GIJCxQ8eCFaATUEmBX9LyLqk27fN4RgkvsdBcdjyAP3vv9TFQT~WQpjAUcC3K9DsNpBqOhxMLKtWXD4o~oNqNtPOTbjoluttW7kyRjjPQImafRbGXNdZATKA4-c4ZKhXATf9GUBnW-jccez3tCiEB7zCIKqBRSg~IseT~VPSi8xHQwA7YJRvB9HTtsA~dvIojScly8RolCdgPjyjhD35MLA1MXyRz5hi7-aYRzd55SVi4DB44i3DwFlel8ePTWXAYwjCboz1c4zO2ZIEp6p8A__&Key-Pair-Id=APKAJLOHF5GGSLRBV4ZA)
2 changes: 1 addition & 1 deletion content/lessons/species-distribution-models/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Forecasting using species distribution models"
linkTitle: "Species Distribution Models"
type: book
weight: 17
weight: 21
summary: How forecasts are made from species distribution modelings and the challenges associated with these forecasts
show_date: false
editable: true
Expand Down
2 changes: 1 addition & 1 deletion content/lessons/species-distribution-models/material.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ editable: true

## Reading

[Species Distribution Models:Ecological Explanation and Prediction Across Space and Time](http://eurobasin.dtuaqua.dk/eurobasin/documents/Training%20ISM/Elith_and_Leathwick_2009.pdf)
[Species Distribution Models: Ecological Explanation and Prediction Across Space and Time](https://web.archive.org/web/20170809005318id_/http://sysnevo.thu.edu.tw/lib/courses_lib_file/phylogeography_file/elith_leathwick_2009.pdf)
Loading

0 comments on commit 1e00ec1

Please sign in to comment.