Experimental · not an official MTA or NYC Subway product
Semantic Works: NYC Subway Live: Episode 1: The Lines and Stations
October 2026

NYC Subway Live:
Episode 1: The Lines and Stations

New York City Subway: a grid of coloured line circles with letters and numbers

From a spoken idea to a working app with live alerts, a rewindable history and station art, built by Pavel and Claude in about an hour and a quarter.

Dr. Pavel Simakov
About the author
Dr. Pavel Simakov Managing Partner, Semantic Works LLC linkedin.com/in/pavelsimakov

The source for this episode is on GitHub: Semantic-Works-LLC/semantic-works-public

Before the story

Play with it right away

The finished app runs on the next slide, inside this presentation, replaying an afternoon of recorded MTA alerts. Nothing to install, nothing to configure.

Play with it live View the source code on GitHub

You can also see the source code of everything presented here, and how the application runs.

Press ▶ below to play with it. After that, ▶ continues with the story.

What you are about to experience is a recording, replayed live.

The app normally reads the MTA's feeds through a small server of its own. Here it replays the 200 alerts it recorded on 12 October 2026, from 10:42 to 14:56 New York time, and the clock stands at the end of that afternoon. Close this window, then interact with it:

  • Click a station or a line to see its alerts, its facts and its art.
  • Drag the timeline handles to wind the clock back and see what arrived when.
  • Zoom with the buttons or the mouse wheel, and drag the map to move it.

To see it live, run it yourself. When you are done, press ▶ below to see how it was built.

Close Run it yourself View the source code on GitHub

0:00 · Turn 1

It started with one spoken paragraph

I've heard that the New York transit authority publishes live updates about closures and similar events. I'd like an HTML page … that draws a map of the New York subway with the stations on it, periodically fetches the updates … and shows those events live on the map. … Keep the history so I can rewind the clock back and forward to the present moment.Pasha, lightly trimmed

Before writing anything, Claude checked what the MTA actually offers:

Everything went into a folder of its own, apart from the Cyber Kitchen episodes.

0:04 · Turn 1

First, we built the page and its server

The first version had all its parts in place:

On its first run the server could not reach the MTA, because this Mac's Python had no list of trusted certificates, and the map area came out empty. We fixed both a few minutes later, keeping certificate checks switched on.

First load: the page layout with an empty map and a certificate error in the status line
The first screen, before the certificate fix.
0:05 · Turn 1

Five minutes in, we had a live, zoomable map

With the fixes in, everything we had built showed up at once:

The feed carried 189 alerts, of which 8 were in effect. Most are planned work for later dates.

First working version of the map with eight alerts
The first working version.
0:05 · Turn 1

We built a history you can rewind

The server does not keep a copy of every fetch. It keeps what changed: which alerts arrived and which were removed. The page replays those changes up to any moment, so the slider can take the map back in time.

With only a few minutes of real history, we tested it by placing one invented alert ten minutes in the past, in the browser only, and stepping back to it.

The map showed that one alert and "11 min ago". A reload cleared it.

The map rewound eleven minutes, showing a single test alert
Rewound 11 minutes, showing the one test alert.
0:11 – 0:16 · Turns 2 – 4

We worked out what the data can tell us

Before building further, we downloaded the MTA's train feeds and decoded them to see what they hold.

QuestionAnswerWhat the live feeds showed
Which station has the problem?PartlyPlanned work lists its stations. Delays usually name only the line; the place is in the sentence.
Where is each train?Yes, by station164 trains on the numbered lines in one sample, each "stopped at" or "in transit to" a station. No GPS.
When will it arrive?YesPredicted times for up to 20 stops ahead per train.
How fast are things moving?Not directlyNo speed field. It can be worked out from time between stations.

Train history cannot be downloaded later, because the MTA publishes only the present moment. So we started recording straight away, before drawing any of it.

0:16 – 0:22 · Turns 4 – 5

We built a recorder for everything the MTA publishes

One folder per feed under data/, each update a file named by its time.

FolderWhatHow often
alerts/The change log the page replaysChecked every 30 seconds
trains/Positions and predicted arrivals, all eight feeds, exactly as receivedEvery 15 minutes, about 13 MB a day
elevator-…/Elevator and escalator outagesEvery 30 seconds, saved when changed
art/, stations/, paths/ and 18 moreThe MTA's slow-changing datasets and the schedule, 220 MBOn demand

We set trains to every 15 minutes to keep the recordings small, and left out two ridership datasets of 46 and 83 million rows.

0:24 · Turn 5

We added station art, as a carousel

The MTA's Permanent Art Catalog lists 309 artworks in subway stations. We put them on the map.

A card over the map showing artwork two of seven at Times Sq-42 St
The art carousel in its first form, as a card on the map.
0:26 – 0:29 · Turns 5 – 6

We moved the details into a panel on the right

As there was more to show about each station, we gave it a proper home: a panel that slides in and out, with two tabs.

A side panel with Events and Selection tabs showing a station's details
The Selection tab for a station.
0:30 – 0:33 · Turns 6 – 8

We worked on colour, and made lines selectable

Lines are easiest to click after zooming in, when the stations no longer cover them.

Close view of Manhattan with stations filled in their line colours
Stations in their line colours.
0:37 · Turn 11

We repaired the art catalog's garbled text

Dimitri GerakarisÕs Woodside Continuum … Ã’The challenge and opportunity of the Woodside station is in its relationship to the past and to the future,ÓAs the MTA's file has it

253 of the catalog's 394 entries arrive like this. The text was written in the old Mac character set, then misread twice on its way to publication, so one apostrophe arrives as two unrelated characters.

We added a step that reverses both misreadings:

Dimitri Gerakaris’s Woodside Continuum … “The challenge and opportunity of the Woodside station is in its relationship to the past and to the future,”After the repair

95 characters had already been lost at the source, so for those we put back an apostrophe or quotation mark by position, which is a guess. The downloaded file is kept exactly as published.

0:44 – 0:53 · Turns 12 – 19

We built up the timeline in three steps

Timeline along the bottom with bold clickable marks
1. Bold, clickable marks for each change, and a menu for how much time to show.
Timeline moved to the top of the Events tab
2. A place at the top of the Events tab, which gave the map the full height.
Timeline with two handles selecting a range
3. Two handles: the list shows what arrived between them.
0:58 – 1:12 · Turns 22 – 30

We tuned how a line with an alert stands out

A line with an alert, or the line you selected, has a soft outline that pulses in a lighter shade of the line's own colour. We got there in steps:

  1. Moving dashes along the line. They ran one way, which suggested a direction the data does not have, so we took the movement out.
  2. A pulsing outline in the alert's colour, such as orange around a blue line.
  3. The line itself brightening, first with a glow, then slightly wider at the peak, then brightness only.
  4. An outline again, in a lighter shade of the line's own colour, a third of the way to white. This is the one we kept.

Along the way we fixed a real fault: every 5-second refresh was redrawing the pulsing shapes, which restarted each pulse and made the map jitter. They are now redrawn only when something changes.

1:14 · Finished

What we ended up with: events

With the Events tab open you can see what is happening and when it started.

The finished page with the Events tab open
The Events tab, live.
1:14 · Finished

What we ended up with: selection

Selection tab showing Times Sq-42 St with station facts and art
Click a station: its alerts, facts from the MTA station list, and its art.
Selection tab showing the A line with an alert, description and stations
Click a line: its alerts, the MTA's description, and every station on it.
The result

The whole NYC subway, live, on one page.

It's all done!!! See what is wrong right now, wind the clock back to see how it got that way, and click anything to learn more.

LiveEvery delay, closure and service change the MTA publishes, on the map within 30 seconds.
RewindDrag the timeline back to any recorded moment, or pick a range and see exactly what arrived in it.
Every stationClick one of 496 stations for its alerts, its facts and the artwork installed there.
Every lineClick one of 29 lines for its alerts, where it runs and every stop along it.
Yours to keepIt records as it runs: alerts, train positions and elevator outages, saved on your own machine.
No sign-upNo account, no API key, no libraries. One Python file and one web page.
The finished map with live alerts and the events panel

You can run it yourself in a minute, with nothing to install but Python.

0:00 – 1:19 · The whole conversation

What it took in tokens

Counted from the session's own log, up to the moment this slide was added: 37.1 million tokens across 155 requests to the model, all Claude Opus 5.5.

KindTokensWhat it is
Re-read from cache36,649,630The conversation so far, read again on every request. This is 98.7% of the total and is billed at a small fraction of the normal rate.
New input311,320Text entering the conversation for the first time: Pavel's messages, tool results, files and screenshots.
Output185,116Everything Claude wrote: answers, code, commands and its working notes.
Total37,146,066

The total is large because of how a long conversation works, not because much was written. Each of the 155 requests re-reads everything before it, so the same text is counted again and again: on average about 236,000 tokens of history per request. Not included: the requests made after this count.

Other statistics

31turns of conversation
29 / 496lines and stations drawn
21MTA datasets downloaded
0libraries, keys or accounts
If bought as API calls, with no subscription

What that would cost in dollars

About $13.50 on Claude Opus 5.5, the model that ran the session. The same token counts priced on other models:

ModelRough costNotes
Claude Opus 5.5about $13.50What we used: $7.33 for cache re-reads, $2.49 for new input, $3.70 for output.
Claude Sonnet 5.5about $10.40Its cache-read price is the same as Opus, so the saving is small.
Gemini 3.1 Proabout $19Most requests were over 200,000 tokens, where Gemini doubles its rates.
Gemini 3.8 Flashabout $4At its price through December 2026; it doubles in January 2027.

Caching is what keeps this small. With no caching, every re-read would be billed as fresh input: about $152 on Opus 5.5 and about $138 on Gemini 3.1 Pro.

Open

What is not done

The conversation that built the app, with Pavel's words as spoken, is in TRANSCRIPT.md.

Not decided

Potential upcoming episodes

Episode 1 looked at the subway from the outside: what is there and what is happening. Two more viewpoints have been talked about. Neither is settled.

EpisodeViewpointWhat it could doWhat it would need
2The riderTrains on the map. Pick home and work, then see the best route right now, the next trains, when to leave, and which alerts or elevator outages are in the way.The recorded train feeds decoded and read live, and a route finder over the schedule.
3The operatorWhat someone at the MTA could learn from the data: where and when things go wrong, how long incidents last, how many riders they touch, and where to put people. Or a live desk for responding to incidents as they arrive.Weeks of recorded history, and invented staffing numbers, since none are published.
Thank you for your interest

Want to see more?

There is more from Semantic Works to explore.

See our public projects

Dr. Pavel Simakov
About the author
Dr. Pavel Simakov Managing Partner, Semantic Works LLC linkedin.com/in/pavelsimakov

Happy vibe coding with LLM AI!