Add designs and plans for park, range and wilderness pages and for a season on every trail

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-20 09:16:16 -07:00
1 parent b9977094ba
commit b0ddaeac48
4 files changed
+1440

No files matched your search

@@ -0,0 +1,223 @@
# Park, range and wilderness pages
Design, 2026-11-20. Status: awaiting approval.
## Intent
People search for long hikes by named place: "wind river range wyoming",
"backpacking trips in glacier national park", "best backpacking loops in the
adirondacks". The site answers by state and province only. This adds pages for
national parks, mountain ranges and wilderness areas, so a search for a place
lands on the long trails in it. The aim is reach for free information, not
revenue.
## Goals
- A page for every national park, mountain range and wilderness area that has
3 or more trails.
- Each of those pages crossed with the existing lists (loops, length bands,
time bands and so on) wherever 3 or more trails match, as the state pages
are today.
- Existing list pages retitled and re-led to match how people ask.
- Every trail placed, including the 99 with no track.
## Non-goals
- National forests, gateway towns, counties, beginner or no-permit lists.
- New rule-based lists (high routes, winter, desert, coastal).
- Showing boundary outlines on maps.
- Any planning feature. This is discovery.
## Anti-goals
- A page that lists one or two trails, or that repeats another page's set
under a different name.
- A trail on a place page because its track skims the boundary.
- A place assignment nobody can check.
- Breaking any existing URL.
## Approaches considered
1. **A field on each record, filled from boundaries (chosen).** Each record
lists the places it is in. A tool fills the list by crossing tracks with
published outlines; trails without a track are filled by hand from a cited
source. Covers every trail and each assignment can be reviewed.
2. **Computed at build only.** Nothing stored. No hand entry, but 99 trails
could never appear on a place page.
3. **Hand-named sets in `collections.toml`.** Simple, but nothing checks an
assignment against a boundary.
The owner picked 1.
## Decided by the owner
- Membership is a field on the record (approach 1).
- Kinds: national parks, mountain ranges, wilderness areas.
- A place page needs 3 or more trails.
- Place plus list pages, and rewording of existing lists, are in scope.
## Design
### Place registry
A new `places.toml` at the repo root, one entry per place that any record
names:
```toml
[[place]]
slug = "wind-river-range"
kind = "range" # park | range | wilderness
name = "Wind River Range"
where = ["us-wy"] # state or province codes
within = ["rocky-mountains"] # optional, parent place slugs
source = "gmba-v2"
source_id = "..." # the publisher's id for the outline
```
Only places that at least one record names are listed. The registry is the
one spot where a place's display name, kind and source live.
### On the record
```toml
[[place]]
slug = "wind-river-range"
basis = "track" # track | stated
km = 142.3 # track length inside, basis "track" only
source = "..." # citation, basis "stated" only
```
- `basis = "track"`: the tool measured it. `km` is recorded so the threshold
can be audited. It is never shown on the site.
- `basis = "stated"`: no track. A person entered it, with a source that says
the trail is in that place.
- Adding places to a record gets a `[[history]]` entry like any other fact.
### Membership rule
A trail is in a place when at least 1 mile (1.6 km) of its main track lies
inside the outline. Alternates do not count. A nested range also gives
membership of every `within` parent, so a Teton Range trail is on the Rocky
Mountains page too.
### Boundary sources
| Kind | Source | Licence |
|---|---|---|
| US national parks | National Park Service boundary service (unit type National Park, plus units the owner's search list names, such as Sequoia and Kings Canyon as one page) | Public domain |
| US wilderness | Wilderness Connect, all four agencies | Federal work, public domain; credited |
| Canadian national parks, BC and Alberta provincial parks | Environment and Climate Change Canada, CPCAD | Open Government Licence, Canada |
| Mountain ranges | GMBA Mountain Inventory v2 | CC BY 4.0 |
Outlines are downloaded by the tool into a cache outside the repo and are not
committed. Each source gets an entry on the site's sources page.
Ranges come from an allow-list in the tool (GMBA ids), not from one hierarchy
level, because the useful names sit at different depths. The list starts from
the ranges the owner named and every GMBA range that 3 or more tracks cross,
and is reviewed by a person before records are written.
### Tool
`tools/place_trails.py`. It is not part of the site build, because the build
uses only the standard library and the outlines are large. It is never left
to someone remembering to run it (the owner's ruling). Three things make sure
of that:
- **Every push.** Each record carries `places_checked`, the date its places
were last measured or reviewed, and the fingerprint of the track that was
measured. The validator fails a record that has no `places_checked`, or
whose track has changed since. A new trail or a new track cannot ship
unplaced. A record in no park, range or wilderness still carries the date.
- **Every month.** A scheduled workflow runs `place_trails.py --check`: it
downloads the current outlines, re-measures every track, and fails with a
list of every difference from the records (a place gained or lost, a
boundary that moved, a place that crossed the 3-trail line).
- **Every audit.** `docs/audit.md`, a new written checklist for the monthly
audit of everything, lists the place check as a step, with the hand review
of the `stated` placements, which no tool can re-measure.
What the tool does:
1. Download and cache outlines; reproject to lon/lat.
2. For each record with `line.geojson`, measure the track length inside each
candidate outline.
3. Print a proposal: per trail, the places and kilometres; per place, the
trails. Nothing is written until the proposal is reviewed.
4. Write `[[place]]` entries and registry entries.
The tool may use libraries outside the standard library. The site build may
not, and does not need to: it reads only the records and the registry.
### Pages
- `/parks/<slug>/`, `/ranges/<slug>/`, `/wilderness/<slug>/`, each with the
same layout as a state page: filter bar, rows, map and counts on the first
screen, summary panel and cross-links below.
- `/parks/<slug>/<list>/` and so on for place plus list, 3 or more trails,
and not when the list holds every trail on the place page.
- The Places hub (`/regions/`) gains three sections listing them. Navigation
stays Trails, Places, About.
- State pages link to the parks, ranges and wilderness areas in the state.
Trail pages link to each of their places.
- Titles follow the search phrasing: "Long Hikes in the Wind River Range,
Wyoming", "Backpacking Loops in Yosemite National Park".
- Structured data, sitemap and filter behaviour are the same as for state
pages. Counts are exact. A place below 3 trails gets no page and no link.
### Rewording existing lists (second ship)
Titles, headings and ledes only; URLs and rules unchanged. Targets: "longest
hiking trails in the US", "thru-hikes under 100 / 200 miles", "short
thru-hikes", "week-long backpacking trips", "best backpacking loops". Wording
must pass the banned-word test in `test_facets`.
### Order
1. Registry, record field, validator, tool, and the proposal for review.
2. Records written, place pages, hub and cross-links. Ship with a changelog
entry.
3. Place plus list pages. Ship.
4. Reworded lists. Ship.
## Settled after a builder's read (designer's calls)
- **Reuse, not a copy.** The state-page code (`regions.region_page`,
`placefacets.plan`, `home.listing`) is generalised so a place is a kind plus
a slug, with states as one kind. The existing state-page tests are the
guard: they must pass unchanged. Strings such as "in a state or province"
become per-kind.
- **Map view.** The tool computes each place's bounding box from its outline
and writes it to the registry entry as `box`. `web/place-bounds.toml` stays
for states.
- **Filters.** On a place page the Where filter lists states and provinces as
it does today. The home page's Where filter is unchanged in the first ship.
Site search matches place names, so typing "wind river" finds the page.
- **Counting.** The 3-trail minimum counts both bases, track and stated.
- **History.** Adding or removing a place on a record needs a `[[history]]`
entry. `km` is a measurement, not a fact: a re-run that only changes `km`
needs none.
- **Reproducing.** Each registry entry records the source's version or
download date as `source_version`, so a measurement can be re-derived from
the same outline.
- **Slugs** are unique within a kind, not across kinds: `/parks/glacier/` and
`/wilderness/glacier-peak/` can coexist. A page that joins two units
(Sequoia and Kings Canyon) is one registry entry with two `source_id`s.
- `pages.py` has no plug-in point for new page kinds today; adding one is
part of the work.
## Left to the builder
- Schema and validator details for `[[place]]` and `places.toml`.
- Point-in-polygon and length-inside code, and simplification of outlines.
- Exact page titles and ledes within the vocabulary rules.
- Tests: every `[[place]]` slug is in the registry, every registry entry is
named by a record, no place page below 3 trails, page structure tests as
for state pages.
## Open risks
- Boundary findings come from a research worker and were not opened by the
designer. The first tool run is the check.
- Hand-placing 99 trackless trails is the slow part. Many are in no park or
wilderness and can be settled from the record's summary.
@@ -0,0 +1,203 @@
# A season on every trail
Design, 2026-11-20. Status: awaiting approval.
## Intent
The "By month" lists say "Only some trails have a season", and they are right:
109 of 223 records have one. A hiker picking a month sees half the catalogue.
The owner wants every record to carry a season, with its provenance on the
record, so a reader and a maintainer can tell a season an association
publishes from one worked out from climate. Some will be less trustworthy than
others, and the site says which.
## Goals
- All 223 records have `hike.season` and `hike.months`.
- Each season records where it came from and how far to trust it.
- A sourced season is always preferred. An estimate is the last resort and is
replaced when a source turns up.
- The site marks estimated seasons wherever a season is shown, and stops
saying only some trails have one.
## Non-goals
- Conditions, snow reports, or anything that changes year to year.
- Per-section or per-direction seasons beyond what the season phrase already
says.
- Re-researching the 109 seasons already on file, beyond classifying them.
## Anti-goals
- An estimate that reads like a stated fact.
- A season that tells someone a trail is closed. Trails in cold places are
walked in snow; an estimated season means the usual snow-free, not
dangerously hot months, and says so.
- A method nobody can re-run or check.
## Approaches considered
1. **Research first, estimate the rest, mark both (chosen).** Look for a
stated season for each of the 114 missing records. Estimate only what is
left, from climate normals, with a rule tested against the 109 seasons
already sourced.
2. **Estimate all 114 from climate.** Fast and uniform, but throws away
seasons that pages do state, and the Pacific Crest and Continental Divide
trails are among the 114.
3. **Research only, leave the rest blank.** Keeps the "never guessed" rule but
does not meet the goal.
## Decided by the owner
- Every record ends with a season.
- Provenance is on the record: a source, several sources, or an estimate, and
how much it is trusted.
- Climate data may be used to estimate, with the known weakness that people do
hike in snow and cold.
## Design (designer's calls, for the owner to correct)
### Schema
One new field, `hike.season_basis`, required whenever `season` is present:
| Value | Meaning | Trust |
|---|---|---|
| `primary` | The managing agency, the trail's own association, or for a route its author states it | Highest |
| `sources` | No primary page, but two or more pages from different publishers agree | High |
| `source` | One page that is not a primary one | Medium |
| `estimate` | No page states one; worked out from climate | Low |
- For the first three, `[[hike.source]]` entries name `season` in `facts`, as
today. The validator checks the count fits the basis (`sources` needs two).
- For `estimate`, a second new field `hike.season_method` holds one sentence
naming the method and its inputs, and the `[[hike.source]]` entry cites the
climate data. `months` is still given; `season` is the plain phrase built
from the months.
- `docs/schema.md` changes its rule: a hike 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 too, but at page-build time
and never stored; an estimated season is stored on the record. Only the
display pattern is shared ("About …" plus a note, and the small estimate
label on rows).
- `season_basis` and `season_method` are facts for history purposes. Each
record changed gets a `[[history]]` entry.
### Step 1: classify the 109
Each existing season gets a basis from its sources: by publisher (managing
body or not) and by count. A worker proposes; a person reviews the table.
### Step 2: research the 114
For each record with no season, look for a page that states when the trail is
normally hiked: the managing agency, the association, a guidebook publisher,
the route author. Record the season phrase, the months, the sources and the
basis. Trip reports count as `source` only when they speak of the usual
season, not one trip. Disagreement between pages is resolved toward the
managing body, and the season phrase may carry the nuance ("northbound starts
late February to April").
### Step 3: estimate the remainder
`tools/estimate_season.py`. It is not part of the site build, and it is never
left to someone remembering to run it (the owner's ruling):
- **Every push.** The validator fails any record with no season, so a new
trail cannot ship without one, sourced or estimated.
- **Every month.** A scheduled workflow runs `estimate_season.py --check`: it
re-runs every estimate and the fit against sourced seasons, and fails with
a list of estimates that would now come out different, or a fit that has
got worse.
- **Every audit.** `docs/audit.md`, the written checklist for the monthly
audit of everything, lists two season steps: the check above, and a fresh
search for a source for every season still marked `estimate`, so estimates
shrink over time.
What the tool does:
- **Where:** sample points along the track. With no track, the start and end
points; with neither, the place centroid of the record's regions, flagged
for hand review.
- **Elevation:** the track's high ground (upper quartile of the profile),
since the high sections decide when a trail opens. With no track,
`high_point_m` or the terrain at the sample points.
- **Climate:** monthly normals for temperature and snow cover at those points
and elevations, from an openly licensed source. Candidates to settle in the
plan: Open-Meteo's historical API (ERA5, CC BY 4.0), NOAA climate normals
and SNODAS (public domain, US only), Environment Canada normals.
- **Rule:** a month is in season when the high ground is normally free of snow
and the mean daily high at the low ground is under a heat limit. The
thresholds are fitted, not chosen: the rule is run against the 109 sourced
seasons and tuned until it reproduces them as well as it can.
- **Check:** the tool reports how often its months match the sourced months
(exact, within one month at each end, worse). That figure goes on the
site's reference page, so the trust in an estimate is a number. If the rule
cannot get most sourced trails within one month, estimates are not shipped
and the owner is told.
- **Review:** the proposed seasons are listed for a person to read before any
record is written. Odd ones (desert, coastal, far north) get a hand check
against a comparable sourced trail nearby.
### On the site
- Trail page: an estimated season reads "About June to September" with a
note, as estimated time does today: "Estimated from climate at the trail's
elevation. No source states a season. People do walk it outside these
months." Sourced seasons show their basis in "About this data".
- Rows, summary lines and month lists include every trail. Estimated seasons
are marked in the row.
- The "By month" blurb becomes "Trails normally hiked in the month. Estimated
seasons are marked." The "N trails with no season on file" note, the "Show
them" button and the "Not on file" cell go once coverage is complete.
- The filter bar's month filter gains a way to leave estimates out.
- The glossary entry and reference page coverage row are rewritten to match.
- Structured data states a season only for sourced ones.
### Order
1. Schema, validator, history tool, classify the 109. Ship.
2. Research the 114 in batches by region; write sourced seasons. Ship as
batches land.
3. Estimator, its check against sourced seasons, the review list.
4. Write estimates, change the site wording and filters. Ship.
## Settled after a builder's read (designer's calls)
- **Who is primary is a judgement, not a lookup.** `publisher` is free text
with 92 distinct values, so step 1 is a proposed table of all 109, read by
a person. The rule follows the schema's existing idea of the acceptable
page: the managing body, or for a route its author.
- **Most seasons will be `primary` or `source`.** Only 6 of the 109 have more
than one source naming the season today. `sources` is for the few with no
primary page and several agreeing ones.
- **Validator.** `season_basis` and `season_method` are provenance, not
facts: they are exempt from the rule that every hike field is named in a
source's `facts`, as `checked` is. `season` and `months` must appear
together. An estimate's only source naming `season` and `months` is the
climate data; any other source naming them makes the basis wrong.
- **Shipping step 1.** `season_basis` is required wherever `season` is
present from the first ship, covering the 109.
- **Site code.** Rows, the filter bar, `standing.season_cell` and
`reference.py` assume seasons are partial and tests pin that wording; those
tests are rewritten, not patched. They change only in the last step, when
coverage is complete.
## Left to the builder
- The climate source, after trying the candidates on a dozen trails.
- Sampling density, the exact snow and heat measures, and the fit.
- Wording of notes within the vocabulary rules and the banned-word test.
- Tests: every record has season, months and basis; basis fits the sources;
estimates have a method; no page says a season is missing.
## Open risks
- Climate normals are coarse in steep terrain. The fit against sourced
seasons is the guard, and it may show the method is too weak for some
regions.
- 42 of the 114 have no track and 95 have no high point, so some estimates
rest on a start point or less. Those are the least trustworthy and are
flagged for hand review.
- Research may find seasons for most of the 114, leaving few estimates. That
is the good outcome.