Skip to content

Commit

Permalink
Start headings at h2
Browse files Browse the repository at this point in the history
The document title is typically rendered as a h1 heading. Headings in the document therefore better start at h2.
  • Loading branch information
peterdesmet committed Dec 6, 2024
1 parent c780b2b commit 63bd83d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions vignettes/articles/detection-process.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ library(dplyr) # data wrangling
library(ggplot2) # data visualisation
```

# Input
## Input

The functions are set up such that a single polygon as input is enough to go through this workflow using default arguments.
The user can change these arguments to allow for more flexibility.
Expand Down Expand Up @@ -77,7 +77,7 @@ ggplot() +
theme_minimal()
```

# Detect occurrences
## Detect occurrences

We have our occurrences, but not all occurrences are generally observed.
The detection of occurrences depends on the detection probability of a species
Expand Down Expand Up @@ -214,7 +214,7 @@ ggplot() +
theme_minimal()
```

# Example
## Example

Now that we know how the supporting functions work, we can simulate the detection process using the `sample_observations()` function.
We can for example state that our species has a 0.9 detection probability and this time we say there is a very small chance to detect it on the road.
Expand Down Expand Up @@ -246,7 +246,7 @@ ggplot() +
theme_minimal()
```

# Adding coordinate uncertainty
## Adding coordinate uncertainty

To mimic real life data collection, we can finally add coordinate uncertainty to our observations.
We only keep the detected occurrences of the previous example.
Expand Down
6 changes: 3 additions & 3 deletions vignettes/articles/grid-designation-process.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ library(ggplot2) # data visualisation
library(ggExtra) # enhance data visualisation
```

# Input
## Input

The functions are set up such that a single polygon as input is enough to go through this workflow using default arguments.

Expand Down Expand Up @@ -173,7 +173,7 @@ ggplot() +
theme_minimal()
```

# Grid designation
## Grid designation

Now we can make a data cube from our observations while taking into account the uncertainty.
We can create the grid using the `grid_designation()` function.
Expand Down Expand Up @@ -319,7 +319,7 @@ ggExtra::ggMarginal(scatter_normal, type = "histogram")

If no coordinate uncertainty is provided, the original observation point is used for grid designation.

# Example
## Example

Now we know how to use the randomisation in `grid_designation()`.
By default we use uniform randomisation.
Expand Down
8 changes: 4 additions & 4 deletions vignettes/articles/multi_species_approach.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ library(dplyr) # data wrangling
library(ggplot2) # data visualisation
```

# Spatial extend
## Spatial extend

As input, we create a polygon in which we simulate occurrences.
It represents the spatial extend of the species.
Expand Down Expand Up @@ -99,7 +99,7 @@ ggplot() +
theme_minimal()
```

# Input dataframe
## Input dataframe

To generate cubes for multiple species efficiently, we create a dataframe where each row represents a different species and where we specify all arguments to be used by the main cube simulation functions, viz `simulate_occurrences()`, `sample_observations()`, `filter_observations()`, `add_coordinate_uncertainty()`, and `grid_designation()`, in separate columns.
The values within these columns can change between species.
Expand Down Expand Up @@ -177,7 +177,7 @@ multi_species_dataset2 <- generate_taxonomy(
identical(multi_species_dataset1, multi_species_dataset2)
```

# Mapping the simulation process over each row/species
## Mapping the simulation process over each row/species

Each cube simulation function has a mapping companion.
These mapping functions apply the single-species operations for each row using the `purrr::pmap()` strategy.
Expand Down Expand Up @@ -298,7 +298,7 @@ map_occ_cube_df3 <- multi_species_dataset2_renamed %>%
glimpse(map_occ_cube_df3)
```

# Visualise examples
## Visualise examples

Let's visualise the output for two of the six species.

Expand Down
10 changes: 5 additions & 5 deletions vignettes/articles/occurrence-process.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ library(ggplot2) # data visualisation
library(tidyterra) # visualisation spatraster objects
```

# Input
## Input

The functions are set up such that a single polygon as input is enough to go through this workflow using default arguments.
The user can change these arguments to allow for more flexibility.
Expand All @@ -53,7 +53,7 @@ ggplot() +
theme_minimal()
```

# Simulate occurrences
## Simulate occurrences

We generate occurrence points within the polygon using the `simulate_occurrences()` function.
Default arguments ensure that an sf object with POLYGON geometry is sufficient to simulate occurrences.
Expand All @@ -64,7 +64,7 @@ Default arguments ensure that an sf object with POLYGON geometry is sufficient t

The options for user defined arguments are demonstrated in the next subsections.

## Changing number of occurrences over time
### Changing number of occurrences over time

Say we want to have 100 occurrences in our plot over 10 years.
You can change the trend in the average number of occurrences over time.
Expand Down Expand Up @@ -192,7 +192,7 @@ tibble(
theme_minimal()
```

## Changing the degree of spatial clustering
### Changing the degree of spatial clustering

We can also choose the amount of spatial clustering.
We visualise this with the supporting functions used in `simulate_occurrences()`.
Expand Down Expand Up @@ -317,7 +317,7 @@ ggplot() +
theme_minimal()
```

# Example
## Example

Now that we know how the supporting functions work, we can generate occurrence points within the polygon using the `simulate_occurrences()` function.
We can for example sample randomly within the polygon over 6 time points were we use a random walk over time with an initial average number of occurrences equal to 100.
Expand Down

0 comments on commit 63bd83d

Please sign in to comment.