Which carriage door, for which exit, for which station?
MARCOS helps you find the best carriage and door position for your metro exit. Don't waste time fighting through the crowds at platforms — know exactly where to stand for the fastest exit.
MARCOS is a simple web application, built on top of a crowdsourced, verified database, that tells you which carriage and door to use when traveling on a metro system, so you can exit at the most convenient point for your destination.
Simply select your metro system, line, departure station, and destination station, and MARCOS will show you the optimal carriage and door positions for each exit at your destination.
We welcome contributions! The easiest way to help is by adding station data for your local metro system.
All station data is stored in YAML files in the data/systems/ directory:
data/systems/
├── systems.yaml # List of all metro systems
├── london_underground/
│ ├── lines.yaml # Lines for this system
│ └── stations/
│ └── tottenham_court_road.yaml
└── nyc_subway/
├── lines.yaml
└── stations/
└── station_name.yaml
Each station is stored as a YAML file following this simple format. Here's the example from Tottenham Court Road:
station_name: Tottenham Court Road
status: dummy
platforms:
central:
eastbound:
door_side: right
exits:
northern: 4.2
oxford_street_east: 1.2
westbound:
northern:
southbound:
door_side: right
exits:
central: 1.3
street: 6.3
northbound:
door_side: right
exits:
central:eastbound: 1.3
street: 6.3station_name: The display name of the station (optional)status: Set to"dummy"for placeholder/test data (optional)platforms: A dictionary where each key is a line ID (must match an ID inlines.yaml)- Each line contains directions (e.g.,
eastbound,westbound,northbound,southbound,uptown,downtown) - Each direction can have:
door_side: Which side of the train the doors are on (leftorright)exits: A dictionary mapping exit names to carriage/door positions
- Each line contains directions (e.g.,
Values like 4.2 mean:
4= 4th carriage (counting from the front of the train)2= 2nd door (on that carriage)
So 4.2 means "4th carriage, 2nd door".
-
Find the station ID: Use a lowercase, underscore-separated version of the station name
- Example: "Tottenham Court Road" →
tottenham_court_road
- Example: "Tottenham Court Road" →
-
Create the YAML file:
- Location:
data/systems/[system_id]/stations/[station_id].yaml - Example:
data/systems/london_underground/stations/tottenham_court_road.yaml
- Location:
-
Add the basic structure:
station_name: Your Station Name platforms: line_id: direction: door_side: right exits:
-
Add exits for each direction: For each platform direction, add the exits with their carriage/door positions:
exits: exit_name: 4.2 another_exit: 1.1
-
Test locally: Run
npm run devand verify your station appears and works correctly -
Submit a Pull Request: Once you've added your station data, submit a PR to the repository!
To add exits to an existing station:
-
Open the station's YAML file in
data/systems/[system_id]/stations/[station_id].yaml -
Find the platform and direction you want to add exits to
-
Add exit entries under the
exits:section:platforms: central: eastbound: door_side: right exits: new_exit_name: 3.1 # 3rd carriage, 1st door another_exit: 5.2 # 5th carriage, 2nd door
-
Exit names should be lowercase with underscores (e.g.,
oxford_street_east,main_entrance) -
Carriage/door format: Always use
carriage.door(e.g.,4.2,1.1,6.3)
- Stand at different positions in the train and note which exit you're closest to
- Count carriages from the front of the train (the first carriage is
1) - Count doors on each carriage (the first door is
1) - Note the direction you're traveling (important for platforms on different sides)
- Mark as
status: dummyif you're unsure about the accuracy
station_name: Example Station
platforms:
central:
eastbound:
door_side: right
exits:
main_entrance: 2.1
side_exit: 4.2
westbound:
door_side: left
exits:
main_entrance: 3.1
side_exit: 5.2# Install dependencies
npm install
# Generate data module (reads YAML files)
npm run generate-data
# Start development server
npm run devOpen http://localhost:3000 to see the app.
data/systems/- Metro system data (YAML files)app/- Next.js applicationlib/data.ts- Data access functions (uses generated static data)scripts/generate-data.ts- Build script that converts YAML to TypeScript
This project is open source. Contributions welcome!
