blahblahblah- / theweekendest

Real-time New York City subway service map
https://www.theweekendest.com
MIT License
85 stars 13 forks source link

Broadway via Bridge/Tunnel renders incorrectly? #2

Closed awonnacott closed 4 years ago

awonnacott commented 4 years ago

image image image

As shown here, uptown N trains are listed as running via the Montague St Tunnel, the bridge platforms at Canal St are shown receiving bidirectional service, the Broadway local platforms at Canal St are hown receiving uptown-only service, and no service is shown at the stations between Court St (Brooklyn) and City Hall.

When I checked the MTA website and subsequently refreshed theweekendest.com, I didn't find any such service change, so I suspect this issue was caused by a single Queens-bound N train being rerouted via the tunnel. Once that train passes City Hall, there would be no subsequent N service expected to run via tunnel and so no service would be (correctly) shown. If subsequent Queens-bound N trains were routed via the bridge, it would be correct to show bidirectional service at the bridge platforms. I don't have logs of subwaytime to investigate this issue to validate or falsify my hypothesis.

blahblahblah- commented 4 years ago

Thanks for brining this up! Unfortunately, this looks like a problem with inaccurate data coming from the MTA side. Canal St via Tunnel and Canal St via Bridge are coded as separate stations (R23 and Q01 respectively from http://web.mta.info/developers/data/nyct/subway/Stations.csv), and it looks like data from one rogue uptown N train must have reported it stopping at R23 instead of Q01.

The rendering logic for the map uses a path-finding algorithm to render lines on the map, and the only path available from Atlantic Av–Barclays Ctr to R23 is via the path through the Montague Tunnel. I'm not sure there's much we can do to safeguard these kind of erroneous data without hardcoding these edge cases.