This repository contains the essential scripts and data needed to recreate the analyses and figures for the bird group in the State of Nature Report 2023 by Hamaarag.
This project is licensed under the MIT License – see the LICENSE file for details.
This repository is organized into the following main directories and files:
-
R/– Contains R scripts for data preparation, analysis, and visualization. Key components include:- Data Preparation: Scripts for preprocessing bird data before analysis.
- Analyses by Region: RMarkdown files conducting analyses for different ecological regions.
- Plotting Functions: Scripts for generating figures used in the report.
-
data/– Includes input datasets required for the analyses.- Processed Data: Pre-prepared observation dataset used for analysis.
- Raw Data: Taxonomic tables and species trait tables.
-
output/– Stores the output of the analyses.- Currently, this folder contains results from the species composition models run within the RMarkdown scripts,
stored as
.rdsfiles. Using the saved.rdsfiles will recreate the same results (p-values) and figures as published in SoN 2023. Alternatively, model summary and ANOVA can be re-run by uncommenting the relevant lines in the species composition section of the.Rmdscript. - Future outputs (after executing markdown scripts) may include tables and figures.
- Currently, this folder contains results from the species composition models run within the RMarkdown scripts,
stored as
-
Project Configuration:
SoN_2023_Birds.Rproj– RStudio project file.renv/&renv.lock– Dependency management files for reproducibility..gitignore&.Rprofile– Configuration and environment settings.
-
Documentation:
README.md– This documentation file.LICENSE– License details.
To reproduce the analyses and figures, follow these steps:
Run the following command in a Bash terminal (e.g., Git Bash, macOS/Linux terminal, or Windows Command Prompt with Git installed):
git clone https://github.com/Hamaarag/SoN_2023_Birds.git
cd SoN_2023_Birds- Open RStudio and use the menu:
File→Open Project...→ SelectSoN_2023_Birds.Rproj
Alternatively, you can open the project directly from the command line (Mac/Linux):
open SoN_2023_Birds.Rprojor on Windows (if RStudio is in the PATH):
start SoN_2023_Birds.RprojInside RStudio, install the necessary dependencies using renv:
install.packages("renv") # Install renv if not already installed. If running into problems, install version 1.0.7 using: `install.packages("renv", version = "1.0.7")`
renv::restore() # Restore package environmentTo execute the analyses and generate figures, run the RMarkdown scripts in the R/ directory.
Open any .Rmd file (e.g., R/Birds_National_with_Z_filter.Rmd) and click "Knit" to execute the script and generate outputs.
To render a specific RMarkdown file programmatically:
rmarkdown::render("R/Birds_National_with_Z_filter.Rmd")- Figures and tables (if generated) will also be saved in
output/, under a designated folder (the folder will be created automatically). - The knitted reports (
.html) will appear in the same directory as the executed.Rmdfile.
- R version:4.2.3
- RStudio version: 2024.12.1+563
- OS: Windows 10 x64
- The Rmd files are set to use the "Almoni ML v5 AAA" font. If you do not have this font installed, you may need to change the font in the Rmd files.
If you use this repository or its contents, please cite both the main report and this repository.
Grossbard S, Renan I (Eds). 2024. State of Nature Report 2023 – Biodiversity.
Hamaarag – Israel’s National Ecosystem Assessment Program, Steinhardt Museum of Natural History, Tel Aviv University.
Hamaarag. State of Nature Report 2023 - Birds. Public Repository, 2024.
Available at: https://github.com/Hamaarag/SoN_2023_Birds.
For questions or feedback, contact Hamaarag at info@hamaarag.org.il.