-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
814 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,4 @@ workflows | |
workflowsets | ||
yardstick | ||
ecomon | ||
glue |
Binary file removed
BIN
-2.73 KB
index_cache/html/read_ecomon_66221141b94a0ab4a031fbbf5b3c9d80.RData
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+472 KB
...etup_51902160f1097e345220b5fe0863d70b.rdb → ...etup_8588234207bbb457fbcad223a01867d6.rdb
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-2.74 KB
index_cache/html/show_by_date_65724d5f6d47d3296714199468c40ed3.RData
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
--- | ||
title: "Salpsae" | ||
format: | ||
html: | ||
code-fold: true | ||
--- | ||
|
||
```{r setup, echo = FALSE} | ||
source("setup.R") | ||
groups = names(default_groups()) | ||
coast = read_coast() | ||
``` | ||
|
||
```{r read_ecomon, message=FALSE} | ||
#| code-fold: false | ||
thisgroup = "Salps" | ||
x = read_ecomon_spp(form = 'sf', groups = thisgroup, agg = FALSE) |> | ||
ecomon_to_long() |> | ||
dplyr::mutate(year = format(date, "%Y") , | ||
month = factor(format(date, "%b"), levels = month.abb)) | ||
nonz = dplyr::filter(x, value > 0) | ||
zero = dplyr::filter(x, value <= 0) | ||
n = nrow(x) | ||
nz = zero |> nrow() | ||
coast = sf::st_crop(coast, x) | ||
``` | ||
|
||
There are `r n` records for `salps` of which `r nz` are zeroes (about `r sprintf("%0.2f%%", nz/n*100)`) leaving `r n-nz` non-zero salp abundance records. | ||
|
||
# Non-zero abundances | ||
|
||
Here's an abudnance scaled plot of the non-zero abundances. | ||
```{r} | ||
plot(nonz['value'], | ||
pch = ".", | ||
logz = TRUE, | ||
main = glue::glue("Non-zero abundance of {thisgroup}"), | ||
axes = TRUE, | ||
reset = FALSE) | ||
plot(coast, add = TRUE, col = "black") | ||
``` | ||
|
||
|
||
```{r, warning=FALSE} | ||
ggplot(data = dplyr::group_by(nonz, year), | ||
mapping = aes(x = year)) + | ||
geom_bar() + | ||
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + | ||
labs(y = "Record count", title = glue::glue("Non-zero abundance {thisgroup} Records by Year")) | ||
ggplot(data = dplyr::group_by(nonz, month), | ||
mapping = aes(x = month)) + | ||
geom_bar() + | ||
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + | ||
labs(y = "Record count", title = glue::glue("Non-zero abundance {thisgroup} Records by Month")) | ||
``` | ||
|
||
|
||
|
||
# Zero Abundance (*i.e.* absences) | ||
|
||
The distribution of zero abundance records is much more extensive. | ||
|
||
```{r} | ||
plot(zero['value'] |> | ||
dplyr::filter(value <= 0) |> | ||
sf::st_geometry(), | ||
pch = ".", | ||
main = glue::glue("Zero abundance presences {thisgroup}"), | ||
axes = TRUE, | ||
reset = FALSE) | ||
plot(coast, add = TRUE, col = "black") | ||
``` | ||
|
||
```{r, warning=FALSE} | ||
ggplot(data = dplyr::group_by(zero, year), | ||
mapping = aes(x = year)) + | ||
geom_bar() + | ||
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + | ||
labs(y = "Record count", title = glue::glue("Zero abundance {thisgroup} Records by Year")) | ||
ggplot(data = dplyr::group_by(zero, month), | ||
mapping = aes(x = month)) + | ||
geom_bar() + | ||
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + | ||
labs(y = "Record count", title = glue::glue("Zero abudnance {thisgroup} Records by Month")) | ||
``` | ||
|
||
|
||
# A closer look at non-zero abundances | ||
|
||
```{r} | ||
#| code-fold: false | ||
qs = quantile(nonz$value, seq(from = 0.1, to = 1, by = 0.1)) | ||
ix = findInterval(nonz$value, qs, all.inside = TRUE) | ||
nonz = dplyr::mutate(nonz, | ||
percentile = factor(names(qs)[ix], levels = names(qs))) | ||
``` | ||
|
||
|
||
```{r} | ||
ggplot(data = nonz) + | ||
geom_sf(alpha = 0.1, size = 0.3) + | ||
geom_sf(data = coast, | ||
color = "orange") + | ||
facet_wrap(~percentile) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
RColorBrewer | ||
here | ||
remotes | ||
tidyr | ||
readr | ||
sf | ||
abind | ||
stars | ||
glue | ||
rnaturalearth | ||
tidymodels | ||
broom | ||
scales | ||
dials | ||
dplyr | ||
ggplot2 | ||
infer | ||
modeldata | ||
parsnip | ||
purrr | ||
recipes | ||
rsample | ||
tibble | ||
tune | ||
workflows | ||
workflowsets | ||
yardstick | ||
ecomon |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.91 KB
salps_cache/html/unnamed-chunk-1_764839728c57a9f089066ef86ecb22bc.RData
Binary file not shown.
Empty file.
Binary file added
BIN
+125 Bytes
salps_cache/html/unnamed-chunk-1_764839728c57a9f089066ef86ecb22bc.rdx
Binary file not shown.
Binary file added
BIN
+3.01 KB
salps_cache/html/unnamed-chunk-2_c66b5f6e905053ced761195f13387dd0.RData
Binary file not shown.
Empty file.
Binary file added
BIN
+125 Bytes
salps_cache/html/unnamed-chunk-2_c66b5f6e905053ced761195f13387dd0.rdx
Binary file not shown.
Binary file added
BIN
+2.95 KB
salps_cache/html/unnamed-chunk-3_973e5fa6d09ef31014b0c9866f714e2a.RData
Binary file not shown.
Empty file.
Binary file added
BIN
+125 Bytes
salps_cache/html/unnamed-chunk-3_973e5fa6d09ef31014b0c9866f714e2a.rdx
Binary file not shown.
Binary file added
BIN
+3.02 KB
salps_cache/html/unnamed-chunk-4_097c88ee274925170aa31b29c0f90ae4.RData
Binary file not shown.
Empty file.
Binary file added
BIN
+125 Bytes
salps_cache/html/unnamed-chunk-4_097c88ee274925170aa31b29c0f90ae4.rdx
Binary file not shown.
Binary file added
BIN
+2.88 KB
salps_cache/html/unnamed-chunk-5_22199ce216f2b49a2bb6ba6c7655c70b.RData
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+169 Bytes
salps_cache/html/unnamed-chunk-5_22199ce216f2b49a2bb6ba6c7655c70b.rdx
Binary file not shown.
Binary file added
BIN
+2.87 KB
salps_cache/html/unnamed-chunk-6_51fea5c3027524eee0313e625a7ff0b9.RData
Binary file not shown.
Empty file.
Binary file added
BIN
+125 Bytes
salps_cache/html/unnamed-chunk-6_51fea5c3027524eee0313e625a7ff0b9.rdx
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters