diff --git a/AGENTS.md b/AGENTS.md index 63f8a35..ee4f1bb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -90,7 +90,7 @@ In [docs/decisions.md](docs/decisions.md): - A path is walked once without drawing before it is walked for real - A country's postal codes and streets are siblings under its locality - A locale package imports its country's geo package, and its `Modules()` returns both -- The default embed holds every Swedish postort the import can place, a tenth of the US places owning a ZCTA drawn by population, and a tenth of each place's streets, at least ten +- The default embed holds every Swedish postort the import can place, a tenth of the US places that are a postal code's main town drawn by population, and a tenth of each place's streets, at least ten - A locale's `address` binds its country's record once and prints it whole - A postort's kommun comes from its name, its tätort or its codes, never from distance - A highway designation is not a street, and a US postal code belongs to the place holding most of its land inside places diff --git a/data_test.go b/data_test.go index f020e78..49e2378 100644 --- a/data_test.go +++ b/data_test.go @@ -392,6 +392,9 @@ func TestShippedPlacesSpreadAddresses(t *testing.T) { } header, _, _ := strings.Cut(geoTSV(t, "US", "locality"), "\n") population := slices.Index(strings.Split(header, "\t"), "population") + if population < 0 { + t.Fatal("geo.US locality.tsv has no population column") + } for _, r := range geoRows(t, "US", "locality") { n, err := strconv.Atoi(r[population]) if err != nil { diff --git a/docs/decisions.md b/docs/decisions.md index ae8bccb..f47fc04 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -603,12 +603,13 @@ providing `geo.SE`'s paths, and without one `sv_SE.address` fails at first reach `FS` works against goal 6.2. Every package exports `Modules()`, so one spelling loads any of them; a data package imports only the packages it reads. -## The default embed holds every Swedish postort the import can place, a tenth of the US places owning a ZCTA drawn by population, and a tenth of each place's streets, at least ten +## The default embed holds every Swedish postort the import can place, a tenth of the US places that are a postal code's main town drawn by population, and a tenth of each place's streets, at least ten 2026-10-11, Lilleman auf Larv. Goals 2 and 14: ten streets a place crowded 500 Stockholm customers onto ten streets, and US places of 25,000 or more left out every -town and village. `geo-us.py` draws among the places owning a ZCTA, since a place owning -none can carry no postal code, with Efraimidis and Spirakis's weighted sampling. Each +town and village. `geo-us.py` draws among the places that are some ZCTA's main town, the +place holding most of its land inside places, since any other place can carry no postal +code, with Efraimidis and Spirakis's weighted sampling. Each place's random number is seeded by its GEOID, so a rerun on the same sources draws the same places, and a place added to or dropped from the sources moves only the places near the cut. The draw keeps 968 of the 1,584 places of 25,000 or more and 310 of those of