From a8fdd7f439aec0174ade6e4a2fe3385799afd042 Mon Sep 17 00:00:00 2001 From: Michael Dales Date: Tue, 25 Nov 2025 09:32:30 +0000 Subject: [PATCH] Add occurrence validation to run script --- requirements.txt | 2 +- scripts/run.sh | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8077573..d059589 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ pymer4 pyproj scikit-image redlistapi -yirgacheffe>=1.9 +yirgacheffe>=1.10 aoh[validation]>=1.0 # GDAL should be installed manually to match the version of the library installed on your machine diff --git a/scripts/run.sh b/scripts/run.sh index d88e05b..41ebeca 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -133,6 +133,18 @@ aoh-collate-data --aoh_results "${DATADIR}"/aohs/current/ \ echo "Calculating model validation..." aoh-validate-prevalence --collated_aoh_data "${DATADIR}"/validation/aohs.csv \ --output "${DATADIR}"/validation/model_validation.csv +for TAXA in "${TAXALIST[@]}" +do + echo "Fetching GBIF data for ${TAXA}..." + aoh-fetch-gbif-data --collated_aoh_data "${DATADIR}"/validation/aohs.csv \ + --taxa "${TAXA}" \ + --output_dir "${DATADIR}"/validation/occurrences/"${TAXA}" + echo "Validating occurrences for ${TAXA}..." + aoh-validate-occurrences --gbif_data_path "${DATADIR}"/validation/occurrences/"${TAXA}" \ + --species_data "${DATADIR}"/species-info/"${TAXA}"/current/ \ + --aoh_results "${DATADIR}"/aohs/current/"${TAXA}"/ \ + --output "${DATADIR}"/validation/occurrences/"${TAXA}".csv +done # Threats echo "Generating threat task list..."