ecological-agent-skills 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENT_CONTEXT.md +191 -0
- package/CATALOG.md +329 -0
- package/LICENSE +692 -0
- package/README.md +347 -0
- package/bin/install.mjs +168 -0
- package/docs/comparison-with-alternatives.md +38 -0
- package/docs/global-examples-index.md +103 -0
- package/docs/repository-statistics.md +101 -0
- package/docs/theoretical-foundations.md +188 -0
- package/environment.yaml +106 -0
- package/examples/community/arctic_tundra_vegetation_example.md +247 -0
- package/examples/community/bird_landuse_example.md +63 -0
- package/examples/community/phytoplankton_reservoir_example.md +60 -0
- package/examples/community/reef_fish_indopacific_example.md +221 -0
- package/examples/impact/baci_road_example.md +57 -0
- package/examples/impact/ecosystem_services_atlantic_forest.md +83 -0
- package/examples/impact/forest_loss_borneo_timeseries_example.md +225 -0
- package/examples/occupancy/puma_camera_example.md +61 -0
- package/examples/occupancy/snow_leopard_himalayas_example.md +204 -0
- package/examples/reproducible/whittaker_biome_sdm_example.md +406 -0
- package/examples/sdm/anteater_cerrado_example.md +69 -0
- package/examples/sdm/jaguar_amazon_example.md +80 -0
- package/examples/sdm/koala_climate_change_example.md +170 -0
- package/examples/sdm/wolf_recolonization_europe_example.md +193 -0
- package/package.json +43 -0
- package/renv.lock +194 -0
- package/skills/SKILL_INDEX.json +1020 -0
- package/skills/acoustic-monitoring/SKILL.md +163 -0
- package/skills/acoustic-monitoring/examples/example-prompts.md +100 -0
- package/skills/acoustic-monitoring/examples/temperate_forest_birds_example.md +285 -0
- package/skills/acoustic-monitoring/resources/acoustic-indices-reference.md +93 -0
- package/skills/acoustic-monitoring/resources/soundscape-ecology-guide.md +90 -0
- package/skills/acoustic-monitoring/resources/species-id-tools-comparison.md +89 -0
- package/skills/acoustic-monitoring/scripts/batch_species_detection.py +360 -0
- package/skills/acoustic-monitoring/scripts/compute_acoustic_indices.R +235 -0
- package/skills/acoustic-monitoring/scripts/compute_acoustic_indices.py +374 -0
- package/skills/biostatistics-workbench/SKILL.md +140 -0
- package/skills/biostatistics-workbench/examples/example-prompts.md +39 -0
- package/skills/biostatistics-workbench/resources/effect-size-reference.md +81 -0
- package/skills/biostatistics-workbench/resources/glm-family-link-reference.md +47 -0
- package/skills/biostatistics-workbench/resources/test-selection-guide.md +93 -0
- package/skills/biostatistics-workbench/scripts/glm_pipeline.R +78 -0
- package/skills/biostatistics-workbench/scripts/glm_pipeline.py +210 -0
- package/skills/camera-trap-processing/SKILL.md +159 -0
- package/skills/camera-trap-processing/examples/example-prompts.md +103 -0
- package/skills/camera-trap-processing/examples/leopard_serengeti_example.md +231 -0
- package/skills/camera-trap-processing/resources/activity-patterns-reference.md +113 -0
- package/skills/camera-trap-processing/resources/camtrapR-workflow-guide.md +130 -0
- package/skills/camera-trap-processing/resources/detection-event-definition-guide.md +89 -0
- package/skills/camera-trap-processing/scripts/estimate_activity.R +169 -0
- package/skills/camera-trap-processing/scripts/process_camtrap_data.R +179 -0
- package/skills/camera-trap-processing/scripts/process_camtrap_data.py +192 -0
- package/skills/community-ecology-ordination/SKILL.md +133 -0
- package/skills/community-ecology-ordination/examples/example-prompts.md +35 -0
- package/skills/community-ecology-ordination/resources/dissimilarity-metric-guide.md +53 -0
- package/skills/community-ecology-ordination/resources/nmds-interpretation-guide.md +104 -0
- package/skills/community-ecology-ordination/scripts/__pycache__/community_analysis.cpython-311.pyc +0 -0
- package/skills/community-ecology-ordination/scripts/community_analysis.R +143 -0
- package/skills/community-ecology-ordination/scripts/community_analysis.py +231 -0
- package/skills/ecological-data-foundation/SKILL.md +129 -0
- package/skills/ecological-data-foundation/examples/example-prompts.md +40 -0
- package/skills/ecological-data-foundation/resources/coordinate-cleaning-flags.md +66 -0
- package/skills/ecological-data-foundation/resources/darwin-core-glossary.md +91 -0
- package/skills/ecological-data-foundation/resources/data-citation-guide.md +265 -0
- package/skills/ecological-data-foundation/resources/gbif-data-citation-guide.md +193 -0
- package/skills/ecological-data-foundation/resources/qa-checklist.md +83 -0
- package/skills/ecological-data-foundation/scripts/__pycache__/clean_occurrences.cpython-311.pyc +0 -0
- package/skills/ecological-data-foundation/scripts/__pycache__/download_from_ebird.cpython-311.pyc +0 -0
- package/skills/ecological-data-foundation/scripts/__pycache__/download_from_inat.cpython-311.pyc +0 -0
- package/skills/ecological-data-foundation/scripts/__pycache__/download_from_iucn.cpython-311.pyc +0 -0
- package/skills/ecological-data-foundation/scripts/__pycache__/download_from_obis.cpython-311.pyc +0 -0
- package/skills/ecological-data-foundation/scripts/clean_occurrences.R +230 -0
- package/skills/ecological-data-foundation/scripts/clean_occurrences.py +268 -0
- package/skills/ecological-data-foundation/scripts/download_from_ebird.R +251 -0
- package/skills/ecological-data-foundation/scripts/download_from_ebird.py +364 -0
- package/skills/ecological-data-foundation/scripts/download_from_gbif.R +315 -0
- package/skills/ecological-data-foundation/scripts/download_from_gbif.py +407 -0
- package/skills/ecological-data-foundation/scripts/download_from_inat.R +238 -0
- package/skills/ecological-data-foundation/scripts/download_from_inat.py +304 -0
- package/skills/ecological-data-foundation/scripts/download_from_iucn.R +273 -0
- package/skills/ecological-data-foundation/scripts/download_from_iucn.py +344 -0
- package/skills/ecological-data-foundation/scripts/download_from_obis.R +248 -0
- package/skills/ecological-data-foundation/scripts/download_from_obis.py +318 -0
- package/skills/ecological-impact-assessment/SKILL.md +123 -0
- package/skills/ecological-impact-assessment/examples/example-prompts.md +32 -0
- package/skills/ecological-impact-assessment/resources/baci-design-guide.md +55 -0
- package/skills/ecological-impact-assessment/resources/fragmentation-metrics-reference.md +86 -0
- package/skills/ecological-impact-assessment/resources/pressure-index-template.md +78 -0
- package/skills/ecological-impact-assessment/resources/study-design-guide.md +168 -0
- package/skills/ecological-impact-assessment/scripts/baci_analysis.R +161 -0
- package/skills/ecological-impact-assessment/scripts/fragmentation_analysis.py +141 -0
- package/skills/ecological-impact-assessment/scripts/power_analysis_baci.R +274 -0
- package/skills/ecosystem-services-assessment/SKILL.md +125 -0
- package/skills/ecosystem-services-assessment/examples/example-prompts.md +24 -0
- package/skills/ecosystem-services-assessment/resources/es-indicator-reference.md +45 -0
- package/skills/ecosystem-services-assessment/resources/invest-parameter-guide.md +86 -0
- package/skills/ecosystem-services-assessment/resources/rusle-coefficients.md +88 -0
- package/skills/ecosystem-services-assessment/scripts/__pycache__/compute_es.cpython-311.pyc +0 -0
- package/skills/ecosystem-services-assessment/scripts/compute_es.py +189 -0
- package/skills/ecosystem-services-assessment/scripts/tradeoff_analysis.R +161 -0
- package/skills/environmental-time-series/SKILL.md +125 -0
- package/skills/environmental-time-series/examples/example-prompts.md +33 -0
- package/skills/environmental-time-series/resources/anomaly-indices-reference.md +88 -0
- package/skills/environmental-time-series/resources/bfast-parameter-guide.md +69 -0
- package/skills/environmental-time-series/scripts/__pycache__/recovery_trajectory.cpython-311.pyc +0 -0
- package/skills/environmental-time-series/scripts/__pycache__/trend_analysis.cpython-311.pyc +0 -0
- package/skills/environmental-time-series/scripts/recovery_trajectory.R +305 -0
- package/skills/environmental-time-series/scripts/recovery_trajectory.py +178 -0
- package/skills/environmental-time-series/scripts/trend_analysis.R +192 -0
- package/skills/environmental-time-series/scripts/trend_analysis.py +184 -0
- package/skills/geoprocessing-for-ecology/SKILL.md +123 -0
- package/skills/geoprocessing-for-ecology/examples/example-prompts.md +32 -0
- package/skills/geoprocessing-for-ecology/resources/crs-reference.md +62 -0
- package/skills/geoprocessing-for-ecology/resources/global-predictor-sources.md +331 -0
- package/skills/geoprocessing-for-ecology/resources/resampling-methods.md +57 -0
- package/skills/geoprocessing-for-ecology/scripts/__pycache__/download_predictors.cpython-311.pyc +0 -0
- package/skills/geoprocessing-for-ecology/scripts/download_predictors.R +239 -0
- package/skills/geoprocessing-for-ecology/scripts/download_predictors.py +379 -0
- package/skills/geoprocessing-for-ecology/scripts/stack_and_extract.R +224 -0
- package/skills/geoprocessing-for-ecology/scripts/stack_and_extract.py +172 -0
- package/skills/landscape-connectivity/SKILL.md +170 -0
- package/skills/landscape-connectivity/examples/example-prompts.md +96 -0
- package/skills/landscape-connectivity/examples/jaguar_mesoamerica_corridor_example.md +271 -0
- package/skills/landscape-connectivity/resources/circuitscape-parameter-guide.md +155 -0
- package/skills/landscape-connectivity/resources/graph-theory-for-ecology.md +134 -0
- package/skills/landscape-connectivity/resources/resistance-surface-guide.md +141 -0
- package/skills/landscape-connectivity/scripts/connectivity_analysis.py +387 -0
- package/skills/landscape-connectivity/scripts/connectivity_metrics.R +274 -0
- package/skills/landscape-connectivity/scripts/resistance_surface.R +239 -0
- package/skills/model-validation-and-uncertainty/SKILL.md +131 -0
- package/skills/model-validation-and-uncertainty/examples/example-prompts.md +30 -0
- package/skills/model-validation-and-uncertainty/resources/extrapolation-risk-guide.md +236 -0
- package/skills/model-validation-and-uncertainty/resources/metric-selection-guide.md +52 -0
- package/skills/model-validation-and-uncertainty/resources/threshold-selection-guide.md +64 -0
- package/skills/model-validation-and-uncertainty/scripts/__pycache__/validate_model.cpython-311.pyc +0 -0
- package/skills/model-validation-and-uncertainty/scripts/extrapolation_risk.R +315 -0
- package/skills/model-validation-and-uncertainty/scripts/validate_model.py +226 -0
- package/skills/model-validation-and-uncertainty/scripts/validate_sdm.R +162 -0
- package/skills/occupancy-and-detection/SKILL.md +126 -0
- package/skills/occupancy-and-detection/examples/example-prompts.md +33 -0
- package/skills/occupancy-and-detection/resources/detection-history-format.md +100 -0
- package/skills/occupancy-and-detection/resources/occupancy-study-design.md +47 -0
- package/skills/occupancy-and-detection/scripts/__pycache__/occupancy_analysis.cpython-311.pyc +0 -0
- package/skills/occupancy-and-detection/scripts/occupancy_analysis.R +160 -0
- package/skills/occupancy-and-detection/scripts/occupancy_analysis.py +159 -0
- package/skills/population-viability-analysis/SKILL.md +161 -0
- package/skills/population-viability-analysis/examples/african_elephant_pva_example.md +266 -0
- package/skills/population-viability-analysis/examples/example-prompts.md +95 -0
- package/skills/population-viability-analysis/resources/extinction-risk-thresholds.md +128 -0
- package/skills/population-viability-analysis/resources/matrix-model-guide.md +139 -0
- package/skills/population-viability-analysis/resources/sensitivity-elasticity-reference.md +182 -0
- package/skills/population-viability-analysis/scripts/matrix_pva.R +258 -0
- package/skills/population-viability-analysis/scripts/pva_analysis.py +442 -0
- package/skills/population-viability-analysis/scripts/stochastic_pva.R +353 -0
- package/skills/predictive-modeling-best-practices/SKILL.md +136 -0
- package/skills/predictive-modeling-best-practices/examples/example-prompts.md +58 -0
- package/skills/predictive-modeling-best-practices/resources/collinearity-decision-tree.md +65 -0
- package/skills/predictive-modeling-best-practices/resources/sampling-bias-correction.md +267 -0
- package/skills/predictive-modeling-best-practices/resources/spatial-cv-guide.md +73 -0
- package/skills/predictive-modeling-best-practices/scripts/__pycache__/spatial_cv.cpython-311.pyc +0 -0
- package/skills/predictive-modeling-best-practices/scripts/collinearity_check.R +112 -0
- package/skills/predictive-modeling-best-practices/scripts/spatial_cv.py +182 -0
- package/skills/reproducible-ecology-pipeline/SKILL.md +139 -0
- package/skills/reproducible-ecology-pipeline/examples/example-prompts.md +35 -0
- package/skills/reproducible-ecology-pipeline/resources/directory-structure-template.md +94 -0
- package/skills/reproducible-ecology-pipeline/resources/params-yaml-template.yaml +84 -0
- package/skills/reproducible-ecology-pipeline/resources/reproducibility-checklist-template.md +66 -0
- package/skills/reproducible-ecology-pipeline/scripts/generate_file_manifest.py +110 -0
- package/skills/reproducible-ecology-pipeline/scripts/init_project.sh +53 -0
- package/skills/spatial-prioritization/SKILL.md +162 -0
- package/skills/spatial-prioritization/examples/biodiversity_hotspot_prioritization_example.md +289 -0
- package/skills/spatial-prioritization/examples/example-prompts.md +93 -0
- package/skills/spatial-prioritization/resources/cost-surface-reference.md +130 -0
- package/skills/spatial-prioritization/resources/marxan-vs-prioritizr-comparison.md +125 -0
- package/skills/spatial-prioritization/resources/prioritizr-formulation-guide.md +188 -0
- package/skills/spatial-prioritization/resources/representation-targets-guide.md +186 -0
- package/skills/spatial-prioritization/scripts/prioritization_sensitivity.R +320 -0
- package/skills/spatial-prioritization/scripts/run_prioritization.R +336 -0
- package/skills/species-distribution-modeling/SKILL.md +139 -0
- package/skills/species-distribution-modeling/examples/example-prompts.md +36 -0
- package/skills/species-distribution-modeling/resources/algorithm-comparison.md +25 -0
- package/skills/species-distribution-modeling/resources/calibration-area-guide.md +71 -0
- package/skills/species-distribution-modeling/resources/climate-scenario-preparation.md +170 -0
- package/skills/species-distribution-modeling/resources/maxent-calibration-guide.md +211 -0
- package/skills/species-distribution-modeling/resources/sdm-checklist.md +37 -0
- package/skills/species-distribution-modeling/scripts/predict_distribution.R +236 -0
- package/skills/species-distribution-modeling/scripts/predict_distribution.py +286 -0
- package/skills/species-distribution-modeling/scripts/prepare_future_layers.R +351 -0
- package/skills/species-distribution-modeling/scripts/project_scenarios.R +220 -0
- package/skills/species-distribution-modeling/scripts/run_ensemble_sdm.R +99 -0
- package/skills/species-distribution-modeling/scripts/sdm_pipeline.py +318 -0
- package/skills/species-distribution-modeling/scripts/tune_maxnet.R +344 -0
- package/templates/SKILL_TEMPLATE.md +225 -0
- package/templates/checklists/data-submission-checklist.md +38 -0
- package/templates/checklists/post-analysis-checklist.md +55 -0
- package/templates/checklists/pre-analysis-checklist.md +31 -0
- package/templates/prompts/debug-skill.md +47 -0
- package/templates/prompts/invoke-skill.md +34 -0
- package/templates/prompts/invoke-workflow.md +45 -0
- package/templates/reports/technical-report-template.md +80 -0
- package/templates/scripts/logger_setup.R +79 -0
- package/templates/scripts/logger_setup.py +119 -0
- package/templates/scripts/params_loader.R +28 -0
- package/templates/scripts/params_loader.py +38 -0
- package/workflows/analyze-community-structure/WORKFLOW.md +72 -0
- package/workflows/analyze-environmental-change/WORKFLOW.md +73 -0
- package/workflows/assess-ecological-impact/WORKFLOW.md +75 -0
- package/workflows/assess-ecosystem-services/WORKFLOW.md +68 -0
- package/workflows/assess-landscape-connectivity/WORKFLOW.md +84 -0
- package/workflows/build-fire-risk-map/WORKFLOW.md +79 -0
- package/workflows/produce-technical-report/WORKFLOW.md +113 -0
- package/workflows/run-camera-trap-occupancy/WORKFLOW.md +87 -0
- package/workflows/run-conservation-prioritization/WORKFLOW.md +89 -0
- package/workflows/run-multispecies-screening/WORKFLOW.md +197 -0
- package/workflows/run-occupancy-analysis/WORKFLOW.md +74 -0
- package/workflows/run-population-viability/WORKFLOW.md +90 -0
- package/workflows/run-sdm-study/WORKFLOW.md +99 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: acoustic-monitoring
|
|
3
|
+
description: "Processes passive acoustic monitoring (PAM) data to compute soundscape indices and detect species from audio recordings. Use this skill when the user mentions acoustic monitoring, bioacoustics, soundscape ecology, acoustic indices (ACI, NDSI, ADI), BirdNET, AudioMoth, bat detectors, dawn chorus analysis, passive acoustic recorders, species detection from audio, or sound diversity metrics."
|
|
4
|
+
skill_version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill: acoustic-monitoring
|
|
8
|
+
|
|
9
|
+
**Domain:** Bioacoustics · Soundscape ecology · Acoustic indices · Species detection · PAM
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Guides the agent through processing passive acoustic monitoring (PAM) recordings to compute soundscape biodiversity indices, detect species using automated classifiers, and analyse temporal trends in acoustic diversity. Covers ACI, BI, NDSI, H, ADI, and AEI index computation; BirdNET-based species detection with confidence thresholding; rarefaction-based richness estimation; and temporal trend analysis of soundscape composition.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## When to Invoke
|
|
20
|
+
|
|
21
|
+
Invoke this skill when:
|
|
22
|
+
|
|
23
|
+
- A user provides a directory of WAV or FLAC recordings from autonomous recorders
|
|
24
|
+
- The goal is to compute acoustic biodiversity indices across sites or time periods
|
|
25
|
+
- Automated species detection from audio is requested (BirdNET, Kaleidoscope)
|
|
26
|
+
- Soundscape trends over time (diel, seasonal, annual) are to be analysed
|
|
27
|
+
- Acoustic data must be integrated with field survey or camera trap data
|
|
28
|
+
|
|
29
|
+
**trigger_keywords:** `acoustic monitoring`, `soundscape`, `bioacoustics`, `acoustic index`, `ACI`, `NDSI`, `BirdNET`, `bird detection`, `bat echolocation`, `passive acoustic`, `PAM`, `audio recording`, `species accumulation acoustic`, `acoustic diversity`
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Inputs
|
|
34
|
+
|
|
35
|
+
| Input | Format | Required |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| Audio recordings directory | WAV or FLAC files | Required |
|
|
38
|
+
| Recording metadata CSV (site, date, time, recorder ID) | CSV | Required |
|
|
39
|
+
| Species list for filtering detections | TXT | Optional |
|
|
40
|
+
| Confidence threshold for species detection | Float 0–1 (default: 0.7) | Optional |
|
|
41
|
+
| Time resolution for index aggregation (minutes) | Integer (default: 1) | Optional |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Outputs
|
|
46
|
+
|
|
47
|
+
| Output | Description |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `acoustic_indices_timeseries.csv` | ACI, BI, NDSI, H, ADI, AEI per recording per time step |
|
|
50
|
+
| `indices_summary.csv` | Mean ± SD of each index per site and temporal stratum |
|
|
51
|
+
| `soundscape_plot.png` | Heatmap: hour of day × day × index value |
|
|
52
|
+
| `detections_raw.csv` | All BirdNET detections with confidence scores |
|
|
53
|
+
| `detections_filtered.csv` | Detections above confidence threshold |
|
|
54
|
+
| `species_accumulation.csv` | Cumulative species richness vs. recording hours |
|
|
55
|
+
| `detection_summary.png` | Detections per species × date × site |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Steps
|
|
60
|
+
|
|
61
|
+
1. **Validate recordings**
|
|
62
|
+
Check all files are WAV or FLAC, readable, and have consistent sample rates.
|
|
63
|
+
Compute SNR for a random 10% sample. Flag files with SNR < 10 dB in metadata.
|
|
64
|
+
Exclude flagged recordings from index computation.
|
|
65
|
+
|
|
66
|
+
2. **Compute acoustic indices** *(invoke `compute_acoustic_indices.R` or `.py`)*
|
|
67
|
+
Calculate ACI, BI, NDSI, H, ADI, AEI for each recording at the specified time
|
|
68
|
+
resolution. Aggregate to hourly and daily summaries.
|
|
69
|
+
Output: `acoustic_indices_timeseries.csv`.
|
|
70
|
+
|
|
71
|
+
3. **Run automated species detection** *(invoke `batch_species_detection.py`)*
|
|
72
|
+
Process all recordings with BirdNET-Analyzer CLI.
|
|
73
|
+
Filter detections by confidence threshold (default: 0.7).
|
|
74
|
+
Aggregate detections by species, date, and site.
|
|
75
|
+
|
|
76
|
+
4. **Validate detections**
|
|
77
|
+
If the study region has a published BirdNET validation, apply region-specific
|
|
78
|
+
precision/recall. If not, flag detections > 0.7 confidence as "probable" and
|
|
79
|
+
require manual validation for species of conservation concern.
|
|
80
|
+
|
|
81
|
+
5. **Compute species accumulation curve**
|
|
82
|
+
Use detection records to plot cumulative species vs. recording hours.
|
|
83
|
+
Fit a Michaelis-Menten curve to estimate asymptotic richness.
|
|
84
|
+
Flag sites with < 48h of recordings as potentially under-sampled.
|
|
85
|
+
|
|
86
|
+
6. **Analyse temporal trends**
|
|
87
|
+
Use `environmental-time-series` skill if trend analysis over months/years is needed.
|
|
88
|
+
For diel patterns: compute mean index by hour-of-day, plot soundscape fingerprint.
|
|
89
|
+
|
|
90
|
+
7. **Validate outputs and record decisions**
|
|
91
|
+
Confirm all output files are non-empty and timestamped.
|
|
92
|
+
Record SNR threshold, confidence threshold, and any excluded recordings in `decision_log.md`.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Decision Points
|
|
97
|
+
|
|
98
|
+
| Condition | Diagnosis | Recommended Action |
|
|
99
|
+
|---|---|---|
|
|
100
|
+
| SNR < 10 dB in a recording | Recording dominated by noise; indices unreliable | Exclude from index computation; document in metadata |
|
|
101
|
+
| BirdNET confidence < 0.7 | Low-confidence detection; likely false positive | Flag as "unconfirmed"; require manual validation before use in analyses |
|
|
102
|
+
| < 48h of recordings per site | Insufficient for rarefaction-based richness | Report observed richness only; note undersampling caveat |
|
|
103
|
+
| NDSI consistently > 0.8 | Soundscape dominated by biophony | Check for equipment artefact or very remote site; validate with spectrogram |
|
|
104
|
+
| NDSI consistently < -0.5 | Soundscape dominated by geophony or anthrophony | Investigate noise source; may mask biological signal in other indices |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Key Decisions to Document
|
|
109
|
+
|
|
110
|
+
Record the following in `decision_log.md` after running this skill:
|
|
111
|
+
|
|
112
|
+
- SNR threshold used for recording exclusion and how many recordings were excluded
|
|
113
|
+
- Confidence threshold used for BirdNET detections and rationale
|
|
114
|
+
- Whether regional BirdNET validation data were available and applied
|
|
115
|
+
- Which acoustic indices were prioritised and why
|
|
116
|
+
- Any recordings excluded due to equipment malfunction or file corruption
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Tools and Libraries
|
|
121
|
+
|
|
122
|
+
**R**
|
|
123
|
+
```r
|
|
124
|
+
suppressPackageStartupMessages(library(soundecology)) # acoustic indices (ACI, BI, NDSI, H, ADI, AEI)
|
|
125
|
+
suppressPackageStartupMessages(library(tuneR)) # WAV file reading
|
|
126
|
+
suppressPackageStartupMessages(library(seewave)) # spectrogram, SNR, dB computation
|
|
127
|
+
suppressPackageStartupMessages(library(dplyr)) # data manipulation
|
|
128
|
+
suppressPackageStartupMessages(library(ggplot2)) # plotting
|
|
129
|
+
suppressPackageStartupMessages(library(lubridate)) # datetime handling
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Python**
|
|
133
|
+
```python
|
|
134
|
+
import librosa # audio loading, spectral features, ACI computation
|
|
135
|
+
import soundfile as sf # WAV/FLAC reading
|
|
136
|
+
import numpy as np # numerical operations
|
|
137
|
+
import pandas as pd # data manipulation
|
|
138
|
+
from pathlib import Path # file system
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**CLI**
|
|
142
|
+
```bash
|
|
143
|
+
# BirdNET-Analyzer (must be installed separately)
|
|
144
|
+
python analyze.py --i <audio_dir> --o <output_dir> --min_conf 0.7
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Resources
|
|
150
|
+
|
|
151
|
+
- [`skills/acoustic-monitoring/resources/acoustic-indices-reference.md`](resources/acoustic-indices-reference.md) — Complete table of acoustic indices: formula, scale, interpretation, R package
|
|
152
|
+
- [`skills/acoustic-monitoring/resources/species-id-tools-comparison.md`](resources/species-id-tools-comparison.md) — Comparison of BirdNET, RavenPro, Kaleidoscope, ARBIMON and validation protocols
|
|
153
|
+
- [`skills/acoustic-monitoring/resources/soundscape-ecology-guide.md`](resources/soundscape-ecology-guide.md) — NDSI framework, diel and seasonal controls, rarefaction, and data integration
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Notes
|
|
158
|
+
|
|
159
|
+
- **Sample rate must match index requirements:** ACI and most soundecology indices require 44.1 kHz WAV. Recordings at 22 kHz will underestimate high-frequency components. Always check sample rate before computing indices.
|
|
160
|
+
- **BirdNET is trained on Cornell Lab recordings:** Performance degrades outside North America and Europe. Validate with local recordings before using for conservation decisions in other regions.
|
|
161
|
+
- **Diel patterns must be controlled in trend analyses:** Acoustic diversity peaks at dawn and dusk. Never compare morning recordings from site A with midday recordings from site B without controlling for time-of-day.
|
|
162
|
+
- **ACI is not equivalent to species richness:** ACI measures temporal complexity of the signal, not biological diversity. A site with heavy rain will have high ACI but low biological content. Always cross-validate with NDSI.
|
|
163
|
+
- **Hardware differences between recorders bias comparisons:** AudioMoth, Song Meter, and Marantz record at different gain levels. Normalise SPL or compute indices relative to within-recorder baselines when comparing across equipment types.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
skill_id: acoustic-monitoring
|
|
3
|
+
example_count: 5
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Acoustic Monitoring — Example Prompts
|
|
7
|
+
|
|
8
|
+
## Scenario 1: Dawn Chorus Diversity Assessment
|
|
9
|
+
|
|
10
|
+
**Context:** Atlantic Forest fragment, southeastern Brazil. Autonomous recorders (AudioMoth) deployed at 12 stations. Recordings at 05:00–07:00 and 17:00–19:00 for 30 consecutive days.
|
|
11
|
+
|
|
12
|
+
**Prompt:**
|
|
13
|
+
> "I have 30 days of AudioMoth recordings (2 × 2-hour windows per day) from 12 stations in an Atlantic Forest fragment. Compute ACI, NDSI, and H for all files, then compare dawn-chorus acoustic diversity between core forest and edge stations. Control for diel variation and test whether core stations have significantly higher ACI."
|
|
14
|
+
|
|
15
|
+
**Expected workflow:**
|
|
16
|
+
1. `compute_acoustic_indices.R` or `compute_acoustic_indices.py` on all audio files
|
|
17
|
+
2. Merge indices CSV with station metadata (core vs. edge)
|
|
18
|
+
3. Fit linear mixed model: `ACI ~ habitat + (1 | station)` with dawn window only
|
|
19
|
+
4. Plot boxplots by habitat type; report effect size (Cohen's d)
|
|
20
|
+
|
|
21
|
+
**Key decision points:**
|
|
22
|
+
- If NDSI < 0 at dawn → high anthrophony (nearby road); flag station as disturbed
|
|
23
|
+
- If n recordings per station < 10 → exclude from comparative analysis
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Scenario 2: Continuous BirdNET Monitoring — Species Phenology
|
|
28
|
+
|
|
29
|
+
**Context:** Temperate oak woodland, 6 months of continuous recording. Identify seasonal arrival/departure dates for migratory species using automated detection.
|
|
30
|
+
|
|
31
|
+
**Prompt:**
|
|
32
|
+
> "Run BirdNET on 6 months of continuous recordings from a temperate woodland site. Filter detections with confidence ≥ 0.8, produce a species accumulation curve, and identify the first and last detection date for each migratory species."
|
|
33
|
+
|
|
34
|
+
**Expected workflow:**
|
|
35
|
+
1. `batch_species_detection.py --confidence 0.8 --lat 51.5 --lon -1.2` on all .wav files
|
|
36
|
+
2. Load `detections_filtered.csv`; parse date from datetime column
|
|
37
|
+
3. Group by species → `first_detection` and `last_detection`
|
|
38
|
+
4. Flag species with < 5 detections as uncertain
|
|
39
|
+
5. Plot phenology chart (horizontal bars per species × date)
|
|
40
|
+
|
|
41
|
+
**Key decision points:**
|
|
42
|
+
- Confidence < 0.7 → mark as "unconfirmed"; do not include in phenology table
|
|
43
|
+
- If species detected only once → exclude from arrival/departure analysis
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Scenario 3: Urban Soundscape Gradient
|
|
48
|
+
|
|
49
|
+
**Context:** Transect from city centre to rural area. 10 recording stations at 2-km intervals. Assess how NDSI and ACI change along the urban-rural gradient.
|
|
50
|
+
|
|
51
|
+
**Prompt:**
|
|
52
|
+
> "I have recordings from 10 stations along a 20 km urban-rural transect. Calculate NDSI and ACI for all stations, test for a significant linear trend with distance from city centre, and produce a gradient plot."
|
|
53
|
+
|
|
54
|
+
**Expected workflow:**
|
|
55
|
+
1. `compute_acoustic_indices.py` per station
|
|
56
|
+
2. Join with station metadata (distance_km)
|
|
57
|
+
3. Regression: `NDSI ~ distance_km`; test slope significance (p < 0.05)
|
|
58
|
+
4. Plot NDSI and ACI vs distance with 95% CI ribbon
|
|
59
|
+
|
|
60
|
+
**Expected outputs:**
|
|
61
|
+
- NDSI should increase monotonically from urban (negative) to rural (near +1)
|
|
62
|
+
- ACI typically increases but may plateau in intact habitat
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Scenario 4: Post-Restoration Acoustic Recovery
|
|
67
|
+
|
|
68
|
+
**Context:** Degraded wetland restored 3 years ago. Compare pre-restoration (year 0), post-restoration year 1, and year 3 recordings to assess amphibian soundscape recovery.
|
|
69
|
+
|
|
70
|
+
**Prompt:**
|
|
71
|
+
> "I have 3 years of wet-season recordings (same stations, same dates ± 7 days) spanning a wetland restoration project. Compare ACI and ADI across years. Has the soundscape recovered toward reference wetland values?"
|
|
72
|
+
|
|
73
|
+
**Expected workflow:**
|
|
74
|
+
1. Compute indices per year; aggregate to daily means per station
|
|
75
|
+
2. Linear mixed model: `ACI ~ year + (1 | station)`
|
|
76
|
+
3. Compare to reference site recordings using effect size
|
|
77
|
+
4. Plot time-series of monthly mean ACI with restoration milestone marked
|
|
78
|
+
|
|
79
|
+
**Key decision points:**
|
|
80
|
+
- If station n recordings differs between years → use rarefied means (resample to min n)
|
|
81
|
+
- If recovery incomplete at year 3 → recommend extended monitoring
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Scenario 5: Multi-Index Habitat Comparison — Fire Chronosequence
|
|
86
|
+
|
|
87
|
+
**Context:** Savanna sites with different fire histories (1, 3, 5, 10+ years since fire). Determine which acoustic index best discriminates fire age classes.
|
|
88
|
+
|
|
89
|
+
**Prompt:**
|
|
90
|
+
> "I have acoustic recordings from savanna sites with 4 fire age classes (1yr, 3yr, 5yr, 10yr post-fire). Compute all available indices (ACI, BI, NDSI, H, ADI, AEI). Run a PCA on index values to identify the main axis of acoustic variation. Which index best separates fire ages?"
|
|
91
|
+
|
|
92
|
+
**Expected workflow:**
|
|
93
|
+
1. `compute_acoustic_indices.R` across all sites
|
|
94
|
+
2. PCA on standardised index matrix
|
|
95
|
+
3. ANOVA or Kruskal-Wallis for each index across fire age class
|
|
96
|
+
4. Select index with highest η² (effect size); plot boxplots by fire age
|
|
97
|
+
|
|
98
|
+
**Expected findings:**
|
|
99
|
+
- BI typically tracks vegetation structure recovery (increases with fire age)
|
|
100
|
+
- NDSI may not discriminate if sites are far from urban influence
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
---
|
|
2
|
+
skill_id: acoustic-monitoring
|
|
3
|
+
example_type: full_walkthrough
|
|
4
|
+
taxon: Birds (Passerines)
|
|
5
|
+
region: Temperate broadleaf forest, central Europe
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Temperate Forest Bird Monitoring — Full Acoustic Walkthrough
|
|
9
|
+
|
|
10
|
+
## Study Context
|
|
11
|
+
|
|
12
|
+
**Location:** Oak-beech forest complex, 2,400 ha, Thuringia, Germany (51.2° N, 11.0° E)
|
|
13
|
+
**Objective:** Assess bird species richness and acoustic diversity across a habitat quality gradient (managed vs. old-growth forest patches)
|
|
14
|
+
**Recorders:** 8 × AudioMoth v1.2, deployed at 50-m forest interior points
|
|
15
|
+
**Recording schedule:** 04:30–07:30 UTC daily, May–July (spring migration + breeding)
|
|
16
|
+
**Total recordings:** ~2,160 files (270 per station × 8 stations), each 10 minutes at 32 kHz
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 1 — Compute Acoustic Indices
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Run for each station directory
|
|
24
|
+
Rscript compute_acoustic_indices.R \
|
|
25
|
+
data/audio/station_01/ \
|
|
26
|
+
outputs/indices/station_01/ \
|
|
27
|
+
1 \
|
|
28
|
+
0 \
|
|
29
|
+
16000
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Decision:** Frequency max set to 16 kHz (Nyquist for 32 kHz recorders). Passerine vocalisations fall mainly 2–10 kHz.
|
|
33
|
+
|
|
34
|
+
**Flags raised during processing:**
|
|
35
|
+
- Station 05: 14 files with NDSI < -0.3 during 05:00–06:00 → road noise detected
|
|
36
|
+
- **Decision:** Exclude station 05 dawn-chorus window from comparative analysis; retain for trend analysis only
|
|
37
|
+
|
|
38
|
+
**Output check:**
|
|
39
|
+
|
|
40
|
+
```r
|
|
41
|
+
library(dplyr)
|
|
42
|
+
idx <- read.csv("outputs/indices/all_stations_combined.csv")
|
|
43
|
+
|
|
44
|
+
# Check recording coverage per station
|
|
45
|
+
idx %>%
|
|
46
|
+
group_by(station) %>%
|
|
47
|
+
summarise(n_files = n(),
|
|
48
|
+
n_hours = n_recordings * 10 / 60, # 10-min files
|
|
49
|
+
pct_valid = mean(!is.na(ACI)) * 100)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
| station | n_files | recording_hours | pct_valid |
|
|
53
|
+
|------------|---------|-----------------|-----------|
|
|
54
|
+
| station_01 | 270 | 45.0 | 98.5 |
|
|
55
|
+
| station_03 | 268 | 44.7 | 97.8 |
|
|
56
|
+
| station_05 | 270 | 45.0 | 96.3 |
|
|
57
|
+
| station_07 | 214 | 35.7 | 94.9 |
|
|
58
|
+
|
|
59
|
+
**Flag:** Station 07 has only 214 files (malfunction from July 12). Recording hours < 48h for July window — flagged as under-sampled for July species richness.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Step 2 — BirdNET Species Detection
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
python batch_species_detection.py \
|
|
67
|
+
data/audio/ \
|
|
68
|
+
outputs/birdnet/ \
|
|
69
|
+
--confidence 0.7 \
|
|
70
|
+
--lat 51.2 \
|
|
71
|
+
--lon 11.0 \
|
|
72
|
+
--date 2024-05-15 \
|
|
73
|
+
--overlap 1.0
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Confidence filtering decisions:**
|
|
77
|
+
|
|
78
|
+
| Confidence band | n detections | Action |
|
|
79
|
+
|-----------------|-------------|--------|
|
|
80
|
+
| < 0.50 | 8,412 | Exclude (high FP rate) |
|
|
81
|
+
| 0.50–0.69 | 3,201 | Retain as "unconfirmed" |
|
|
82
|
+
| 0.70–0.89 | 6,847 | Retain (main analysis) |
|
|
83
|
+
| ≥ 0.90 | 2,104 | High confidence |
|
|
84
|
+
|
|
85
|
+
**Species accumulation check:**
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
import pandas as pd
|
|
89
|
+
import matplotlib.pyplot as plt
|
|
90
|
+
|
|
91
|
+
det = pd.read_csv("outputs/birdnet/detections_filtered.csv")
|
|
92
|
+
# Sort by datetime to produce accumulation curve
|
|
93
|
+
det_sorted = det.sort_values("datetime")
|
|
94
|
+
det_sorted["cumulative_species"] = det_sorted["common_name"].expanding().apply(
|
|
95
|
+
lambda x: x.nunique()
|
|
96
|
+
)
|
|
97
|
+
plt.plot(range(len(det_sorted)), det_sorted["cumulative_species"])
|
|
98
|
+
plt.xlabel("Detection number")
|
|
99
|
+
plt.ylabel("Cumulative species detected")
|
|
100
|
+
plt.title("Species accumulation — all stations")
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Result:** Curve asymptotes at ~47 species by detection 5,000 of 8,951. All stations exceed 48 recording hours → richness estimates considered reliable.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Step 3 — Diel and Temporal Analysis
|
|
108
|
+
|
|
109
|
+
### Dawn Chorus Peak
|
|
110
|
+
|
|
111
|
+
```r
|
|
112
|
+
library(dplyr); library(lubridate); library(ggplot2)
|
|
113
|
+
|
|
114
|
+
idx <- read.csv("outputs/indices/all_stations_combined.csv")
|
|
115
|
+
idx$datetime <- as.POSIXct(idx$datetime, tz = "UTC")
|
|
116
|
+
idx$hour <- lubridate::hour(idx$datetime)
|
|
117
|
+
|
|
118
|
+
# Filter to dawn window (04:30–07:30)
|
|
119
|
+
dawn <- idx %>% filter(hour %in% c(4, 5, 6, 7))
|
|
120
|
+
|
|
121
|
+
# ACI by hour
|
|
122
|
+
dawn %>%
|
|
123
|
+
group_by(hour) %>%
|
|
124
|
+
summarise(ACI_mean = mean(ACI, na.rm = TRUE),
|
|
125
|
+
ACI_sd = sd(ACI, na.rm = TRUE)) %>%
|
|
126
|
+
ggplot(aes(x = hour, y = ACI_mean)) +
|
|
127
|
+
geom_ribbon(aes(ymin = ACI_mean - ACI_sd, ymax = ACI_mean + ACI_sd),
|
|
128
|
+
alpha = 0.3) +
|
|
129
|
+
geom_line(size = 1.2) +
|
|
130
|
+
labs(x = "Hour (UTC)", y = "ACI", title = "Dawn chorus ACI")
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Finding:** ACI peaks at hour 05 (mean = 1,842 ± 312), declining by hour 07 (mean = 1,421 ± 287).
|
|
134
|
+
|
|
135
|
+
### Seasonal Trend
|
|
136
|
+
|
|
137
|
+
```r
|
|
138
|
+
idx$month <- lubridate::month(idx$datetime)
|
|
139
|
+
|
|
140
|
+
idx %>%
|
|
141
|
+
filter(hour == 5) %>%
|
|
142
|
+
group_by(station, month) %>%
|
|
143
|
+
summarise(ACI_mean = mean(ACI, na.rm = TRUE), .groups = "drop") %>%
|
|
144
|
+
ggplot(aes(x = month, y = ACI_mean, colour = station)) +
|
|
145
|
+
geom_line() + geom_point() +
|
|
146
|
+
labs(x = "Month", y = "ACI (hour 05)", title = "Seasonal ACI trend by station")
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Finding:** ACI peaks in June (breeding peak) then declines in July (post-breeding silence).
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Step 4 — Habitat Comparison
|
|
154
|
+
|
|
155
|
+
### Station metadata
|
|
156
|
+
|
|
157
|
+
```r
|
|
158
|
+
meta <- data.frame(
|
|
159
|
+
station = paste0("station_0", c(1,2,3,4,5,6,7,8)),
|
|
160
|
+
habitat_type = c("old_growth", "old_growth", "managed", "managed",
|
|
161
|
+
"managed", "old_growth", "old_growth", "managed")
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
idx_meta <- left_join(idx, meta, by = "station")
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Mixed-effects model
|
|
168
|
+
|
|
169
|
+
```r
|
|
170
|
+
suppressPackageStartupMessages(library(lme4))
|
|
171
|
+
suppressPackageStartupMessages(library(lmerTest))
|
|
172
|
+
|
|
173
|
+
dawn_meta <- idx_meta %>%
|
|
174
|
+
filter(hour %in% c(4, 5, 6))
|
|
175
|
+
|
|
176
|
+
m1 <- lmer(ACI ~ habitat_type + (1 | station),
|
|
177
|
+
data = dawn_meta, REML = TRUE)
|
|
178
|
+
summary(m1)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Results:**
|
|
182
|
+
|
|
183
|
+
| Effect | Estimate | SE | t | p |
|
|
184
|
+
|--------|----------|----|---|---|
|
|
185
|
+
| Intercept (managed) | 1,312.4 | 68.3 | 19.2 | < 0.001 |
|
|
186
|
+
| habitat_type [old_growth] | **+284.7** | 97.1 | 2.93 | **0.018** |
|
|
187
|
+
|
|
188
|
+
**Interpretation:** Old-growth stations had significantly higher dawn ACI (+285 units, p = 0.018), consistent with higher acoustic complexity from greater species richness and vocal activity.
|
|
189
|
+
|
|
190
|
+
### NDSI comparison
|
|
191
|
+
|
|
192
|
+
```r
|
|
193
|
+
m2 <- lmer(NDSI ~ habitat_type + cos_hour + sin_hour + (1 | station),
|
|
194
|
+
data = idx_meta %>%
|
|
195
|
+
mutate(cos_hour = cos(2 * pi * hour / 24),
|
|
196
|
+
sin_hour = sin(2 * pi * hour / 24)))
|
|
197
|
+
summary(m2)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Result:** No significant habitat effect on NDSI (p = 0.21). Both habitat types are remote from roads → low anthrophony → NDSI near +0.7 across all stations. ACI is the more sensitive discriminator here.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Step 5 — Species Richness Comparison
|
|
205
|
+
|
|
206
|
+
```r
|
|
207
|
+
det <- read.csv("outputs/birdnet/detections_filtered.csv")
|
|
208
|
+
det <- left_join(det, meta, by = c("station" = "station"))
|
|
209
|
+
|
|
210
|
+
species_richness <- det %>%
|
|
211
|
+
group_by(station, habitat_type) %>%
|
|
212
|
+
summarise(n_species = n_distinct(common_name), .groups = "drop")
|
|
213
|
+
|
|
214
|
+
wilcox.test(n_species ~ habitat_type, data = species_richness)
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
| Habitat | Mean species | Median | Range |
|
|
218
|
+
|---------|-------------|--------|-------|
|
|
219
|
+
| Old-growth | 38.5 | 39 | 34–43 |
|
|
220
|
+
| Managed | 28.3 | 28 | 24–33 |
|
|
221
|
+
|
|
222
|
+
**Wilcoxon test:** W = 16, p = 0.028 — significantly more species in old-growth stations.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Step 6 — Outputs and Reporting
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
outputs/
|
|
230
|
+
├── indices/
|
|
231
|
+
│ ├── all_stations_combined.csv # 17,280 rows × 9 index columns
|
|
232
|
+
│ ├── indices_summary_by_hour.csv # mean ACI/NDSI/H by hour
|
|
233
|
+
│ └── soundscape_plot.png # heatmap: date × hour, coloured by ACI
|
|
234
|
+
├── birdnet/
|
|
235
|
+
│ ├── detections_raw.csv # 20,551 total detections
|
|
236
|
+
│ ├── detections_filtered.csv # 8,951 detections (conf ≥ 0.7)
|
|
237
|
+
│ ├── species_list.csv # 53 species detected
|
|
238
|
+
│ ├── detection_summary.csv # species × hour matrix
|
|
239
|
+
│ └── species_accumulation.csv
|
|
240
|
+
└── figures/
|
|
241
|
+
├── dawn_aci_by_habitat.png
|
|
242
|
+
├── seasonal_aci_trend.png
|
|
243
|
+
└── species_richness_boxplot.png
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Summary table for report
|
|
247
|
+
|
|
248
|
+
| Metric | Old-growth | Managed | p-value |
|
|
249
|
+
|--------|-----------|---------|---------|
|
|
250
|
+
| Dawn ACI (mean ± SD) | 1,597 ± 298 | 1,312 ± 245 | 0.018 |
|
|
251
|
+
| NDSI (all hours) | 0.73 ± 0.12 | 0.69 ± 0.15 | 0.21 |
|
|
252
|
+
| Species richness (BirdNET) | 38.5 ± 4.3 | 28.3 ± 4.7 | 0.028 |
|
|
253
|
+
| Recording hours | 45.0 (8 stations) | 44.4 (8 stations) | — |
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Decision Log
|
|
258
|
+
|
|
259
|
+
```yaml
|
|
260
|
+
- date: 2024-08-10
|
|
261
|
+
skill_id: acoustic-monitoring
|
|
262
|
+
decision: "Excluded station 05 dawn window from ACI comparison (NDSI < -0.3)"
|
|
263
|
+
rationale: "Persistent road noise detected 04:30–06:30; n=14 files affected"
|
|
264
|
+
outputs: ["outputs/indices/station_05/acoustic_indices_timeseries.csv"]
|
|
265
|
+
|
|
266
|
+
- date: 2024-08-10
|
|
267
|
+
skill_id: acoustic-monitoring
|
|
268
|
+
decision: "Confidence threshold set to 0.7 for main analysis"
|
|
269
|
+
rationale: "Precision at 0.7 band estimated 0.82 from subsample of 100 validated clips"
|
|
270
|
+
outputs: ["outputs/birdnet/detections_filtered.csv"]
|
|
271
|
+
|
|
272
|
+
- date: 2024-08-11
|
|
273
|
+
skill_id: acoustic-monitoring
|
|
274
|
+
decision: "ACI selected as primary diversity metric (over ADI, H)"
|
|
275
|
+
rationale: "ACI showed highest correlation with manual point-count richness (r = 0.71)"
|
|
276
|
+
outputs: ["outputs/figures/index_correlation_matrix.png"]
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## References
|
|
282
|
+
|
|
283
|
+
- Pieretti, N., Farina, A. & Morri, D. (2011). A new methodology to infer the singing activity of an avian community: the Acoustic Complexity Index (ACI). *Ecological Indicators*, 11(3), 868–873. DOI: 10.1016/j.ecolind.2010.11.005
|
|
284
|
+
- Sueur, J., Pavoine, S., Hamerlynck, O. & Duvail, S. (2008). Rapid acoustic survey for biodiversity appraisal. *PLOS ONE*, 3(12), e4065. DOI: 10.1371/journal.pone.0004065
|
|
285
|
+
- Kahl, S. et al. (2021). BirdNET: A deep learning solution for avian diversity monitoring. *Ecological Informatics*, 61, 101236. DOI: 10.1016/j.ecoinf.2021.101236
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Acoustic Indices Reference
|
|
2
|
+
|
|
3
|
+
## Index Overview Table
|
|
4
|
+
|
|
5
|
+
| Index | Full name | What it measures | Scale | R package | Sensitive to noise? |
|
|
6
|
+
|---|---|---|---|---|---|
|
|
7
|
+
| ACI | Acoustic Complexity Index | Temporal variation in spectral energy | 0–∞ (relative) | soundecology | Medium |
|
|
8
|
+
| BI | Bioacoustic Index | Intensity in biological frequency band (2–8 kHz) | 0–∞ (dB·Hz) | soundecology | Low |
|
|
9
|
+
| NDSI | Normalized Difference Soundscape Index | Ratio biophony/geophony | −1 to +1 | soundecology | High |
|
|
10
|
+
| H | Acoustic Entropy | Spectral and temporal entropy | 0–1 | soundecology | Medium |
|
|
11
|
+
| ADI | Acoustic Diversity Index | Shannon diversity of frequency bins | 0–∞ | soundecology | Medium |
|
|
12
|
+
| AEI | Acoustic Evenness Index | Gini coefficient of frequency bins | 0–1 | soundecology | Medium |
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Index Formulas and Interpretation
|
|
17
|
+
|
|
18
|
+
### ACI (Acoustic Complexity Index)
|
|
19
|
+
Calculates the sum of absolute differences in spectral amplitudes across time steps within each frequency bin. High ACI = high temporal variation = complex biological signal.
|
|
20
|
+
|
|
21
|
+
**Caution:** Heavy rain and wind also produce high ACI. Correlate with NDSI to separate biological from abiotic signals.
|
|
22
|
+
|
|
23
|
+
### NDSI (Normalized Difference Soundscape Index)
|
|
24
|
+
NDSI = (biophony − geophony) / (biophony + geophony)
|
|
25
|
+
- Biophony band: 2–8 kHz (default)
|
|
26
|
+
- Geophony band: 0.2–1 kHz (default)
|
|
27
|
+
- NDSI > 0 → biophony dominant; NDSI < 0 → geophony/anthrophony dominant
|
|
28
|
+
|
|
29
|
+
### H (Acoustic Entropy)
|
|
30
|
+
H = Ht × Hf where Ht = temporal entropy, Hf = spectral entropy.
|
|
31
|
+
Range 0–1; values close to 1 indicate highly variable, complex soundscape.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Recommended Index Combinations
|
|
36
|
+
|
|
37
|
+
| Research question | Primary index | Supporting index |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| Overall acoustic biodiversity | H or ADI | ACI |
|
|
40
|
+
| Urbanisation gradient | NDSI | BI |
|
|
41
|
+
| Diel soundscape pattern | ACI heatmap | NDSI by hour |
|
|
42
|
+
| Disturbance recovery | ACI trend | H trend |
|
|
43
|
+
| Biophony vs. anthrophony | NDSI | BI |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Computing Indices in R
|
|
48
|
+
|
|
49
|
+
```r
|
|
50
|
+
suppressPackageStartupMessages(library(soundecology))
|
|
51
|
+
suppressPackageStartupMessages(library(tuneR))
|
|
52
|
+
|
|
53
|
+
wav_file <- readWave("recording.wav")
|
|
54
|
+
|
|
55
|
+
# ACI (min_freq and max_freq in Hz)
|
|
56
|
+
aci <- acoustic_complexity(wav_file, min_freq = 200, max_freq = 10000, j = 5)
|
|
57
|
+
cat("ACI:", aci$AciTotAll_left)
|
|
58
|
+
|
|
59
|
+
# NDSI
|
|
60
|
+
ndsi_result <- ndsi(wav_file, fft_w = 1024, anthro_min = 1000, anthro_max = 2000,
|
|
61
|
+
bio_min = 2000, bio_max = 8000)
|
|
62
|
+
cat("NDSI:", ndsi_result$ndsi_left)
|
|
63
|
+
|
|
64
|
+
# Full suite
|
|
65
|
+
multi <- multiple_sounds(
|
|
66
|
+
directory = "audio_dir/",
|
|
67
|
+
resultfile = "outputs/acoustic_indices.csv",
|
|
68
|
+
soundindex = "soundecology",
|
|
69
|
+
min_freq = 200,
|
|
70
|
+
max_freq = 10000,
|
|
71
|
+
max_duration = 60
|
|
72
|
+
)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Sensitivity to Anthropogenic Noise by Index
|
|
78
|
+
|
|
79
|
+
| Noise source | ACI | NDSI | H | ADI |
|
|
80
|
+
|---|---|---|---|---|
|
|
81
|
+
| Road traffic (low-freq) | Low | High | Medium | Low |
|
|
82
|
+
| Aircraft | Medium | High | Medium | Medium |
|
|
83
|
+
| Wind | High | Medium | Low | Low |
|
|
84
|
+
| Rain | High | Low | Low | Low |
|
|
85
|
+
| Human voices | Medium | High | Medium | Medium |
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## References
|
|
90
|
+
|
|
91
|
+
- Villanueva-Rivera, L.J. et al. (2011). A primer of acoustic analysis for landscape ecologists. *Landscape Ecology*, 26(9), 1233–1246. DOI: 10.1007/s10980-011-9636-9
|
|
92
|
+
- Pijanowski, B.C. et al. (2011). Soundscape ecology: the science of sound in the landscape. *BioScience*, 61(3), 203–216. DOI: 10.1525/bio.2011.61.3.6
|
|
93
|
+
- Pieretti, N. et al. (2011). A new methodology to infer the singing activity of an avian community: the Acoustic Complexity Index (ACI). *Ecological Indicators*, 11(3), 868–873. DOI: 10.1016/j.ecolind.2010.11.005
|