Synthetic Insect Soundscape Construction, Analysis, and Visualization
This repository contains the reproducible workflow used to generate, analyze, and visualize synthetic insect acoustic communities for the associated manuscript (submitted for peer review). All analyses were conducted in R.
Because Kaleidoscope Pro is proprietary software, its outputs are provided here in combined form so that all downstream analyses can be fully reproduced without requiring access to that software.
Repository Structure
data/ raw_audio/ insects/ # Exemplar insect call clips from public sound archives background/ # Single background recording used in all synthetic soundscapes metadata/ # Non-identifying metadata tables describing input audio derived/ # Intermediate files generated during processing
scripts/ # Step-by-step analysis scripts (run in numerical order) R/ # Reusable helper functions
output/ synthetic_audio/ # Generated synthetic recordings (not version-controlled) figures/ # Figures produced by analysis scripts tables/ # Summary tables produced by analysis scripts
Workflow Overview
Run scripts in numerical order:
Step Script Purpose 00 00_setup.R Loads required packages and defines project paths 01 01_validate_inputs.R Confirms audio files and metadata are correctly formatted 02a 02a_generate_synthetic_full.R Generates full synthetic soundscape dataset (as in manuscript) 02b 02b_generate_synthetic_demo.R Generates a small demo dataset for quick testing 03 03_kaleidoscope_step.md Documents acoustic metric extraction using Kaleidoscope Pro 04a 04a_correlations.R Computes Spearman & Kendall correlations (BH corrected) 04b 04b_cliffs_delta.R Computes Cliff’s 05a 05a_lollipop_correlations.R Creates lollipop plot of absolute correlations 05b 05b_delta_heatmap.R Creates heatmap of median 05c 05c_raw_relationships_gam.R Creates faceted raw metric vs richness plots (GAM smoother)
How to Reproduce the Analyses Open RStudio in the project folder and run:
source("scripts/04a_correlations.R") source("scripts/04b_cliffs_delta.R") source("scripts/05a_lollipop_correlations.R") source("scripts/05b_delta_heatmap.R") source("scripts/05c_raw_relationships_gam.R")
All output figures and tables will be saved to the output/ directory.
Included Data
Example insect call recordings (10 species) One background recording Combined Kaleidoscope acoustic metric output (data/derived/kaleidoscope_metrics.csv) Metadata linking synthetic files to species richness
Exemplar recordings were sourced from publicly available sound archives and are included here in excerpted form for reproducibility. The background recording is used solely as a neutral acoustic substrate.
This repository is provided for peer review and reproducibility purposes. Identifying information has been intentionally omitted.