Skip to content

Commit

Permalink
address spell check using R CMD CHECK and regenerate pkgdown
Browse files Browse the repository at this point in the history
  • Loading branch information
xp-song committed Oct 28, 2022
1 parent feb2437 commit 4b6e19f
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 21 deletions.
8 changes: 4 additions & 4 deletions docs/articles/apply-models.html

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions docs/articles/build-models.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/more/animals-simulate-missing-surveys.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/process-landscape.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ <h2 id="remotely-sensed-land-cover">1. Remotely sensed land cover<a class="ancho
NDVI is a measure of healthy green vegetation, based on the tendency of
plants to reflect NIR &amp; absorb red light. It ranges from -1
(non-vegetated) to 1 (densely vegetated). The figure below shows the
histogram of NDVI values withiin Punggol, as well as the adaptively
histogram of NDVI values within Punggol, as well as the adaptively
derived threshold value (vertical line).</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">ndvi_mosaic</span> <span class="op">&lt;-</span>
Expand Down
4 changes: 2 additions & 2 deletions docs/articles/use-cases.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ articles:
process-animal: process-animal.html
process-landscape: process-landscape.html
use-cases: use-cases.html
last_built: 2022-10-28T07:34Z
last_built: 2022-10-28T07:57Z
urls:
reference: https://ecological-cities.github.io/biodivercity/reference
article: https://ecological-cities.github.io/biodivercity/articles
Expand Down
2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<loc>https://ecological-cities.github.io/biodivercity/reference/sampling_points.html</loc>
</url>
<url>
<loc>https://ecological-cities.github.io/biodivercity/reference/standard_SR.html</loc>
<loc>https://ecological-cities.github.io/biodivercity/reference/standard_sr.html</loc>
</url>
<url>
<loc>https://ecological-cities.github.io/biodivercity/reference/tally_observations.html</loc>
Expand Down
35 changes: 35 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,38 @@ ebird
Hirundinidae
Hirundo
tahitica
etc
Brassica
GLMM
GLMMs
Giam
HTW
KY
Kurukulasuriya
PCNM
NIR
Neto
Peres
Przeslawski
RDA
Radke
Rajathurai
Siwabessy
Teo
Tran
YF
biodiversity'
decompose'
etc
gamma'
geostatistical
gui
knitr
landscapemetrics
performance'
png
rustica
spp
subzones
ΔAIC
β
6 changes: 3 additions & 3 deletions vignettes/build-models.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ rm(birds, birds_scaled, predictors, subset_exp,

## 2. Community (_Beta_) diversity

Partial RDA models were used to model the relationship between animal communities and landscape predictors while considering also the inherent spatial structure of the animal communities. Similarly, variable selection by random forest was performed on the landscape variables prior to beta model building. In the following sections, the example variables were selected using the `randomForestSRC` and `MultivariateRandomForest` packages. After the first round of variable selection, the landscape predictors were summerised as Principal Component Analysis (PCA) axes while the spatial variation were quantified using Principle Coordinates of Neighbourhood Matrices (PCNM).
Partial RDA models were used to model the relationship between animal communities and landscape predictors while considering also the inherent spatial structure of the animal communities. Similarly, variable selection by random forest was performed on the landscape variables prior to beta model building. In the following sections, the example variables were selected using the `randomForestSRC` and `MultivariateRandomForest` packages. After the first round of variable selection, the landscape predictors were summarised as Principal Component Analysis (PCA) axes while the spatial variation were quantified using Principle Coordinates of Neighbourhood Matrices (PCNM).

First, load the additional package `vegan` for beta diversity model building:

Expand Down Expand Up @@ -330,15 +330,15 @@ birds.rda.fin <- rda(bird_com ~ PC1 + PC2 + PC4 + PC6 + PC7 + PC8 + Condition(PC
```

The predictive β-diversity model also requires information on the average probability of each species occurring across all points.
The predictive _Beta_-diversity model also requires information on the average probability of each species occurring across all points.

```{r p-hats}
# fitted_126 <- fitted(birds1.rda.fin, model = "CCA")
p_hats_birds <- apply(bird_com, 2, mean)
p_hats_birds
```

The PCA axes, PNCM vectors, final RDA model and probability of species occurence are saved out to be applied in the subsequent apply model section.
The PCA axes, PCNM vectors, final RDA model and probability of species occurrence are saved out to be applied in the subsequent apply model section.

```{r save beta model objs, eval = FALSE}
save(pca_birds,
Expand Down
2 changes: 1 addition & 1 deletion vignettes/more/animals-simulate-missing-surveys.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ knitr::kable(head(scenarios), caption = "**First few rows of the object `scenari

<br>

## Visualise reuslts
## Visualise results

These 100 bootstrapped scenarios may be used in further analyses, or visualised to observe the variation in species richness within the sampled area of interest (Punggol):

Expand Down
2 changes: 1 addition & 1 deletion vignettes/process-landscape.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ mosaic_sen2r(parent_dir = paste0(output_dir, "/sen2r"))

<br>

At this point, we have a single image mosaic (continuous raster) for each spectral index, for a given area/period of interest. While the continuous values from these rasters may be used directly in analyses, there may be instances were we want to work with discrete classes of land cover. To do so, we can classify pixels into one of two classes (e.g. vegetated or non-vegetated; water or non-water), based on an adaptively derived threshold value. For example, we can use Otsu's thresholding ([Otsu, 1979](https://cw.fel.cvut.cz/wiki/_media/courses/a6m33bio/otsu.pdf)), which tends to outperform other techniques in terms of stability of results and processing speed, even with the presence of > 2 peaks in the histogram of pixel values ([Bouhennache et al., 2019](https://www.tandfonline.com/doi/abs/10.1080/10106049.2018.1497094)). This can be implemented using the function `threshold_otsu()`. As an example, let's load the NDVI raster for the Punggol area in Singapore for subsequent classification. The NDVI is a measure of healthy green vegetation, based on the tendency of plants to reflect NIR & absorb red light. It ranges from -1 (non-vegetated) to 1 (densely vegetated). The figure below shows the histogram of NDVI values withiin Punggol, as well as the adaptively derived threshold value (vertical line).
At this point, we have a single image mosaic (continuous raster) for each spectral index, for a given area/period of interest. While the continuous values from these rasters may be used directly in analyses, there may be instances were we want to work with discrete classes of land cover. To do so, we can classify pixels into one of two classes (e.g. vegetated or non-vegetated; water or non-water), based on an adaptively derived threshold value. For example, we can use Otsu's thresholding ([Otsu, 1979](https://cw.fel.cvut.cz/wiki/_media/courses/a6m33bio/otsu.pdf)), which tends to outperform other techniques in terms of stability of results and processing speed, even with the presence of > 2 peaks in the histogram of pixel values ([Bouhennache et al., 2019](https://www.tandfonline.com/doi/abs/10.1080/10106049.2018.1497094)). This can be implemented using the function `threshold_otsu()`. As an example, let's load the NDVI raster for the Punggol area in Singapore for subsequent classification. The NDVI is a measure of healthy green vegetation, based on the tendency of plants to reflect NIR & absorb red light. It ranges from -1 (non-vegetated) to 1 (densely vegetated). The figure below shows the histogram of NDVI values within Punggol, as well as the adaptively derived threshold value (vertical line).

```{r}
ndvi_mosaic <-
Expand Down

0 comments on commit 4b6e19f

Please sign in to comment.