Skip to content

Pressure: compare the low-tourism 2020–21 season with the others (#175) - #180

Merged
Luen merged 3 commits into
mainfrom
feat/175-low-tourism-season
Nov 12, 2026
Merged

Luen merged 3 commits into
mainfrom
feat/175-low-tourism-season

Conversation

@Luen

@Luen Luen commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Part of #175 (the tourism half, scoped down; see below). Independent of the map PRs, branched from main.

What

New "A season with few visitors" section on /pressure:

  • Tourism on Moorea fell by more than half in 2020 (ISPF, Bilan du tourisme 2020). Fieldwork runs October–February, so the March–July 2020 border closure missed every set. 2020–21 was sampled while visitors were still scarce, though, so it's the closest thing to a "people vanished" season.
  • Bar chart: mean catch rate for 2020–21 vs the other seasons (95% intervals), with a rateTest Statistics line (raw, then adjusted for nursery and day of the season; season skipped because it is the factor under test). Numbers are computed live.
  • A note says one season is confounded with everything else that year (weather, nurseries sampled, crew, cohort). It's a description, not a tourism effect.

Real data: 1.04 vs 0.99 sharks per net-hour (97 vs 1,088 sets); no detectable difference (adjusted p = 0.10).

Not done from #175

  • Tourism time series: ISPF publishes island-level figures only as quarterly or annual PDF dashboards, with different layouts over the years and Moorea broken out only in some. A 2013–2026 series would mean hand-transcribing dozens of PDFs, so it's left for now.
  • PGEM protected zones: no public polygon layer found (the 2016 review and the UC Berkeley Moorea guide link only to an ArcGIS viewer). Waiting on question 3 in Question: telemetry, adult GPS, PGEM zones and activity data for the map ideas #176.

Checks

pnpm lint, pnpm check, pnpm test, opt-in real-data test; page checked in the dev server.

🤖 Generated with Claude Code

Tourism on Moorea fell by more than half in 2020 (ISPF). Fieldwork
runs October to February, so the border closure missed it, but
2020-21 was sampled while visitors were scarce. /pressure now compares
that season's catch rate with the rest (negative-binomial LRT, adjusted
for nursery and day of the season), with copy that says one season is
confounded with everything else about that year.

ISPF's island series are PDF-only and PGEM zones need a data source
(#176), so neither is charted yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Luen

Luen commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

Reviewed both changed files and the existing rateTest / rateText helpers. No actionable code defect found; no fix needed.

The comparison uses timed, dated sets; skips season adjustment because season is the factor being tested; retains nursery/day-of-season adjustment; and clearly explains single-season confounding. The bar chart explicitly describes a mean per-set rate, while the statistical helper fits counts with a net-hours offset. The low-tourism section is omitted if that season has no eligible sets.

Independently ran lint, type checks (0 errors/warnings), unit tests (118 passed; 2 opt-in real-data tests skipped) and production build on this branch. Private data is unavailable, so I did not reproduce the PR's real-data numbers or independently verify the cited tourism report. No changes pushed to this PR; no merge or deployment performed.

@Luen

Luen commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Reviewed #180 and pushed c3e341c to correct the sampling-date claim and tighten the source wording.

[P2] Report the sample's actual dates. The text assumed an October-February field season, but the eligible 2020-21 timed sets begin in September. The loader now supplies first/last eligible dates and the page renders those dates. This avoids silently misdescribing the observations used in the comparison.

The ISPF source reports hotel-room sales, so the copy now names that measure and explicitly treats it as a visitor proxy, rather than a count of people on the water. Linked the accessible ISPF publication page, whose hotel statistics support the decline. Removed the unnecessary claim that the source is available only as PDF dashboards. Added a short sampling-date/source-metric note to AGENTS.md.

The catch-rate comparison is unchanged: checked timed/dated sample selection, mean per-set rates, net-hours offsets, and skipping season adjustment because season is the tested factor. The single-season confounding caveat remains.

Validation: pnpm lint; pnpm check (0 errors/warnings); pnpm test (118 passed, 2 opt-in tests skipped); opt-in real-data import test (1 passed); pnpm build. A local production-browser check against the real data verified the computed sample dates, corrected source wording, displayed rates and nursery/day-of-season adjusted statistics. No spreadsheets changed. Review complete.

@Luen
Luen merged commit 7fc421b into main Nov 12, 2026
6 checks passed
@Luen
Luen deleted the feat/175-low-tourism-season branch November 12, 2026 01:27
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.

1 participant