Skip to content

Commit

Permalink
Update vignette.
Browse files Browse the repository at this point in the history
  • Loading branch information
darrennorris committed Jul 23, 2024
1 parent 662ba91 commit c372840
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion vignettes/Interactive-map.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ library(kableExtra)
library(htmltools)
library(patchwork)
```

```{r main-result, echo=FALSE}
tot_t0 <- sum(points_bau_ffr$fem_t0)
tot_t42 <- floor(sum(points_bau_ffr$fem_t42))
pop_change_42 <- (tot_t42 - tot_t0) / tot_t0
change_value <- round(abs(pop_change_42) * 100, 1)
diff_boot <- Hmisc::smean.cl.boot(points_bau_ffr$fem_diff_t42)
pop_change_42_lcl <- diff_boot["Lower"]
pop_change_42_ucl <- diff_boot["Upper"]
pop_change_42_q25 <- quantile(points_bau_ffr$fem_diff_t42, probs =0.25)
pop_change_42_q75 <- quantile(points_bau_ffr$fem_diff_t42, probs =0.75)
# Bootstrap resample to get quantile distribution.
```


Use the interactive map below to check population changes. Zoom in to see
where *Podocnemis unilfilis* is Endangered based on IUCN Red List criteria - A3bd.

Expand All @@ -49,6 +66,9 @@ This is an extension of [Norris et. al. 2019](https://doi.org/10.1016/j.biocon.2
- Stochastic population projections.
- Future impacts to populations caused by human acessibility (hunting and habitat change) and actions that reduce river connectivity.

Overall the adult female population is predicted to decline by `r change_value`%
in the future.

## Map
Due to the number of points, the map can become slow to respond when you zoom in.
Zoom out to a level showing fewer points and you can pan around the map
Expand Down Expand Up @@ -353,7 +373,7 @@ knitr::kable(table_basin_country,
```


```{r data-basin-country-ffr, echo=FALSE}
```{r data-basin-country-ffr, echo=FALSE, message=FALSE, warning=FALSE}
# Make summaries
tab_sum <- points_bau_ffr |>
dplyr::mutate(flag_EN = if_else(fem_diff_t42 <= -0.5, 1, 0)) |>
Expand Down Expand Up @@ -397,6 +417,7 @@ knitr::kable(col.names = c("Basin", "Country", "population change",
```


The table values can also be presented graphically.
This enables a more comprehensive understanding of the patterns.

Expand Down

0 comments on commit c372840

Please sign in to comment.