-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
166 lines (99 loc) · 7.48 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(collapse = TRUE,
comment = "#>",
fig.path = "man/figures/",
out.width = "100%")
```
# World fish occurrences at ecoregion level <img src="https://raw.githubusercontent.com/FRBCesab/templates/main/logos/compendium-sticker.png" align="right" style="float:right; height:120px;"/>
<!-- badges: start -->
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://choosealicense.com/licenses/mit/)
<!-- badges: end -->
<p align="left">
• <a href="#overview">Overview</a><br>
• <a href="#data-sources">Data sources</a><br>
• <a href="#workflow">Workflow</a><br>
• <a href="#content">Content</a><br>
• <a href="#installation">Installation</a><br>
• <a href="#usage">Usage</a><br>
• <a href="#citation">Citation</a><br>
• <a href="#contributing">Contributing</a><br>
• <a href="#acknowledgments">Acknowledgments</a><br>
• <a href="#references">References</a>
</p>
## Overview
This project is dedicated to retrieve, clean and check GBIF occurrences for all fish species of the World (n = 35,035 species). Occurrences are aggregated at the ecoregion level (Spalding _et al._, 2007) for marine species and at the drainage basin level (Tedesco _et al._, 2017) for freshwater species.
![](figures/number_of_marine_fish_species.png)
![](figures/number_of_freshwater_fish_species.png)
## Data sources
This project uses the following databases:
| Database | Usage | Reference | Link |
| :-------------- | :------------------------------------------- | :------------------------ | :----: |
| Fishbase | Get fish species accepted names | Froese R & Pauly D (2000) | [link](https://www.fishbase.se/) |
| GBIF | Get fish occurrences at World scale | GBIF.org (2024) | [link](https://www.gbif.org/) |
| MEOW | Aggregate occurrences for marine species | Spalding _et al._ (2007) | [link](https://www.worldwildlife.org/publications/marine-ecoregions-of-the-world-a-bioregionalization-of-coastal-and-shelf-areas) |
| Drainage basins | Aggregate occurrences for freshwater species | Tedesco _et al._ (2017) | [link](https://figshare.com/collections/A_global_database_on_freshwater_fish_species_occurrences_in_drainage_basins/3739145) |
| Natural Earth | World maps | None | [link](https://www.naturalearthdata.com) |
A comprehensive description of all these databases is available [here](https://github.com/phenofish/gbif-ecoregions/blob/main/data/README.md).
## Workflow
The analysis pipeline follows these steps:
1. Find GBIF accepted names & identifiers from Fishbase accepted names
2. Download GBIF occurrences
3. Clean and check GBIF occurrences
4. Intersect occurrences w/ marine ecoregions layer (marine species)
5. Intersect occurrences w/ drainage basins layer (terrestrial species)
6. Export layers in [`outputs/`](https://github.com/phenofish/gbif-ecoregions/blob/main/outputs)
7. Compute marine and freshwater species richness
8. Export World maps in [`figures/`](https://github.com/phenofish/gbif-ecoregions/blob/main/figures)
## Content
This repository is structured as follow:
- [`DESCRIPTION`](https://github.com/phenofish/gbif-ecoregions/blob/main/DESCRIPTION): contains project metadata (authors, description, license, dependencies, etc.).
- [`make.R`](https://github.com/phenofish/gbif-ecoregions/blob/main/make.R): main R script to set up and run the entire project. Open this file to follow the workflow step by step.
- [`R/`](https://github.com/phenofish/gbif-ecoregions/blob/main/R): contains R functions developed especially for this project.
- [`data/`](https://github.com/phenofish/gbif-ecoregions/blob/main/data): contains raw data used in this project. See the [`README`](https://github.com/phenofish/gbif-ecoregions/blob/main/data/README.md) for further information.
- [`analyses/`](https://github.com/phenofish/gbif-ecoregions/blob/main/analyses): contains R scripts to run the workflow. The order to run these scripts is explained in the [`make.R`](https://github.com/phenofish/gbif-ecoregions/blob/main/make.R) and the description of each script is available in the header of each file.
- [`outputs/`](https://github.com/phenofish/gbif-ecoregions/blob/main/outputs): contains the outputs of the project. See the [`README`](https://github.com/phenofish/gbif-ecoregions/blob/main/outputs/README.md) for a complete description of the files.
- [`figures/`](https://github.com/phenofish/gbif-ecoregions/blob/main/figures): contains the figures used to validate et visualize the outputs.
## Installation
To install this compendium:
- [Fork](https://docs.github.com/en/get-started/quickstart/contributing-to-projects)
this repository using the GitHub interface.
- [Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
your fork using `git clone fork-url` (replace `fork-url` by the URL of your fork).
Alternatively, open [RStudio IDE](https://posit.co/products/open-source/rstudio/)
and create a New Project from Version Control.
## Usage
Launch the [`make.R`](https://github.com/phenofish/gbif-ecoregions/blob/main/make.R)
file with:
```{r eval=FALSE}
source("make.R")
```
**Notes**
- All required packages listed in the [`DESCRIPTION`](https://github.com/phenofish/gbif-ecoregions/blob/main/DESCRIPTION) file will be installed (if necessary)
- All required packages and R functions will be loaded
- Each script in [`analyses/`](https://github.com/phenofish/gbif-ecoregions/blob/main/analyses) can be run independently
- Some steps listed in the [`make.R`](https://github.com/phenofish/gbif-ecoregions/blob/main/make.R) might take time (several hours)
## Citation
Please use the following citation:
> Casajus N & Loiseau N (2024) A database on World fish species occurrences at ecoregion and drainage basin level. URL: <https://github.com/phenofish/gbif-ecoregions/>.
## Contributing
All types of contributions are encouraged and valued. For more information,
check out our [Contributor Guidelines](https://github.com/phenofish/gbif-ecoregions/blob/main/CONTRIBUTING.md).
Please note that this project is released with a
[Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.
## Acknowledgments
This project has been developed for the
[FRB-CESAB](https://www.fondationbiodiversite.fr/en/about-the-foundation/le-cesab/)
research group
[Phenofish](https://www.fondationbiodiversite.fr/en/the-frb-in-action/programs-and-projects/le-cesab/phenofish/)
that aims to create a global database of fish functional traits integrating
physiology and ecology across World aquatic ecosystems.
## References
Froese R & Pauly D (2000) FishBase 2000: Concepts, designs and data sources. ICLARM, Los Banos, Philippines. URL: <https://www.fishbase.se/>.
GBIF.org (2024) GBIF Home Page. Available from: <https://www.gbif.org> [17 February 2024].
Spalding MD _et al._ (2007) Marine Ecoregions of the World: A Bioregionalization of Coastal and Shelf Areas. **BioScience**, 57(7), 573-583. DOI: <https://doi.org/10.1641/B570707>.
Tedesco P _et al._ (2017) A global database on freshwater fish species occurrence in drainage basins. **Scientific Data**, 4, 170141. DOI: <https://doi.org/10.1038/sdata.2017.141>.