Skip to content

Importer: exact pressure scores (#131); year-off recaptures take their set's date (#133) - #164

Merged
Luen merged 1 commit into
mainfrom
feat/131-133-lab-answers
Nov 8, 2026
Merged

Luen merged 1 commit into
mainfrom
feat/131-133-lab-answers

Conversation

@Luen

@Luen Luen commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Applies Dr Rummer's answers on #131 and #133.

#131: exact per-nursery pressure scores

The paper's data statement points to its dataset in James Cook University's Research Data repository, doi:10.25903/2SFB-QX79 (CC BY-NC 4.0). Its bouyoucos_et_al_anthro.csv has the three scores for all ten nurseries:

  • fish: fishing effort;
  • tramp: direct human impact (trampling);
  • art: coastal artificialisation.

It is committed unchanged (apart from line endings) as external/pressure-bouyoucos2024.csv. Jodie confirmed it's public.

  • The importer uses it in place of the private ranking workbook's values, which were digitised from Fig. 4. The composite and its Low/Medium/High tier follow the workbook's rule: min–max normalise each metric, average them, then split 0–1 into thirds.

  • It is the paper's data. The coefficients of variation now match the paper:

    Metric Digitised Dataset Paper
    Fishing effort 31% 32% 32%
    Coastal artificialisation 87% 82% 82%
    Direct human impact 73% 58% 58%
  • Tiers don't change. Composites move by at most 0.05.

  • /pressure, recomputed live: the same two pairs stay below p = 0.05:

    • artificialisation vs growth: ρ 0.64, p 0.044 (digitised: 0.67, 0.034);
    • composite vs growth: ρ 0.80, p 0.005 (digitised: 0.83, 0.003).

    Neither now passes the Bonferroni threshold for the 16 pairs; with the digitised values, the second did. The other per-metric correlations move by at most 0.1 in ρ, and all stay above p = 0.05.

  • Copy: /pressure and each nursery page no longer say "digitised". The About page and footer credit the dataset and its licence.

  • Metadata slip: the JCU record names the 2020 Coral Reefs paper as its related publication. The 2024 paper's data statement cites this DOI, though, and the CVs match.

#133: dates a year outside the season

Jodie: a date can be off "because the shark is caught in a previous year initially and then recaptured in that current season".

  • Current sheets: I checked all 13 automatic date fixes against the set logs and each shark's history, and every one is a year typo. The corrected dates line up with set-log sequences and set numbers.
    • The one row that fits her description is a 2015-16 sicklefin lemon noted "one from last year?". Its set number dates it to the importer's corrected date.
    • None of the 13 matches an earlier capture of the same shark.
  • For future sheets: if a recapture row carries the first-capture date, shifting the year lands on that capture's anniversary, not the recapture. Now a year-off capture with a set number takes that set's date (yearOffSetDate) and logs it. The warning text also names both causes.
  • Effect on today's data: none. Re-importing the real data changes no capture's date or set.

Checks

  • pnpm lint, pnpm check and pnpm test (112 tests, including new unit tests for both rules), plus the opt-in real-data import.
  • pnpm build, and /pressure and the nursery pages checked in the browser on the real data.
  • IMPORTER_VERSION 9 → 10.

Closes #131. Part of #133 (its other questions are still open).

🤖 Generated with Claude Code

…r set's date (#133)

#131: Jodie Rummer pointed to the paper's data. The per-nursery scores are
now the Bouyoucos et al. (2024) dataset (JCU Research Data,
doi:10.25903/2SFB-QX79, CC BY-NC 4.0), committed verbatim as
external/pressure-bouyoucos2024.csv. They override the private workbook's
values digitised from Fig. 4; composite and tier keep the workbook's rule.
Their CVs match the paper (32%, 82%, 58%). Page copy and credits updated.

#133: a capture date a year outside the season can be the shark's first
capture in an earlier season, written on its recapture row. Such a capture
now takes its set's date when its set number finds the set, instead of the
year-shifted anniversary. All 13 current fixes already match their set
logs, so no capture moves today.

IMPORTER_VERSION 9 -> 10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Luen
Luen merged commit ac548c1 into main Nov 8, 2026
6 checks passed
@Luen
Luen deleted the feat/131-133-lab-answers branch November 8, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data: exact per-nursery pressure scores from Bouyoucos et al. (2024)

1 participant