Skip to content

Environment: French Polynesia school holidays as a busy-day proxy (#25) - #114

Merged
Luen merged 1 commit into
mainfrom
school-holidays
Nov 3, 2026
Merged

Luen merged 1 commit into
mainfrom
school-holidays

Conversation

@Luen

@Luen Luen commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #25. This adds the last missing piece of that issue: French Polynesia school holidays, from 2013-14 to the present, as a busy-day proxy alongside weekends, public holidays and the Christmas–New Year period.

Where the dates come from

School years Source
2013-14 to 2016-17 The Polynesian government's own calendar orders (arrêtés) for collèges and lycées: 0270/CM of 28 Feb 2013 (amending 332/CM of 2011), 0399/CM, 0401/CM and 0403/CM of 12 March 2014. The national open data starts in 2017-18, so these years are transcribed in scripts/fetch-external.mjs. The orders come from the Wayback Machine's archive of the old education.pf site (education.pf/des.pf.old/fichiers_des/Calendriers/…).
2017-18 onwards The French Ministry of Education's open data, "Le calendrier scolaire" (fr-en-calendrier-scolaire, zone Polynésie, Licence Ouverte 2.0). It is credited on About, in the footer and in the README.

Notes:

  • Pupils only. For the national data, a day counts as a holiday when pupils at either level (primary or secondary) are off; teachers' dates are dropped. The 2013–17 orders cover collèges and lycées only; primary schools differed by a day or two at the edges of some breaks.
  • One correction to the national data. It gives the 2023-24 November break a start date of 28 September, which falls inside the September break. That is corrected to 28 October in SCHOOL_ERRATA: every other year, that break starts on the Saturday about two weeks before classes resume in November. I couldn't confirm it against the 2023 order itself, so it is worth a check.
  • Typos fail loudly. The job throws if any two breaks overlap or a break ends before it starts, so a new typo upstream fails the weekly refresh instead of reaching the site.
  • Not included: single Saturdays without morning classes (2 and 9 May 2015). Saturdays already count as weekends.

Changes

  • scripts/fetch-external.mjs: new school job writing external/school-holidays.csv (first and last day off, local dates). It joins the weekly refresh, so future calendars arrive on their own (the national data already runs to 2028-29).

  • New school_holidays table (migration 0004), loaded as dataset().schoolHolidays. IMPORTER_VERSION bumped to 8.

  • holidays.ts: schoolDays(), which expands each break into its individual dates, and a new School holidays day type. When a date falls in more than one category, the order is: public holiday > festive period > school holidays > weekend.

  • /pressure → Busy days:

    • the "Catch rate by type of day" chart gains a fifth bar;
    • new test: school-holiday weekdays against term-time weekdays, which keeps weekends out of the comparison;
    • a list of how many sets fall in each break.

    Every number on the page is computed live, and the wording changes with the p-value. On the current data, neither test shows a difference beyond chance.

  • AGENTS.md (new "School holidays (Environment: human-activity proxies (weekends, public & school holidays) #25)" section), README, About, footer and the refresh workflow comment.

Checks

  • pnpm lint, pnpm check, pnpm test (77 passed)
  • Opt-in real-data test, plus a local run of the pressure analysis on the real workbooks (scratch test, deleted)
  • Looked at /pressure in the dev server: five bars and the new copy
  • New tests:
    • holidays.test.ts: expanding breaks into dates, and the order of day types;
    • import.test.ts: every school year from 2013-14 to 2025-26 is present, and the 2023 correction is applied.

🤖 Generated with Claude Code

School holidays since 2013-14 now sit beside weekends, public holidays and
the festive window on the Human pressure page.

- fetch-external.mjs gains a `school` job writing external/school-holidays.csv:
  2013-14 to 2016-17 transcribed from the Polynesian government's calendar
  orders (arrêtés 0270/CM 2013, 0399, 0401, 0403/CM 2014, archived from
  education.pf), then the Ministry of Education's open data from 2017-18
  (Licence Ouverte 2.0). Pupils only; a known typo is corrected in
  SCHOOL_ERRATA and overlapping breaks fail the job.
- school_holidays table, loaded into the dataset; IMPORTER_VERSION 8.
- holidays.ts: schoolDays() and a 'School holidays' day type (public holiday >
  festive > school holidays > weekend).
- /pressure compares school-holiday weekdays with term-time weekdays and lists
  sets per break; About, footer and README credit the calendars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Luen Luen added enhancement New feature or request analytics Charts, statistics and analyses environment Weather, ocean, tide, climate and astronomy data labels Nov 3, 2026
@Luen
Luen merged commit fea20b3 into main Nov 3, 2026
5 checks passed
@Luen
Luen deleted the school-holidays branch November 3, 2026 11:33
@Luen Luen mentioned this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

analytics Charts, statistics and analyses enhancement New feature or request environment Weather, ocean, tide, climate and astronomy data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Environment: human-activity proxies (weekends, public & school holidays)

1 participant