Skip to content

Commit

Permalink
Add salps study
Browse files Browse the repository at this point in the history
  • Loading branch information
btupper committed Sep 25, 2024
1 parent a28dfbd commit a4cb2c4
Show file tree
Hide file tree
Showing 66 changed files with 814 additions and 495 deletions.
2 changes: 2 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ website:
contents:
- href: index.qmd
text: Home
- href: salps.qmd
text: Salpsae
- href: about.qmd
text: About
tools:
Expand Down
267 changes: 37 additions & 230 deletions docs/about.html

Large diffs are not rendered by default.

289 changes: 42 additions & 247 deletions docs/index.html

Large diffs are not rendered by default.

582 changes: 582 additions & 0 deletions docs/salps.html

Large diffs are not rendered by default.

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.
17 changes: 9 additions & 8 deletions docs/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
"href": "index.html",
"title": "Jellycast",
"section": "",
"text": "here() starts at /mnt/s1/projects/ecocast/projects/jellyscape\n\n\nFor the Jellyscape project observations are drawn from a recent release of unstaged ECOMON data. We choose the following groups to belong to the gelatinous “jellyscape” although the list is easily modified.\n\nSiphonophores (siph)\nHydromedusea (hydrom)\nCoelenterates (coel)\nCtenophores (ctenop)\nSalps (salps)\n\nThese we can read from the ecomon package and aggregate these species into a count per unit area (10m^2) or count per unit volume (100m^3). Accepting the defaults for the read_ecomon_spp() function yields an aggregated (summed) table for areal abundance for the 5 groups listed.\n\n1 The Ecomon observation data\nHere we show the general distribution of records for the 5 groups listed. Later we show more detailed per-group analyses.\n\n\n\n\n\n\n\n\n\nTo study just the listed groups, we reduce the data set by discarding all non-listed groups and provide an aggregate abundance as shown above. For the selected groups the data covers 1977-02-13 through 2021-11-15 with 32693 records of observation.\nOver the years the number of observations has decreased (that isn’t to say that the effort has decreased.) The survey effort is concentrated in spring and autumn months.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Back to top",
"crumbs": [
"Home"
]
"text": "here() starts at /mnt/s1/projects/ecocast/projects/jellyscape\n\n\nFor the Jellyscape project observations are drawn from a recent release of unstaged ECOMON data. We choose the following groups to belong to the gelatinous “jellyscape” although the list is easily modified.\n\nSiphonophores (siph)\nHydromedusea (hydrom)\nCoelenterates (coel)\nCtenophores (ctenop)\nSalps (salps)\n\nThese we can read from the ecomon package and aggregate these species into a count per unit area (10m^2) or count per unit volume (100m^3). Accepting the defaults for the read_ecomon_spp() function yields an aggregated (summed) table for areal abundance for the 5 groups listed.\n\n1 The Ecomon observation data\nHere we show the general distribution of records for the 5 groups listed. Later we show more detailed per-group analyses.\n\n\n\n\n\nTo study just the listed groups, we reduce the data set by discarding all non-listed groups and provide an aggregate abundance as shown above. For the selected groups the data covers 1977-02-13 through 2021-11-15 with 32693 records of observation.\nOver the years the number of observations has decreased (that isn’t to say that the effort has decreased.) The survey effort is concentrated in spring and autumn months.\n\n\n\n\n\n\n\n\n\n\n\n\n Back to top"
},
{
"objectID": "observations.html",
Expand All @@ -21,9 +18,13 @@
"href": "about.html",
"title": "About",
"section": "",
"text": "The jellyscape project was developed at Bigelow Laboratory’s Tandy Center for Ocean Forecasting to aid in the development of modeling studies requiring either observation/abundance point data or to modeled rasterized layers for subsequent use in modeling studies. Use the github issues tracker to post questions or report issues.\n\n\n\n Back to top",
"crumbs": [
"About"
]
"text": "The jellyscape project was developed at Bigelow Laboratory’s Tandy Center for Ocean Forecasting to aid in the development of modeling studies requiring either observation/abundance point data or to modeled rasterized layers for subsequent use in modeling studies. Use the github issues tracker to post questions or report issues.\n\n\n\n Back to top"
},
{
"objectID": "salps.html",
"href": "salps.html",
"title": "Salpsae",
"section": "",
"text": "here() starts at /mnt/s1/projects/ecocast/projects/jellyscape\n\n\n\nthisgroup = \"Salps\"\nx = read_ecomon_spp(form = 'sf', groups = thisgroup, agg = FALSE) |>\n ecomon_to_long() |>\n dplyr::mutate(year = format(date, \"%Y\") ,\n month = factor(format(date, \"%b\"), levels = month.abb))\nnonz = dplyr::filter(x, value > 0)\nzero = dplyr::filter(x, value <= 0)\nn = nrow(x)\nnz = zero |> nrow()\ncoast = sf::st_crop(coast, x)\n\nThere are 32693 records for salps of which 23202 are zeroes (about 70.97%) leaving 9491 non-zero salp abundance records.\n\n1 Non-zero abundances\nHere’s an abudnance scaled plot of the non-zero abundances.\n\n\nCode\nplot(nonz['value'],\n pch = \".\",\n logz = TRUE,\n main = glue::glue(\"Non-zero abundance of {thisgroup}\"),\n axes = TRUE,\n reset = FALSE)\nplot(coast, add = TRUE, col = \"black\")\n\n\n\n\n\n\n\nCode\nggplot(data = dplyr::group_by(nonz, year), \n mapping = aes(x = year)) +\n geom_bar() +\n theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + \n labs(y = \"Record count\", title = glue::glue(\"Non-zero abundance {thisgroup} Records by Year\"))\n\n\n\n\n\nCode\nggplot(data = dplyr::group_by(nonz, month), \n mapping = aes(x = month)) +\n geom_bar() +\n theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + \n labs(y = \"Record count\", title = glue::glue(\"Non-zero abundance {thisgroup} Records by Month\"))\n\n\n\n\n\n\n\n2 Zero Abundance (i.e. absences)\nThe distribution of zero abundance records is much more extensive.\n\n\nCode\nplot(zero['value'] |>\n dplyr::filter(value <= 0) |>\n sf::st_geometry(),\n pch = \".\",\n main = glue::glue(\"Zero abundance presences {thisgroup}\"),\n axes = TRUE,\n reset = FALSE)\nplot(coast, add = TRUE, col = \"black\")\n\n\n\n\n\n\n\nCode\nggplot(data = dplyr::group_by(zero, year), \n mapping = aes(x = year)) +\n geom_bar() +\n theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + \n labs(y = \"Record count\", title = glue::glue(\"Zero abundance {thisgroup} Records by Year\"))\n\n\n\n\n\nCode\nggplot(data = dplyr::group_by(zero, month), \n mapping = aes(x = month)) +\n geom_bar() +\n theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + \n labs(y = \"Record count\", title = glue::glue(\"Zero abudnance {thisgroup} Records by Month\"))\n\n\n\n\n\n\n\n3 A closer look at non-zero abundances\n\nqs = quantile(nonz$value, seq(from = 0.1, to = 1, by = 0.1))\nix = findInterval(nonz$value, qs, all.inside = TRUE)\nnonz = dplyr::mutate(nonz,\n percentile = factor(names(qs)[ix], levels = names(qs)))\n\n\n\nCode\nggplot(data = nonz) + \n geom_sf(alpha = 0.1, size = 0.3) + \n geom_sf(data = coast, \n color = \"orange\") +\n facet_wrap(~percentile)\n\n\n\n\n\n\n\n\n\n Back to top"
}
]
12 changes: 5 additions & 7 deletions docs/site_libs/bootstrap/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/site_libs/quarto-html/quarto-syntax-highlighting.css

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

1 change: 1 addition & 0 deletions index_cache/html/__packages
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ workflows
workflowsets
yardstick
ecomon
glue
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 not shown.
Binary file not shown.
Binary file not shown.
107 changes: 107 additions & 0 deletions salps.qmd
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)
```
28 changes: 28 additions & 0 deletions salps_cache/html/__packages
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 not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file added salps_files/figure-html/unnamed-chunk-1-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 added salps_files/figure-html/unnamed-chunk-1-2.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 added salps_files/figure-html/unnamed-chunk-2-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 added salps_files/figure-html/unnamed-chunk-2-2.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 added salps_files/figure-html/unnamed-chunk-3-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 added salps_files/figure-html/unnamed-chunk-4-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 added salps_files/figure-html/unnamed-chunk-4-2.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 added salps_files/figure-html/unnamed-chunk-5-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 added salps_files/figure-html/unnamed-chunk-6-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' `github` packages can be installed with `remotes::install_github()`
packages = list(
cran = c("RColorBrewer", "here", "remotes", "tidyr", "readr", "sf", "stars",
"rnaturalearth", "tidymodels", "dplyr"),
"glue", "rnaturalearth", "tidymodels", "dplyr"),
github = c(ecomon = "BigelowLab")
)

Expand Down

0 comments on commit a4cb2c4

Please sign in to comment.