Skip to content

Metro generator: agency-style names and colours for lines and stations - #38

Merged
dgoodenough merged 1 commit into
mainfrom
claude/vigilant-knuth-loxal2
Nov 12, 2026
Merged

dgoodenough merged 1 commit into
mainfrom
claude/vigilant-knuth-loxal2

Conversation

@dgoodenough

Copy link
Copy Markdown
Owner

This is phase 1 of Texas Transit's site parity review (study/site_parity.md). Until now the generator named each line after its two end centres' cross streets ("Pellicano / George Dieter - Nonap / Mark Twain BRT").

  • Line names and colours (metro/names.py; python -m metro names <id>, also run at the end of every generation):

    Line Name Colour
    Today's lines Agency name, without GTFS route numbers or capitals ("METRORail Red Line") Unchanged
    New metro lines Colour name in the order they were chosen ("Blue Line") Skips colours today's lines use
    New streetcars Colour name ("Teal Streetcar") Same as metro
    Regional rail Town at the outer end ("Conroe Line") Rail palette
    BRT The street it mostly runs on ("Broadway BRT"), or its two main streets, or its two ends BRT palette
  • Station names:

    • New stations go through dfwt's Namer, now with each metro's own gazetteer. The new gazetteer fetch stage (metro/overture.fetch_gazetteer) builds it from Overture:
      • landmarks in landmark categories whose names say what they are (Overture's categories alone are noisy)
      • macrohoods, and neighbourhoods that have a Wikidata item
      • cities and towns
    • The registry's anchors (airports, universities, medical centres) also count as landmarks.
    • Today's stations keep their names, without direction or platform suffixes.
  • Hand fixes: <METRO_HOME>/names/<id>/line_names.csv and station_renames.csv win over the generated names. Each run writes names.csv with every name and the reason for it.

  • dfwt/naming.Namer: now accepts other gazetteer files and extra landmarks. DFW's own names don't change.

Tests: 176 pass, including new NamesTests and DFW's test_station_names.


Generated by Claude Code

metro/names.py (python -m metro names <id>, and at the end of every generation run): today's lines keep their agency names, cleaned of GTFS route numbers and capitals; new metro and streetcar lines take colour names in order, skipping today's colours; regional rail is named for the town at its outer end; BRT for the street it runs on most, or its two main streets, or its two ends. New stations are named by dfwt's Namer with the metro's own gazetteer, a new fetch stage (metro/overture.fetch_gazetteer: Overture landmarks whose names say what they are, macrohoods and neighbourhoods with a Wikidata item, cities and towns) and the registry's anchors as landmarks. Hand fixes in <METRO_HOME>/names/<id>/ win. Writes names.csv with every name and why.

dfwt/naming.Namer takes other gazetteer files and extra landmarks (DFW's own names are unchanged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GsUvo7SNZomvEVjWUMuYvF
@dgoodenough
dgoodenough merged commit 33454b0 into main Nov 12, 2026
2 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.

2 participants