Merge main into places-ship-2
This commit is contained in:
commit
1fbcfd5021
126 files changed
+2076
-9
No files matched your search
+6
-4
@@ -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. 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. Wording is ours: nothing is copied from a source.
|
||||
|
||||
| Field | Type | Meaning | Example |
|
||||
| --- | --- | --- | --- |
|
||||
@@ -138,8 +138,10 @@ Optional: a record without `[hike]` is valid. The table holds the facts a hiker
|
||||
| `start_lonlat`, `end_lonlat` | array of two numbers, where present | The position of the place named in `start` (or `end`), as a gazetteer or the trail's holder gives it: longitude and latitude in decimal degrees, WGS84, longitude first, rounded to three decimals (about 100 m). It is the place, not a surveyed trailhead, and it is there so that a trail with no track can still be put on a map. A loop has `start_lonlat` only. The place name in `start` (or `end`) may be left out when the record has a track and the numbers are the ends of that track, with the track named as the source. The source of the numbers must allow republication and is named in `[[hike.source]]`, like every other fact. Where both are given, the straight distance between the two points cannot be longer than `length_km`, because a trail cannot be shorter than the distance between its ends; the validator checks this with a 2 per cent tolerance. | `[-83.927, 34.627]` |
|
||||
| `shape` | string | `"point-to-point"`, `"loop"` or `"network"`. | `"point-to-point"` |
|
||||
| `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. | `"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. | `[7, 8, 9]` |
|
||||
| `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"`, and refused otherwise. One sentence naming the method and its inputs: the dataset, the period, the points used and the rule version. | `"Estimated from 1991-2020 climate normals at 5 track points (rule version 1)."` |
|
||||
| `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"]` |
|
||||
@@ -247,7 +249,7 @@ Settling a conflict:
|
||||
- fails when an entry that was already there was changed or removed;
|
||||
- prints, for each changed fact, the earlier entries about the same field, and prints `!!` lines where an earlier entry was `declined`, or was asked for by someone other than the dataset's own check. That is where two requests may conflict: read the entry before you change the field again.
|
||||
|
||||
**Facts**, which need an entry when they change: `name`, `common_name`, `short_name`, `short_name_url`, `country`, `regions`, `length_km`, `length_note`, `system_km`, `system_note`, `built_km`, `kind`, `tier`, `designation`, `inclusion`; everything in `[source]` except the fields below, which includes the track's source, licence and permission; `osm.relation`; everything in `[shield]` except `note` (the logo); everything in `[hike]` except `summary`, `checked` and the sources (the ends, official page, days, season, terrain, travel, high point, permit, unfinished and caution); `[route]` except `note` (the author and the track policy); `[[guide]]` except the price; `[[place]]` except the measured `km`. A replaced track file counts as a change to `source.line_file`.
|
||||
**Facts**, which need an entry when they change: `name`, `common_name`, `short_name`, `short_name_url`, `country`, `regions`, `length_km`, `length_note`, `system_km`, `system_note`, `built_km`, `kind`, `tier`, `designation`, `inclusion`; everything in `[source]` except the fields below, which includes the track's source, licence and permission; `osm.relation`; everything in `[shield]` except `note` (the logo); everything in `[hike]` except `summary`, `checked` and the sources (the ends, official page, days, season, months, season_basis, season_method, terrain, travel, high point, permit, unfinished and caution); `[route]` except `note` (the author and the track policy); `[[guide]]` except the price; `[[place]]` except the measured `km`. A replaced track file counts as a change to `source.line_file`.
|
||||
|
||||
**Not facts**, which need none: `[[history]]` itself; all of `[verification]`, which the tools refresh; `source.source_checked`, `source.discovery`, `source.format`, `source.crs`, `source.mainline` and `source.length_gap_note`; `hike.summary` (our wording), `hike.checked` and `[[hike.source]]`; `guide.price` and `guide.price_checked`; the notes `osm.note`, `shield.note` and `route.note`; `[[link]]`; `wave` and `wave_note`; `places_checked`, `places_track` and the measured `place.km`, which `tools/place_trails.py` refreshes. A field that is in neither list is a fact. The lists are `FACTS_TEXT` and `NOT_FACTS` in `tools/trail_history.py`, and `python3 tools/check_history.py --facts` prints them.
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
# Season research brief
|
||||
|
||||
For a worker with nothing else to go on. You do this task yourself and start no subagents. Read `.claude/skills/refresh-trails/rules.md` and `.claude/skills/refresh-trails/proposal-format.md` first; this brief adds to them and does not replace them. The audit will use the same brief when it looks for a source for a season that is still an estimate.
|
||||
|
||||
## Goal
|
||||
|
||||
Every trail needs a season: when it is normally hiked. You are given a batch file of trail ids, one per line. For each trail, find a page that states when the trail is normally hiked, and stage what you found. Where no acceptable page states one, say so and leave the trail alone: it will be estimated from climate later, and an estimate is the last resort.
|
||||
|
||||
## Rules that matter here
|
||||
|
||||
- Acceptable pages: the trail's holder or a government page first; otherwise an established hiking reference, a guidebook publisher's page, or an association list. Not AllTrails, forums, social media or wikis.
|
||||
- Never guess. A season found on no acceptable page is not written.
|
||||
- Nothing is copied. The season phrase is in our words; the `quote` is evidence and stays at 25 words or fewer.
|
||||
- Never kill a process by name or pattern. Kill only a process id you started yourself.
|
||||
- Use a plain User-Agent. A site that refuses automated reads is not worked around: record the refusal and use another page.
|
||||
- You never edit the repository. You stage files in `<staging>/staged/<worker>/`, where `<staging>` is the directory you are given and `<worker>` is the batch name (`season-03`).
|
||||
|
||||
## What to stage for each trail
|
||||
|
||||
One `[[proposal]]` of kind `change` in `<staging>/staged/<worker>/<id>/proposal.toml`, with:
|
||||
|
||||
- `[[proposal.edit]]` for `hike.season`: a short phrase in our words ("June to September", "Mid-July to early September"). Leave `old` out, because the field is absent.
|
||||
- `[[proposal.edit]]` for `hike.months`: an array of month numbers. A month counts when about half of it or more is in season. For a trail walked in more than one window, list every month of every window.
|
||||
- `[[proposal.edit]]` for `hike.season_basis`: see below.
|
||||
- `[[proposal.edit]]` for `hike.checked`: the date the page was read. Replace the current value, with `old` copied from the record.
|
||||
- A `[[proposal.append]]` to `hike.source`: the page `url`, its `publisher`, and `facts = ["season", "months"]`.
|
||||
- On every edit and append, the page's own address as `page` and a quote of at most 25 words as `quote`.
|
||||
- A `[proposal.history]` with `change` (a plain sentence saying what was added), `basis`, `basis_url`, `asked_by = "the dataset's own check"` and `fields = ["hike.season", "hike.months", "hike.season_basis"]`.
|
||||
|
||||
Strings and arrays stay on one line. The report goes in `<staging>/staged/<worker>/report.csv` with one row for every id you were given.
|
||||
|
||||
## Basis
|
||||
|
||||
- `primary`: the page is the managing body's, the trail's own association's, or for a route its author's. A season in the author's guidebook, cited through the publisher's catalogue page, is the author's.
|
||||
- `sources`: no such page, but two or more pages from different publishers agree.
|
||||
- `source`: no such page, and one other acceptable page.
|
||||
|
||||
Trip reports count only when they speak of the usual season and never of one trip, and then only as `source`. Where pages disagree, the managing body wins, and the phrase may carry the nuance ("northbound starts late February to April"). Opening dates of a hut or a park are not a walking season unless they set it.
|
||||
|
||||
## When nothing is found
|
||||
|
||||
A trail with no acceptable page gets a `report.csv` row with outcome `not-found`, every page and search tried in `pages` (at least three places), and one plain sentence in `remark`. It stays for estimating. A quiet first pass gets a second worker of another model family before the trail is left to the estimate.
|
||||
|
||||
## What a reviewer checks
|
||||
|
||||
Every trail, not a sample. The reviewer is of a different model family from the researcher, and writes `review/<name>.csv` as the refresh pipeline does.
|
||||
|
||||
1. The page opens and says the quoted thing.
|
||||
2. The phrase is in our words.
|
||||
3. The months follow the phrase and the half-month rule.
|
||||
4. The basis fits the publisher (managing body or not) and the number of different publishers.
|
||||
5. The page is about this trail and not a section of it or one year's event.
|
||||
6. Where pages disagree, the managing body was followed.
|
||||
7. No hut or park opening dates stand in for a walking season unless they set it.
|
||||
8. The `hike.source` entry names `season` and `months`.
|
||||
|
||||
## Replacing an estimate
|
||||
|
||||
Used by the audit when a source turns up for a season marked `estimate`. It is a hand edit, because `refresh.py apply` cannot delete a source block. In order:
|
||||
|
||||
1. Set `season`, `months` and `season_basis` to the page's.
|
||||
2. Delete `season_method`.
|
||||
3. Delete the climate `[[hike.source]]` block.
|
||||
4. Add the page's source block, with `facts = ["season", "months"]`.
|
||||
5. Append a `[[history]]` entry whose `fields` name `hike.season`, `hike.months`, `hike.season_basis` and `hike.season_method`.
|
||||
6. Run `python3 tools/validate.py` and `python3 tools/check_history.py --base main`.
|
||||
Reference in new issue
Block a user