Skip to content

feat(performance_manager): publish per-carriage occupancy in subway export - #801

Open
devinmatte wants to merge 2 commits into
mbta:mainfrom
transitmatters:feat/subway-carriage-occupancy
Open

devinmatte wants to merge 2 commits into
mbta:mainfrom
transitmatters:feat/subway-carriage-occupancy

Conversation

@devinmatte

Copy link
Copy Markdown

Asana Task: external contributor

What changes does this PR propose?

Adds per-carriage occupancy to subway-on-time-performance-v1

vehicle_consist       "1958|1959|1915|1914"
occupancy_status      "FEW_SEATS_AVAILABLE|STANDING_ROOM_ONLY|STANDING_ROOM_ONLY|STANDING_ROOM_ONLY"
occupancy_percentage  "8|21|15|25"

Sampled from the record that sets vp_stop_timestamp, so it describes the vehicle on arrival. Includes an RPM_VERSION bump.

How were these changes validated?

Unit tests in tests/performance_manager/test_l0_rt_vehicle_positions.py; I don't have access to anything else as an external contributor.

What questions should reviewers consider?

  1. Based on the code, this data exists in other datasets, just not public ones. Our other current path to getting this data is to listen to the SSE feed and record our own duplicated dataset. That would be substantially less reliable, so we'd prefer this data exist in the LAMP feeds. Is there a better way to access this information alongside the rest of the subway performance data?

@devinmatte
devinmatte marked this pull request as ready for review September 10, 2026 21:48
@devinmatte
devinmatte requested a review from a team as a code owner September 10, 2026 21:48
@runkelcorey

Copy link
Copy Markdown
Collaborator

Thanks @devinmatte! Actions show related unit tests are failing. Based on the logs, I'm guessing test data doesn't contain that field. Do you thin you can fix this?

@devinmatte

Copy link
Copy Markdown
Author

Hi @runkelcorey looks like data from 2023 and older fails because it doesn't have any occupancy data, along with the test data needing an update. Pushed a commit to fix it. I wasn't able to run those tests locally so didn't catch it.

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