Skip to content

Commit

Permalink
ready for bios2 training sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoisot committed Oct 27, 2023
1 parent ea779b4 commit 8e2311d
Show file tree
Hide file tree
Showing 40 changed files with 32,186 additions and 38,176 deletions.
6 changes: 3 additions & 3 deletions _freeze/slides/execute-results/html.json

Large diffs are not rendered by default.

Binary file modified _freeze/slides/figure-revealjs/cell-11-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32,033 changes: 16,009 additions & 16,024 deletions _freeze/slides/figure-revealjs/cell-21-output-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/slides/figure-revealjs/cell-28-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/slides/figure-revealjs/cell-29-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/slides/figure-revealjs/cell-30-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/slides/figure-revealjs/cell-31-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/slides/figure-revealjs/cell-34-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/slides/figure-revealjs/cell-35-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/slides/figure-revealjs/cell-38-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/slides/figure-revealjs/cell-40-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _freeze/slides/figure-revealjs/cell-6-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
312 changes: 157 additions & 155 deletions docs/index.html

Large diffs are not rendered by default.

Binary file not shown.
Binary file modified docs/slides_files/figure-revealjs/cell-11-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
4,233 changes: 0 additions & 4,233 deletions docs/slides_files/figure-revealjs/cell-20-output-1.svg

This file was deleted.

32,033 changes: 16,009 additions & 16,024 deletions docs/slides_files/figure-revealjs/cell-21-output-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,148 changes: 0 additions & 1,148 deletions docs/slides_files/figure-revealjs/cell-23-output-1.svg

This file was deleted.

Binary file not shown.
583 changes: 0 additions & 583 deletions docs/slides_files/figure-revealjs/cell-25-output-1.svg

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file modified docs/slides_files/figure-revealjs/cell-28-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/slides_files/figure-revealjs/cell-29-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/slides_files/figure-revealjs/cell-30-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/slides_files/figure-revealjs/cell-31-output-1.png
Diff not rendered.
Diff not rendered.
Binary file modified docs/slides_files/figure-revealjs/cell-34-output-1.png
Binary file modified docs/slides_files/figure-revealjs/cell-35-output-1.png
Diff not rendered.
Diff not rendered.
Binary file modified docs/slides_files/figure-revealjs/cell-38-output-1.png
Binary file modified docs/slides_files/figure-revealjs/cell-40-output-1.png
Diff not rendered.
Binary file modified docs/slides_files/figure-revealjs/cell-6-output-1.png
Diff not rendered.
14 changes: 8 additions & 6 deletions slides.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ boundingbox = (

## Bioclimatic data

We collect BioClim data from CHELSA v1, using `SpeciesDistributionToolkit`
We collect BioClim data from WorldClim v2, using `SpeciesDistributionToolkit`

```{julia}
#| label: Download the BioClim data from WorldClim2
#| eval: true
#| echo: true
#| output: false
provider = RasterData(WorldClim2, BioClim)
opts = (; resolution=10.0)
opts = (; resolution=2.5)
temperature = SimpleSDMPredictor(provider, layer=1; opts..., boundingbox...)
```

Expand All @@ -131,7 +131,7 @@ water =
SimpleSDMPredictor(RasterData(EarthEnv, LandCover), layer=12; boundingbox...)
land = similar(temperature, Bool)
replace!(land, false => true)
for k in keys(land)
Threads.@threads for k in keys(land)
if !isnothing(water[k])
if water[k] == 100
land[k] = false
Expand Down Expand Up @@ -176,14 +176,16 @@ end

## Background points generation

We generate background points proportionally to the distance away from observations
We generate background points proportionally to the distance away from observations, but penalize the cells that are larger due to projection

```{julia}
#| label: Make the pseudo-absence buffer
#| eval: true
#| echo: true
#| output: false
possible_background = pseudoabsencemask(DistanceToEvent, presence_layer)
possible_background =
pseudoabsencemask(DistanceToEvent, presence_layer) *
cellsize(temperature)
```

And then we sample three pseudo-absence for each occurrence:
Expand Down Expand Up @@ -355,7 +357,7 @@ It's a good idea to check the values for the training sets too...

## Variable selection

We add variables one at a time, until the Matthew's Correlation Coefficient stops increasing -- we keep annual temperature, isothermality, mean diurnal range, and annual precipitation
We add variables one at a time, until the Matthew's Correlation Coefficient stops increasing:

```{julia}
#| echo: true
Expand Down

0 comments on commit 8e2311d

Please sign in to comment.