Skip to content

Commit

Permalink
sdmverse 0.1.0.9020: app fix following review
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainschmitt committed Aug 19, 2024
1 parent 27c55e9 commit 557b57a
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 48 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
sdmverse 0.1.0.9020

- app fix following review

sdmverse 0.1.0.9019

- #38 cleaning
Expand Down
6 changes: 4 additions & 2 deletions R/plot_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ plot_table <- function(
theme_bw() +
scale_x_discrete(position = "top") +
theme(
axis.text.x.top = element_text(color = pkg_cols, angle = 90, size = 14,
hjust = 0, vjust = 0.5, face = "bold"),
axis.text.x.top = element_text(
color = pkg_cols, angle = 90, size = 14,
hjust = 0, vjust = 0.5, face = "bold"
),
axis.text.y = element_text(size = 14),
axis.title = element_blank(),
legend.position = "none"
Expand Down
5 changes: 4 additions & 1 deletion inst/app/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ library(dplyr)

shinyServer(function(input, output) {
# packages
packages <- sdmverse::prep_table(where = "online")
packages <- sdmverse::list_packages(where = "online") %>%
select(
-author, -cran, -description, -manuscript_citation
)

# to further play with the table
tab <- reactive({
Expand Down
23 changes: 3 additions & 20 deletions inst/extdata/packages/bamm.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
name : bamm
title: "Species Distribution Models as a Function of Biotic, Abiotic and
Movement Factors (BAM)"
version: 0.4.3
author: "Luis Osorio-Olvera, Jorge Soberón"
version: 0.5.0
author: "Luis Osorio-Olvera, Jorge Soberón, Rusby G. Contreras-Díaz"
maintainer: "Luis Osorio-Olvera <[email protected]>"
cran: yes
repository: "https://github.com/luismurao/bamm"
description: "Species Distribution Modeling (SDM) is a practical methodology
that aims to estimate the area of distribution of a species. However,
most of the work has focused on estimating static expressions of the
correlation between environmental variables. The outputs of
correlative species distribution models can be interpreted
as maps of the suitable environment for a species but not generally as maps
of its actual distribution.
Soberón and Peterson (2005) <doi:10.17161/bi.v2i0.4> presented
the BAM scheme, a heuristic framework that states that the occupied area of
a species occurs on sites that have been accessible through dispersal (M) and
have both favorable biotic (B) and abiotic conditions (A).
The 'bamm' package implements classes and functions to operate on each element
of the BAM and by using a cellular automata model where the occupied area
of a species at time t is estimated by the multiplication of three
binary matrices: one matrix represents movements (M), another
abiotic -niche- tolerances (A), and a third, biotic interactions (B).
The theoretical background of the package can be found in
Soberón and Osorio-Olvera (2022) <arXiv:2212.06308>."
description: "Species Distribution Modeling (SDM) is a practical methodology that aims to estimate the area of distribution of a species. However, most of the work has focused on estimating static expressions of the correlation between environmental variables. The outputs of correlative species distribution models can be interpreted as maps of the suitable environment for a species but not generally as maps of its actual distribution. Soberón and Peterson (2005) <doi:10.17161/bi.v2i0.4> presented the BAM scheme, a heuristic framework that states that the occupied area of a species occurs on sites that have been accessible through dispersal (M) and have both favorable biotic (B) and abiotic conditions (A). The 'bamm' package implements classes and functions to operate on each element of the BAM and by using a cellular automata model where the occupied area of a species at time t is estimated by the multiplication of three binary matrices: one matrix represents movements (M), another abiotic -niche- tolerances (A), and a third, biotic interactions (B). The theoretical background of the package can be found in Soberón and Osorio-Olvera (2023) <doi:10.1111/jbi.14587>."
occ_acquisition: no
occ_cleaning: no
data_integration: no
Expand Down
2 changes: 1 addition & 1 deletion inst/extdata/packages/biomod2.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: biomod2
title: Ensemble Platform for Species Distribution Modeling
version: 4.2-5
version: 4.2-5-2
author: "Wilfried Thuiller, Damien Georges, Maya Gueguen, Robin Engler, Frank Breiner, Bruno Lafourcade, Remi Patin, Helene Blancheteau"
maintainer: Maya Gueguen <[email protected]>
cran: yes
Expand Down
2 changes: 1 addition & 1 deletion inst/extdata/packages/ecospat.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ecospat
title: "Spatial Ecology Miscellaneous Methods"
version: 4.1.0
version: 4.1.1
author: "Olivier Broennimann, Valeria Di Cola, Blaise Petitpierre, Frank Breiner, Daniel Scherrer, Manuela D`Amen, Christophe Randin, Robin Engler, Wim Hordijk, Heidi Mod, Julien Pottier, Mirko Di Febbraro, Loic Pellissier, Dorothea Pio, Ruben Garcia Mateo, Anne Dubuis, Luigi Maiorano, Achilleas Psomas, Charlotte Ndiribe, Nicolas Salamin, Niklaus Zimmermann, Flavien Collart, Valentin Verdon, Tyler Smith, Antoine Guisan"
maintainer: "Olivier Broennimann <[email protected]>"
cran: yes
Expand Down
2 changes: 1 addition & 1 deletion inst/extdata/packages/enmSdmX.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "enmSdmX"
title: "Species Distribution Modeling and Ecological Niche Modeling"
version: 1.1.5
version: 1.1.6
author: "Adam B. Smith"
maintainer: "Adam B. Smith <[email protected]>"
cran: yes
Expand Down
4 changes: 2 additions & 2 deletions inst/extdata/packages/kissmig.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: kissmig
title: "a Keep It Simple Species Migration Model"
version: 1.0-4
version: 1.0-5
author: "Michael P. Nobis, Signe Normand"
maintainer: "Michael P. Nobis <[email protected]>"
cran: yes
repository: ""
description: "Simulating species migration and range dynamics under stable or changing environmental conditions based on a simple, raster-based, stochastic migration model. Providing accessibility from an origin or previous distribution for niche-based species distribution models. Nobis & Normand (2014) <doi:10.1111/ecog.00930>."
description: "Simulating species migration and range dynamics under stable or changing environmental conditions based on a simple, raster-based, deterministic or stochastic migration model. Kissmig runs on binary or quantitative suitability maps, which are pre-calculated with niche-based habitat suitability models (also called ecological niche models (ENMs) or species distribution models (SDMs)). Nobis & Normand (2014), <doi:10.1111/ecog.00930>."
occ_acquisition: no
occ_cleaning: no
data_integration: no
Expand Down
2 changes: 1 addition & 1 deletion inst/extdata/packages/occCite.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name : occCite
title: "Querying and Managing Large Biodiversity Occurrence Datasets"
version: 0.5.6
version: 0.5.7
author: "Hannah L. Owens, Cory Merow, Brian Maitner, Jamie M. Kass, Vijay Barve, Robert P. Guralnick, Damiano Oldoni for rOpenSci, see)"
maintainer: "Hannah L. Owens <[email protected]>"
cran: yes
Expand Down
2 changes: 1 addition & 1 deletion inst/extdata/packages/sdm.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name : "sdm"
title: "Species Distribution Modelling"
version: 1.2-40
version: 1.2-46
author: "Babak Naimi, Miguel B. Araujo"
maintainer: "Babak Naimi <[email protected]>"
cran: yes
Expand Down
7 changes: 2 additions & 5 deletions inst/extdata/packages/wallace.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name : wallace
title: "A Modular Platform for Reproducible Modeling of Species Niches and Distributions"
version: 2.1.2
author: "Jamie M. Kass, Gonzalo E. Pinilla-Buitrago, Andrea Paz, Bethany A. Johnson,
Valentina Grisales-Betancur, Dean Attali, Matthew E. Aiello-Lammens, Cory Merow,
Mary E. Blair, Robert P. Anderson, Sarah I. Meenan, Olivier Broennimann, Peter J. Galante,
Brian S. Maitner, Hannah L. Owens, Sara Varela, Bruno Vilela, Robert Muscarella"
version: 2.1.3
author: "Bethany A. Johnson, Jamie M. Kass, Gonzalo E. Pinilla-Buitrago, Andrea Paz, Valentina Grisales-Betancur, Dean Attali, Matthew E. Aiello-Lammens, Cory Merow, Mary E. Blair, Robert P. Anderson, Sarah I. Meenan, Olivier Broennimann, Peter J. Galante, Brian S. Maitner, Hannah L. Owens, Sara Varela, Bruno Vilela, Robert Muscarella"
maintainer: "Mary E. Blair <[email protected]>"
cran: yes
repository: "https://github.com/wallaceEcoMod/wallace"
Expand Down
35 changes: 22 additions & 13 deletions inst/scripts/ms_figs.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@ library(dplyr)

d <- prep_table(where = "online")

d <- filter(d, name != "rgbif",
name != "ibis.iSDM",
name != "dismo") |>
select(-mod_mechanistic,
-mod_multispecies)
d <- filter(
d, name != "rgbif",
name != "ibis.iSDM",
name != "dismo"
) |>
select(
-mod_mechanistic,
-mod_multispecies
)

pal <- RColorBrewer::brewer.pal(n = 5, name = "Dark2")

pdf("fig3.pdf", height = 5, width = 9.7)
plot_dendrogram(d, k = 5, cex = 0.7, diff_method = "binary",
k_colors = pal, horiz = TRUE, main = "")
plot_dendrogram(d,
k = 5, cex = 0.7, diff_method = "binary",
k_colors = pal, horiz = TRUE, main = ""
)
dev.off()

clust <- plot_dendrogram(d, k = 5, cex = 1, diff_method = "binary",
k_colors = pal, horiz = TRUE, main = "",
return_clust = TRUE)
clust <- plot_dendrogram(d,
k = 5, cex = 1, diff_method = "binary",
k_colors = pal, horiz = TRUE, main = "",
return_clust = TRUE
)
pkg_order <- rev(clust$labels[clust$order])

pkg_cols <- pkg_order
Expand All @@ -31,7 +39,8 @@ pkg_cols[32:33] <- pal[1]

pdf("fig2.pdf", height = 7, width = 16)
plot_table(d,
pkg_order = pkg_order,
pkg_cols = pkg_cols,
remove_empty_cats = TRUE)
pkg_order = pkg_order,
pkg_cols = pkg_cols,
remove_empty_cats = TRUE
)
dev.off()

0 comments on commit 557b57a

Please sign in to comment.