Skip to content

Seed the region tree at counties, and let locals grow it - #25

Merged
matkam merged 3 commits into
mainfrom
community-first-regions
Oct 27, 2026
Merged

matkam merged 3 commits into
mainfrom
community-first-regions

Conversation

@matkam

@matkam matkam commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

The tree now stops at counties. Finer areas come from the operators who run each mesh, so we do less guessing.

Why:

  • Under 0.5% of packets carry a scope, and almost all of those are #slo.
  • A town-level scope only works once the repeaters around it carry it too, so one guessed from outside mostly sits empty.
  • County lines need no guesswork.
  • Adding a level later breaks nothing, because every node keeps the parent name.

The rule

  • Default to counties.
  • Communities override county lines where they clearly cross them: Lake Tahoe, Yuba-Sutter, Eastern Sierra. Palo Alto and Stanford count as Peninsula, though Santa Clara County holds them; search and descriptions follow that, while the map and location detection still follow the county shape.
  • Groupings between region and county stay only where they're community names: North Bay, East Bay, Gold Country.
  • Anything finer is proposed by the local operators. SLO County's four local areas are the first branch grown that way and stay as drawn.
  • A code names the whole area it covers, not one town in it.

Result: 158 places → 59

Region Before After
North California 23 towns 15 counties
Sacramento Foothills 11 5: Sacramento, Yolo, Placer, Yuba-Sutter, Nevada
Sierra Nevada 12 7: Gold Country's 5 counties, Lake Tahoe, Eastern Sierra
Bay Area 29 9: SF; North Bay (Marin, Sonoma, Napa, Solano); East Bay (Contra Costa, Alameda); Peninsula; South Bay
Central Coast 12 7: Santa Cruz, Monterey, San Benito, and SLO with its 4 local areas
Central Valley 22 8 counties
Southern California 49 8 counties

This also resolves the earlier open questions:

  • El Dorado Hills is part of El Dorado County.
  • The too-broad Coalinga and Tehachapi areas are now plain counties.
  • The duplicate southbay code is gone.

Every place now has its own county shape on the map.

Every retired code and where it went (147 retired, 25 county codes added)

Codes in main that no longer exist, under the place that now covers them. ¹ marks an old grouping that spanned more than one county and has no single replacement.

Now part of Retired codes
delnorte crescentcity
humboldt eureka, garberville, klamathtrinity
trinity weaverville
mendocino ukiah, fortbragg
lakecounty clearlake
siskiyou yreka, mountshasta, tulelake
modoc alturas
shasta redding, burney
lassen susanville
butte chico, oroville, paradise
glenn willows
sacramento citrusheights, folsom, elkgrove
yolo westsac, davis, woodland
placer southplacer, auburn
nevadacounty grassvalley
eldorado placerville, edh
tuolumne sonora
tahoe truckee, tahoecity, southlaketahoe
eastsierra mammoth, bridgeport, bishop, lonepine, markleeville
sf eastsf, westsf
marin sanrafael, millvalley, pointreyes
sonoma santarosa, petaluma, healdsburg, westsonoma
napa sthelena
solano fairfield, vallejo
contracosta westcontracosta, walnutcreek, sanramon, eastcontracosta
alameda oakland, hayward, fremont, livermore
peninsula northpeninsula, sanmateo, redwoodcity, halfmoonbay
southbay sanjose, paloalto, sunnyvale, cupertino, gilroy
santacruz, monterey montereybay¹
santacruz scottsvalley, watsonville
monterey salinas, king, bigsur
sanbenito hollister
sanjoaquin, stanislaus cvnorth¹
sanjoaquin stockton, lodi, tracy
stanislaus modesto, turlock
merced, madera, fresno cvmid¹
merced losbanos
madera oakhurst
fresno sanger, coalinga
kingscounty, tulare, kern cvsouth¹
kingscounty hanford
tulare visalia, porterville, threerivers
kern bakersfield, delano, lakeisabella, tehachapi, ridgecrest
santabarbara southcoast, santaynez, lompocvalley, santamaria, cuyama
ventura oxnardplain, santaclarariver, ojaivalley, conejovalley, simivalley
losangeles labasin, westside, sfv, sgv, pomonavalley, harbor, gateway, santamonicamtns, santaclarita, antelopevalley, catalina
orangecounty ocnorth, occentral, occoast, ocsouth, occanyon
sanbernardino cucamonga, sbvalley, sbmountains, victorvalley, centralmojave, morongobasin, coloradoriver
riverside westernriverside, perrisvalley, temeculavalley, sanjacintovalley, sanjacintomountains, coachellavalley, paloverde
imperial imperialvalley, northimperial, imperialborder, lowercolorado
sandiego sdmetro, sdnorthcoast, sdnorthinland, sdeast, sdsouth, sdbackcountry, borregovalley

paloalto was Palo Alto / Mountain View. Palo Alto and Stanford are now searched under peninsula; Mountain View and Los Altos stay southbay.

Code changes

  • Location detection. It used to match a repeater to one point per place, within 25 km. That fails for a county: Ridgecrest is 150 km from Kern County's point. A position inside a place's own boundary now matches it outright, labelled "inside". New test case added.
  • Map hover. A county that claims its own shape now lights itself; before, hover only looked at the shapes of the place's parents. Yuba-Sutter gains the outline it always wholly contained.

Docs

  • README, CONTRIBUTING, the YAML header and the page's explainer all describe the county seed.
  • CONTRIBUTING's "Adding a local area" becomes "Proposing a finer area": what to include, with SLO as the worked example.
  • The naming advice now says a code describes its whole area.
  • The tags example no longer uses socal, which is a region.

Earlier commit on this branch

This PR started as "Draw places around communities, and drop levels the mesh can't fill": merging SF, Napa, Tahoe and Imperial, and dropping Central Valley's middle level. The county seed supersedes most of that. That commit's community-first docs and its Gold Country and town-list fixes carry through.

Live codes affected

Of the 9 repeaters on CoreScope that report their regions, three carry codes retired here (data from 2026-10-24):

Repeater Retired codes Replace with
VLK-RS-LZ (near Merced) cvnorth, cvmid, modesto, turlock, losbanos stanislaus; merced and madera already on it
Bay Point Repeater eastcontracosta contracosta
Livermorium livermore alameda

Their region and group names (centralvalley, bayarea, eastbay) still work, so only traffic scoped to the retired codes stops reaching them. The other six use other naming schemes and are unaffected. As agreed, there are no redirects.

npm run validate passes, and npm test passes all 379 checks.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JnzkHA1RFo6quPWccYgztw

The tree now follows one rule, written into the YAML header, README and
CONTRIBUTING: a place is a community first. County and city lines usually
line up with communities and are the usual edge; where they don't, the
community wins. RF propagation and repeater density shape the edges, and
depth grows down — a place gains children only once it has the repeaters
to carry them, since adding a level later breaks nothing and removing one
leaves dead names on hardware.

Judged that way, against a week of CoreScope node data:

- San Francisco is one place. East SF and West SF were compass halves of
  one city and county, not communities. 46 repeaters, so a split could
  come back along neighbourhood lines.
- Napa City and Upvalley merge into Napa Valley: one valley, one county,
  13 repeaters.
- Lake Tahoe is one place, Truckee included: one basin, one community
  across three counties, no observer data to argue for more.
- Imperial County is one place. People say "the Imperial Valley" for the
  whole valley floor, and 4 repeaters could not carry four scopes.
- Central Valley loses its North / Mid / South Valley level. Those were
  compass thirds, "North Valley" means Chico and Redding to most people,
  and at 12, 33 and 34 repeaters none could carry a scope. The towns sit
  directly under the region, as North California's do, and the region
  claims all eight valley counties on the map.

Smaller fixes on the way: Gold Country no longer claims Sierra County
(its one place is under North California) and its blurb starts at
Placerville; Taft moves to Bakersfield; "Galt Junction" and "Dinuba
Junction" go, since Galt and Dinuba are already listed where they belong.
The README's counts, chain diagram and JSON sample were stale and now
match the data.

Retired codes: eastsf, westsf, sthelena, truckee, tahoecity,
southlaketahoe, imperialvalley, northimperial, imperialborder,
lowercolorado, cvnorth, cvmid, cvsouth. No redirects — scoped traffic is
under half a percent of packets, so links and nodes using them are few.

The detect test assumed every location choice is three levels deep; a
place with no children now sits one level up, so it checks any level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JnzkHA1RFo6quPWccYgztw
@github-actions

Copy link
Copy Markdown
Contributor

Preview: https://matkam.github.io/meshcore-settings/pr-25/

Served over HTTPS, so Web Serial and Web Bluetooth work — you can connect a
companion node and try the push panel against a real repeater. Updates on
every push to this branch and is deleted when the PR closes.


Generated by Claude Code

…g them

The tree now stops at counties. County lines need no guesswork, and a
town-level scope guessed from outside mostly sits empty: a scope only
works once the repeaters around you carry it too. Finer areas come from
the operators who run that mesh, through an issue or PR, and adding them
later breaks nothing because every node keeps the parent name.

158 places become 59, and every code now names the whole area it covers.
Groupings between region and county stay only where they are communities
people name: North Bay and East Bay, Gold Country. Communities still
override county lines where they cross them — Lake Tahoe, Yuba-Sutter,
the Eastern Sierra. SLO County keeps its four local areas, the first
branch grown the way the rest are meant to be.

That also settles the open questions from the last change: El Dorado
Hills is in El Dorado County, the too-broad Coalinga and Tehachapi areas
are plain counties now, and the duplicate southbay code is gone with LA's
local areas.

Location detection matched a repeater against one point per place within
25 km, which works for a town and fails for a county — Ridgecrest is 150
km from Kern County's point. A position inside a place's own boundary now
matches it outright, marked "inside".

The map's dot hover looked only at ancestors for the shape a place
stands on; a county that claims its own shape now lights itself.
Yuba-Sutter gains the outline it always wholly contained.

Docs follow: README, CONTRIBUTING, the YAML header and the page's own
explainer describe the county seed, CONTRIBUTING's "Adding a local area"
becomes "Proposing a finer area", the naming advice says a code describes
its whole area, and the tags example no longer uses socal, which is a
region. Tests move to county codes, and gain a Ridgecrest detection case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JnzkHA1RFo6quPWccYgztw
@matkam matkam changed the title Draw places around communities, and drop levels the mesh can't fill Seed the region tree at counties, and let locals grow it Oct 25, 2026
They're Midpeninsula by usage, next to Menlo Park and East Palo Alto, even
though the county line puts them in Santa Clara. Search and the blurbs now
follow the community; the map and location detection still follow the
county shape, as on the Tahoe side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JnzkHA1RFo6quPWccYgztw
@matkam
matkam merged commit 7ec4665 into main Oct 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant