Code from: Diversity and distribution patterns of insects in Nigeria: A GBIF-based appraisal
Data files
Jul 20, 2026 version files 20.16 KB
-
1._analysis.R
11.74 KB
-
2._Data_Cleaning.R
7.21 KB
-
README.md
1.21 KB
Abstract
Insects provide essential ecosystem services and are key indicators of ecosystem health. Their diversity in Africa is estimated to be high, but they are poorly documented in many African countries, such as Nigeria. In this study, we used insect occurrence records from the Global Biodiversity Information Facility (GBIF) database to investigate and examine insect diversity and patterns across Nigeria’s major biomes. We analysed 49,854 records from the GBIF and found 19 orders, 305 families, 2,515 genera, and 5,880 species. However, the richness estimator suggests that current records only represent ~21 % of the true insect diversity in Nigeria. We also show that diversity differs between biomes and follows a latitudinal pattern. Overall, our findings reveal geographic and taxonomic gaps and highlight the need to prioritize under-represented taxa and locations to improve biodiversity assessment and conservation planning. We suggest that the current state of Nigeria’s insects reflects a dire situation that needs addressing through local and international collaboration facilitated by extensive government support.
Dataset DOI: 10.5061/dryad.p5hqbzm37
GBIF Occurrence Download: https://doi.org/10.15468/dl.z7bkrv
Description of the data and file structure
Insect occurrence records for Nigeria were sourced from GBIF.
Due to licensing issues, I cannot upload the raw GBIF records here. Users are encouraged to download this dataset directly from GBIF via GBIF.org (20 March 2026) GBIF Occurrence Download https://doi.org/10.15468/dl.z7bkrv). To use the R code provided, this file must be saved as "Raw"
Records were filtered to retain only valid binomial species names, excluding entries without species-level identification or with ambiguous designations (e.g., “sp.” or NA).
To allow us to perform spatial analyses, occurrence records were aggregated to 0.5° × 0.5° grid cells across Nigeria, following established methods for large-scale biodiversity assessments.
Code/software
All codes were written in R. R files include comments with specific guidance about what the scripts do.
Data cleaning
Analysis
Visualisation
