Merge seasons-ship-3 into nav-and-filters: the seasons ship and the places ship touched the same trail files; both sides kept

This commit is contained in:
swaits committed 2026-11-20 13:45:06 -07:00
commit fd2e6fc6c7
122 files changed
+7437 -211

No files matched your search

+9
View File
@@ -32,3 +32,12 @@ down the list in order and stop at the first step that fails.
entry when a placement changes.
8. **Build the site** with `python3 web/build.py --out _site` and read the places page, one park
page, one range page and one wilderness page.
## Seasons
Every trail has a season. Where a page states one, the season is that page's. Where none does, the season is an estimate: set by a reviewer from the trail's climate and the seasons of similar trails, with its confidence on the record (`docs/season-judging.md`). The aim of this audit is that estimates shrink over time, and that none goes stale unnoticed.
1. Search afresh for a page that states the season of every trail still marked `estimate`. List them with `python3 tools/estimate_season.py estimates`. For each, follow `docs/season-research.md`: the trail's holder or a government page first, then an established hiking reference, a guidebook publisher's page or an association list. When a page states a season, replace the estimate through `tools/refresh.py` (propose, collect, apply): give the page's season and months, the basis (`primary`, `sources` or `source`), the page as a `[[hike.source]]` naming `season` and `months`, and remove the climate source and `season_method`. A change to the season gets a `[[history]]` entry like any other fact. Then run `python3 tools/season_judge.py inputs` so that the record of estimate inputs drops the trail. A trail with no page found stays an estimate, and nothing else about it changes.
2. Re-run the machine estimate and flag any estimate whose inputs have changed: `python3 tools/estimate_season.py check`. It reruns the machine estimate for every estimate, compares it, the climate at the trail and the sourced trails it is compared with against what was recorded in `tools/season_inputs.json` when the season was set, and lists each trail whose inputs differ. The listing is a flag, not a rewrite. For each trail listed, build its packet (`python3 tools/season_judge.py packets`), look at what changed, and either keep the season or set it again by judgement. Then run `python3 tools/season_judge.py inputs` to record the inputs as they now are. The check also fails when the blind test of the method (`tools/season_blind_test.json`) is below its bar, or when the fit of the machine estimate against the sourced seasons has got worse.
The same check runs on its own on the first of each month (`.github/workflows/season-check.yml`), so a changed estimate is noticed even when the audit is late. The audit is still the step that acts on it.
+3 -3
View File
@@ -128,7 +128,7 @@ The field and file names keep the word "line" (`line.geojson`, `line_file`, `lin
## `[hike]`: what a hiker asks first
Optional: a record without `[hike]` is valid. The table holds the facts a hiker wants before anything else: where the trail goes, what the country is like, how long it takes, when to go, where its own site is. Every fact is read on a page, and that page is named in `[[hike.source]]`. The first choice is a page of the trail's holder (the agency, the association, or for a route its author) or a government page. Where those say nothing, a fact may be read on an established hiking reference that covers the trail, such as a guide site, a hiking association's list of trails or a guidebook publisher's page; the source entry names that site as the publisher, so a reader can see where the fact came from and weigh it. Apps and pages that anyone can edit (AllTrails, forums, social media, wikis) are not sources. A fact found on no acceptable page is left out, never guessed, except season, which may be estimated and must then say so. Typical time is estimated at page-build time and never stored, while an estimated season is stored on the record. Where sources disagree, the managing body's figure is used. Wording is ours: nothing is copied from a source.
Optional: a record without `[hike]` is valid. The table holds the facts a hiker wants before anything else: where the trail goes, what the country is like, how long it takes, when to go, where its own site is. Every fact is read on a page, and that page is named in `[[hike.source]]`. The first choice is a page of the trail's holder (the agency, the association, or for a route its author) or a government page. Where those say nothing, a fact may be read on an established hiking reference that covers the trail, such as a guide site, a hiking association's list of trails or a guidebook publisher's page; the source entry names that site as the publisher, so a reader can see where the fact came from and weigh it. Apps and pages that anyone can edit (AllTrails, forums, social media, wikis) are not sources. A fact found on no acceptable page is left out, never guessed, except season, which may be estimated and must then say so. Typical time is estimated at page-build time and never stored, while an estimated season is stored on the record. Where sources disagree, the managing body's figure is used; where none of them manages the trail, is its association or is its route author, the season is set by judgement from all the pages and the climate estimate, and `season_method` says so. Wording is ours: nothing is copied from a source.
| Field | Type | Meaning | Example |
| --- | --- | --- | --- |
@@ -140,8 +140,8 @@ Optional: a record without `[hike]` is valid. The table holds the facts a hiker
| `days` | array of two integers | The usual time to walk the whole trail in one go, `[fewest, most]`, in days, as a source states it. Weeks count 7 days, months 30. | `[150, 210]` |
| `season` | string | The months in which the whole trail is usually walked, as a short phrase. Not the dates a park or hut is open, unless those set the walking season. `season` and `months` come together: one is never given without the other. For an estimated season (`season_basis = "estimate"`) the phrase is built from the months. | `"July to September"` |
| `months` | array of integers | The same season as month numbers, 1 to 12, for filtering: every month in which the whole trail, or a usual start, is normally walked. A month counts when about half of it or more is in season. Given whenever `season` is, and never without it. | `[7, 8, 9]` |
| `season_basis` | string | Required whenever `season` is present, and refused without it. Where the season came from, one of: `primary` (the page is published by the body that manages the trail, the trail's own association, or, for a route worked out by a hiker, that route's author); `sources` (no primary page, but two or more pages from different publishers agree on the season); `source` (one page that is not a primary one); `estimate` (no page states a season, so it is worked out from climate). A route author's stated season counts as `primary`. | `"primary"` |
| `season_method` | string | Required with `season_basis = "estimate"`, where it is one sentence naming the method and its inputs: the dataset, the period, the points used and the rule version. Allowed with `sources`, where it says in one sentence how the season was settled when the pages differ. Refused with `primary` and `source`. | `"Estimated from 1991-2020 climate normals at 5 track points (rule version 1)."` |
| `season_basis` | string | Required whenever `season` is present, and refused without it. Where the season came from, one of: `primary` (the page is published by the body that manages the trail, the trail's own association, or, for a route worked out by a hiker, that route's author); `sources` (no primary page, but two or more pages from different publishers agree on the season); `source` (one page that is not a primary one); `estimate` (no page states a season, so it is worked out from climate). A route author's stated season counts as `primary`. An `estimate` has no page that states a season: its one `[[hike.source]]` names both `season` and `months` and cites the climate data (CHELSA, with ETOPO), and any ordinary page naming the season makes the basis wrong. An estimate is worked out by a reviewer from the trail's location, elevation, monthly climate normals, a machine estimate and the most similar sourced trails (`tools/season_judge.py`); the method was tested blind against the seasons that pages state, and the result is in `tools/season_blind_test.json`. | `"primary"` |
| `season_method` | string | Required with `season_basis = "estimate"`, where it is one or two plain sentences saying how the season was set and what sets it there, ending "Confidence: high.", "Confidence: medium." or "Confidence: low.". Allowed with `sources`, where it says how the season was settled when the pages differ; a season with a method was set by judgement and is shown as an estimate, not as a page's statement. Refused with `primary` and `source`. | `"Snow keeps the high passes closed until late June and returns in October. Confidence: high."` |
| `high_point` | string | Name of the highest point on the trail. | `"Mount Mansfield"` |
| `high_point_m` | integer | The elevation of the highest point in metres, rounded to the nearest metre (converted from feet where the source gives feet). May be given without `high_point` where a source states the elevation but not a name. | `1340` |
| `terrain` | array of strings | One to three of `alpine`, `forest`, `desert`, `coast`, `prairie`, `canyon`, `tundra`, `lakes`, `farmland`: the main kinds of country only. | `["forest"]` |
+54
View File
@@ -0,0 +1,54 @@
# Setting a season by judgement
Where no page states a season, it is set by a reviewer from a packet, and the method was tested blind against the seasons that pages state. This page is the reviewer's instruction and the record of the test. The tools are `tools/season_judge.py` (packets, scoring, staging) and `tools/estimate_season.py` (the machine estimate that is one input, and the monthly check).
## The test
The reviewers also estimated every trail whose season a page states, from packets identical in form with the season hidden: the trail's own timing sentences were removed, and its comparable trails were never dealt to the same part as it. The three parts were reviewed separately, and the figures are added together. The result is in `tools/season_blind_test.json`, which the site reads; `python3 tools/season_judge.py score <answer files> --write tools/season_blind_test.json` produces it. A season "matches" when each end of the reviewer's months is within one month of the stated season's, on the circle of the year. The machine estimate on its own matches 67.6 percent on the same measure, under the 75 percent bar, so it is not written to a record; the judged method passes, and its confidence labels are honest: high matches most often, low least.
## What a packet lacks
The packets rebuilt by `tools/season_judge.py packets` carry the monthly high temperature at the high and low ground but give monthly precipitation only when a file of it is supplied (`--precip`); the packets the reviewers read in November 2026 carried it for every trail.
## The reviewer's instruction
You will estimate the hiking season for each trail on a list you are given (one of `part-1.txt`, `part-2.txt` or `part-3.txt`). For each id there is one packet, `packets/<id>.md`. Work only on the ids in your list, and read only the packet for the id you are estimating.
## What to estimate
The months a typical hiker normally walks the whole trail, or thru-hikes it, in a normal year.
- A season may be two windows (spring and fall) or wrap the year end (October to April).
- A month counts when about half of it or more is in season.
- Think about what actually sets the season there: snow on the high ground, summer heat, monsoon, humidity and bugs, hunting season, short daylight, river levels, mud.
- People do walk in cold and snow in places where that is normal. Do not assume summer everywhere.
## Rules
1. Use only the packet and your own general knowledge of the region and of the trail.
2. Do not open any trail record, do not search the web, and do not read any file outside the packet and this README.
3. Do not look at other trails' packets, answers or any scores.
## What a packet contains
- **The trail:** id, name, common name, country, states or provinces, length in miles, kind, shape, terrain, travel (on trail or cross-country), high point and typical days where on file.
- **Summary, start and end:** from the trail's record, with every sentence that bears on timing removed.
- **Where it is:** southernmost and northernmost latitude and westernmost and easternmost longitude of the sample points, and whether the location comes from a real track, from start and end points only, or from a region-centre fallback (the least precise).
- **Elevation:** high ground and low ground in feet as the climate was read, and the track's highest and lowest points where there is a track.
- **Climate normals (1981 to 2010):** for each month, the mean daily high in degrees F at the high ground (the upper quarter of the sample points) and the low ground (the lower half), and monthly precipitation in inches at both. Temperatures are modelled and lapse-corrected, so treat them as a guide.
- **Machine estimate:** a climate model's estimated months, right about two times in three. Use it as one input, not an answer.
- **Comparable trails:** ten trails with a season on record, chosen as most similar in climate and nearest in place, with state, high ground elevation, and each one's season and months. They are neighbours, not copies: yours may differ for good reason.
- **What pages say:** present for a few trails only, where published pages disagree: each page's publisher and the months it gives.
## Answer format
One tab-separated file, `an answer file named by whoever runs the review (for example `answers/<yourname>.tsv`)`, one line per trail on your list, no header, five columns:
1. id
2. months, as comma-separated numbers 1 to 12 (e.g. `7,8,9`, or `3,4,5,9,10,11`, or `10,11,12,1,2,3,4`)
3. season phrase (e.g. `July to September`, `Spring and fall`)
4. confidence: `high`, `medium` or `low`
5. one sentence: what sets the season there
Rules for the file: every id on your list exactly once; never an empty month list; no tabs inside a column; no extra columns. Say low when you really do not know.
@@ -1,6 +1,6 @@
# A season on every trail
Design, 2026-11-20. Status: awaiting approval.
Design, 2026-11-20. Status: built; the method changed after the climate model was tried (see "What changed in the method").
## Intent
@@ -194,6 +194,17 @@ What the tool does:
- Tests: every record has season, months and basis; basis fits the sources;
estimates have a method; no page says a season is missing.
## What changed in the method
The plan above chose a rule over climate normals for Step 3. It was built and tested (`tools/estimate_season.py`, `tools/season_model.py`; CHELSA V2.1 1981 to 2010 normals, CC0, with NOAA ETOPO 2022 elevation), and it matched only 67.6 percent of the sourced seasons within one month at each end, under the owner's bar of 75 percent. Its output is therefore not written to a record. What was decided instead:
- **A reviewer judges each estimate.** For each of the 75 trails with no season, a reviewer set the months from a packet: the trail's location, elevation, monthly climate normals, the machine estimate, and the ten most similar sourced trails (`tools/season_judge.py packets`; the reviewer's instruction is `docs/season-judging.md`). The machine estimate stays in the repository as an input to the packets and as the monthly check.
- **The method is tested blind.** The same reviewers estimated the 148 trails whose season a page states, from identical packets with the season hidden, and a trail's comparable trails never came from its own part of the split. They matched 114 of 148 (77.0 percent), by the reviewer's confidence 48 of 52 (high), 55 of 76 (medium) and 11 of 20 (low). The figures are in `tools/season_blind_test.json`, written by `season_judge.py score`, and the site reads them.
- **An estimate is stricter.** `season_basis = "estimate"` means no page states a season. `season` is built from `months`; `season_method` is one or two plain sentences saying how it was set and what sets the season there, ending "Confidence: high.", "medium." or "low."; and its one `[[hike.source]]` names `season` and `months` and cites the climate data. The validator refuses an estimate with any ordinary page naming the season, or with no method, and requires a season on every trail.
- **Pages that disagree.** Six trails have pages that disagree where none is the managing body, association or route author. Their season is set by judgement from all the pages and the estimate: basis `sources`, the pages cited as sources naming the season, and a `season_method` saying the pages differ and how it was settled. A season with a method is shown as an estimate (it reads "About" with a note), left out of structured data, and not counted among the seasons a page states.
- **The monthly check** (`estimate_season.py check`) reruns the machine estimate for every estimate and flags any whose inputs have changed since `tools/season_inputs.json` recorded them. It does not rewrite anything. The audit (`docs/audit.md`) also searches afresh for a page for every estimate.
- **On the site**, a trail's page reads "About April to October" with a note (no page states a season; estimated from the climate at the trail's elevation and from similar trails; what sets it there; the confidence; that people walk it outside these months). Rows, tables and month lists mark estimates, the month filter can leave them out, and the reference page and glossary give the counts and the blind-test result.
## Open risks
- Climate normals are coarse in steep terrain. The fit against sourced