Research compendium to reproduce analyses and figures of the article:
Langlois J, Guilhaumon F, Baletaud F, Casajus N, De Almeida Braga C, Fleure V, Kulbicki K, Loiseau N, Mouillot D, Renoult JP, Stahl A, Stuart Smith RD, Tribot AS & N, Mouquet (2022) The aesthetic value of reef fishes is globally mismatched to their conservation priorities. PLoS Biol 20(6): e3001640. doi:10.1371/journal.pbio.3001640
http://nicolasmouquet.free.fr/pdf/Langlois_et_al_2022_Plos_Biology.htm
This repository is structured as follow:
data/
: contains data required to reproduce figures and tablesR/
: contains R functions developed for this projectanalyses/
: contains folders organized by theme. Each folder contains R scripts
to run specific analysisresults/
: follows the structure of analyses. Contains intermediate results
and the numeric results used to produce the figures.Not all fish images are free of copyrights. We thus provide an example sample of
images in data/example_images/
. The codes calling all images will show errors
but you can use the example images set to run them. See Extended Table 1
(provided as a supplementary information) for copyrights.
The script analyses/elo/01_group_effect.R
normally generates and use a large
file: 01_first_model.RData
. It takes several days to generate this file but
you can instead download it from https://zenodo.org/record/6325532#.YiDG99_jLoA
(see lines 257-258 of script).
The file results/conservation/01_sptable_all.csv
contains all the information
used and produced in this study at the species level for the 2,415 species
concerned. You are welcome to use it by citing properly our work, but even more
welcome to contact us (nicolas.mouquet@cnrs.fr) if you want to collaborate :smiley:
Figures and Tables will be stored in figures_tables/
.
The following Figures and Tables can be reproduced with the script indicated in
brackets (all in analyses/
):
deep/06_prediction_performances.R
)features/features_analysis.R
)features/features_analysis.R
) biodiversity/01_phylogeny.R
must be run to have data for panel a
and biodiversity/02_functional_div.R
generates data for panel b and the entire figure)biodiversity/01_phylogeny.R
produces the tree)conservation/01_iucn_status.R
)features/cluster.R
)features/cluster.R
) features/momocs.R
)features/features_analysis.R
)elo/01_group_effect.R
)elo/01_group_effect.R
)elo/02_elo_scores.R
)elo/02_elo_scores.R
)deep/05_size_effect.R
)deep/06_prediction_performances.R
)biodiversity/01_phylogeny.R
)biodiversity/01_phylogeny.R
)biodiversity/02_functional_div.R
)deep/03_aggregate_species_level.R
)deep/03_aggregate_species_level.R
)biodiversity/02_functional_div.R
)Figure S1 T (conservation/01_conservation_status.R
)
Table S1 A (elo/01_group_effect.R
)
biodiversity/01_phylogeny.R
)Table S1 D (biodiversity/02_functional_div.R
)
Extended Table 2 (deep/03_aggregate_species_level.R
)
Clone the repository and run this command in R/RStudio:
source("make.R")
All required packages will be installed (if necessary) and loaded.
:boom: WARNING: running
make.R
calls all the scripts and takes days so if you want to work on one or a few scripts, you should run lines 17-42 ofmake.R
and then go to the other script.
Enjoy!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.