Where a train would make sense in Puerto Rico
An open analysis of routes, costs, travel time and hurricanes, built on Census data for all 78 municipalities.
- Carolina → San Juan is the #1 commuter flow: 23,909 workers a day.
- Rail alone does not pay off (B/C 0.18); with policy, 0.73–1.43.
- Express buses first; rail only where buses fill up.
The coast and Hato Rey first; the rest only if the data asks for it
Interactive explorer (in Spanish): 10 sections with zoomable maps · tap a tab
—
La red recomendada
Línea gruesa = fase 1 o ya existe. Punteada = después, solo si la fase anterior cumple su meta.
Qué incluye la fase 1
| Componente | km | Inversión (M$, PR realista) | Pasajeros/día | Por qué |
|---|
Orden de operaciones: cada fase tiene una meta para seguir o parar
| Fase | Qué | Puerta para seguir |
|---|
—
A dónde va la gente a trabajar
Los 40 pares de pueblos con más trabajadores (Censo 2016–2020). Burbuja = población.
Quién entra a trabajar a San Juan
Los 15 pueblos que más trabajadores mandan a San Juan.
Lo que el tapón le añade al viaje a San Juan
Minutos en carro: punto = 7–8 am, raya = sin tráfico.
Dónde está el tapón
Color = horas perdidas al año · grosor = tráfico diario.
El tapón tiene dos picos al día
Horas de demora por hora, día laborable.
¿El modelo ve el tráfico real? Sí, ±12%
Modelo vs conteos oficiales 2023. Diagonal = acierto perfecto.
¿Los tiempos cuadran con el Censo?
Tiempo promedio al trabajo por pueblo: Censo 2020–2024 vs modelo. Gris = antes de ajustar · color = ajustado.
Qué tan lejos viaja la gente
Trabajadores por distancia al trabajo (0 km = su mismo pueblo).
Los 10 corredores con más horas perdidas
Los dos primeros ya tienen Tren Urbano.
Una red para cada meta
La mejor red para una sola meta
Cada mapa añade, desde Tren Urbano, el tramo que más sube esa meta por dólar.
Cada dólar extra compra menos
Escoge la medida.
Lo que gana y pierde cada meta
Fila = red hecha para una meta ($10 mil millones). Más oscuro = mejor.
El consenso: los tramos que escogen casi todas las metas
Grosor = de cuántas de las 9 metas sale.
Combinar metas y exigir requisitos
Combina objetivos con pesos
—
El impacto de cada requisito
Qué cambia al exigir cada requisito (red base de $10 mil millones).
Qué tendría que cambiar para que se pague
Lo que tiene que cambiar para que el tren se pague
Cada barra suma un cambio. Arriba de la línea (1.0), la sociedad recibe más de lo que paga.
Pasajeros por día en cada paso
La misma escalera, en pasajeros.
Lo que lo empeora
Si pasa cada riesgo, desde el caso de hoy.
Tarifa, energía y dinero
Lo que cuesta vs lo que entra, cada año
Fase 1 en operación, millones de dólares al año. Rojo = sale de caja · verde = entra a caja · contorno = valor para la gente que no entra a caja (tiempo, gasolina, choques).
—
De dónde viene el dinero y a dónde va
Grosor = millones de dólares. Pasa el cursor sobre una franja.
Cómo bajar el costo de operar a la mitad
Millones al año, fase 1. Cada barra quita un ahorro a la anterior. La luz es solo ~6% del costo: lo que más pesa es la gente y los km de tren.
Cobrar estacionamiento mueve más gente que bajar el pasaje
Fase 1. Si estacionar sigue barato, la mayoría sigue en carro aunque el tren sea gratis.
…pero el pasaje no paga la operación
Recaudo al año. Subirlo casi no cambia el hueco.
Lo que cuesta ir a trabajar cada mes
Viaje típico de 18 km, 21 días al mes.
El tren gasta menos de la mitad de la energía
GWh al año: tren vs la gasolina que reemplaza.
El dinero año por año (fase 1 completa, PR realista)
Construcción (federal vs local) y después el hueco anual de operación.
Quién paga
| Partida | M$ | Tipo |
|---|
Cómo cerrar el hueco sin subir el pasaje
M$ al año de cada herramienta vs el hueco (línea).
Tu viaje: carro contra tren contra bus
Escoge salida y destino. Puerta a puerta, hora pico.
Minutos puerta a puerta
Dólares al mes
—
¿Cuánto tiempo ahorra el tren, y cómo hacerlo más rápido?
Puerta a puerta en hora pico. Raya roja = carro en hora pico. Contorno gris = diseño base.
Por qué un tren rápido no sirve con paradas cerca
Velocidad promedio (con paradas) según la distancia entre estaciones. Puntos = tramos reales de la red.
Minutos entre estaciones
Arranque 0–30 mph en ~13 s, parada de 45 s (40 s en cercanías). Tren Urbano completo: el modelo da 30 min, como el real.
| Línea | De | A | millas | min | mph prom. |
|---|
Horas de vida que pierdes en el tapón, según el pueblo donde vives
Por conductor que trabaja en otro pueblo, al año, ajustado al tiempo real del Censo. Toca tu pueblo.
Los 15 pueblos donde cada conductor pierde más horas
Parte clara = lo que devolvería el tren con política.
Círculo = 10 min a pie (media milla), a escala. Color = gente que vive dentro (Censo 2020). Toca una estación.
Residentes a 10 minutos a pie
Personas que viven a 800 m (Censo 2020). En el aeropuerto, el contorno son viajeros de avión.
Todas las fichas de un vistazo
Barra: residentes a 800 m; la parte clara es el máximo posible si se cuentan todos los bloques que tocan el área. Toca una para verla en el mapa.
—
¿Cuántos días corre el tren después del evento?
% del servicio normal por día. Gris = clientes con luz (datos reales).
Las baterías nunca se vacían
Línea = carga · área = solar. Medio horario desde el día 3.
¿Cuánto compra cada diseño?
Días de tren ganados vs solo la red (evento escogido arriba).
¿Dónde le pega el mar a la línea?
Estimado con lo que pasó en María. Toca un tramo.
¿Tren o bus?
Mismo corredor, tres opciones. El bus lleva menos gente pero cuesta mucho menos.
Beneficio por cada dólar, por corredor
La línea punteada es 1.0.
Pasajeros por día
Inversión (millones)
¿Qué tan seguro es?
1,200 corridas por caso. "Con historial" suma lo que les pasó a proyectos parecidos: +42% de costo y −25% de pasajeros.
¿Cuánto devuelve cada dólar? Todas las corridas
Porcentaje de corridas en cada rango de beneficio-costo. A la derecha de la línea punteada (1.0) el proyecto se paga.
Pasajeros por día: rango probable
Barra: del percentil 10 al 90. Punto: mediana.
¿Qué incertidumbre pesa más?
Correlación de cada supuesto con el beneficio-costo del tren hoy (de −1 a 1).
La prueba: ¿este modelo promete de más, como pasó con Tren Urbano?
—
El historial de otros proyectos (clase de referencia)
Barra: del cuartil 25 al 75. Punto: mediana. Rombo: lo que uso en "con historial". Triángulo: lo que le pasó a Tren Urbano.
Cómo se compara con el mundo
Seis lecciones de 40 sistemas
Densidad contra pasajeros por km
Escalas logarítmicas. Tren Urbano resaltado.
Tarifa contra lo que cubren las tarifas
Tarifa base en dólares y % de la operación pagado por pasajeros.
Costo de construir por km
Millones USD por km de la línea más reciente reportada (escala logarítmica).
Pasajeros por km en 40 sistemas
Día laborable por km de ruta (escala logarítmica).
Red team y supuestos
Registro de hallazgos (v1 + v2)
| ID | Severidad | Especialista | Hallazgo | Qué cambia | Estado |
|---|
Reglas de decisión: paradas, transbordos, terminales, vías, tipo de obra
| Pregunta | Regla | Número que manda | Resultado para PR |
|---|
Supuestos del modelo v2
| Parámetro | Valor | De dónde sale |
|---|
An express bus pays off 4 times in 5; rail, 1 in 5
Model phase 1 (San Juan–Carolina and Bayamón–Dorado) · 1,200 simulations with historical overruns · 2026 USD
| Option | Investment (median) | Riders/day with package | Pays off as is | Pays off with package |
|---|---|---|---|---|
| Express bus (HOT lane) | $125 M | 12,671 | 1.8 % | 85 % |
| BRT (dedicated lane) | $633 M | 14,756 | 0.1 % | 58 % |
| Electric rail | $3,471 M | 33,447 | 0.0 % | 21 % |
Source: TRAINS PR model (Monte Carlo) · package = paid parking, $30 monthly pass and development next to stations
Money and costs
Annual cost = 30-year local debt ($378 M) + operations ($178 M). With 15/30-minute service, driverless trains and solar, operations could fall to ≈ $91 M.| Scenario | What it includes | Annual cost | Cash in | Value to people | B/C |
|---|---|---|---|---|---|
| Low | Fare only ($1.50) | $556 M | $9 M | $136 M | 0.18 |
| Base | + paid parking and a $30 monthly pass | $556 M | $29 M | $558 M | 0.73 |
| High | + congestion charge, station-area tax increment, development, tolls and solar | $547 M | $149 M | $1,091 M | 1.43 |
2026 USD
How I built it
- The problem: San Juan-area drivers lose 68 h a year in traffic (INRIX 2025), and Tren Urbano reached 24 % of its forecast. I wanted to see where rail makes sense and what it really costs.
- The data: Census commuting flows for all 78 municipalities, plus FTA, USDOT, NREL and NHC. Every source and its license is listed below.
- What the AI did: Claude wrote most of the code and found sources; I set the questions, the coastal line and the rules, and decided what gets published.
DetailsThe model, how I validated it, what failed and what comes next
The problem
- In Puerto Rico a driver loses about 50 hours a year in traffic; in Dorado, more than 100. Every few years someone proposes a train.
- The last time one was built, Tren Urbano, the forecast was 114,000 daily trips; in 2007 it carried 24 % of that, and in 2025 it carries about 21,000.
- I wanted to answer three questions with data rather than enthusiasm: where a train would make sense, what it would really cost, and what would have to change for it to pay off.
The data
- The core is the Census commuting-flows table (ACS 2016–2020): how many people live in each of the 78 municipalities and work in each other one.
- On top of that I added commute times from ACS 2020–2024, 2020 Census block population to count who lives within a 10-minute walk of each station, FHWA traffic volumes, real Tren Urbano costs and ridership from the FTA, the 2026 USDOT benefit-cost guidance, NREL's PR100 study for the price of solar power, and hurricane data from the NHC.
- Maps use USGS tiles, which are public domain, and OpenStreetMap. Every source is listed below with its license.
The model
- It has four parts, written in Python. A road network between municipalities with congestion: more cars, slower trips. A mode-choice model in which each person compares car against train on time, cost and parking.
- An optimizer that adds track one segment at a time according to the chosen objective: time saved, people connected, jobs, or cost per rider, among others.
- And a Monte Carlo simulation with 1,200 runs that mixes uncertainty in costs and ridership.
- Separately, I built a physical train model (acceleration, 45-second stops, curves) to compute door-to-door times, and a simulation of how power comes back after a hurricane.
Validation
- I did not trust my own forecasts. I calibrated car times against what people report in the ACS: in the metro area the model lands within about a minute.
- I ran the model on Tren Urbano as it exists, and it predicts fewer riders than it carries today, because it only counts people who leave the car for a trip between towns; I prefer that error to the opposite one.
- 42 times the estimate and carry fewer people than forecast. The hurricane simulation reproduces what happened: Tren Urbano was closed 86 days after Maria and the model gives 91.
What the AI did
- I worked with Claude, by Anthropic. Claude wrote most of the code (the Python model, the d3 charts and this site), searched for and summarized sources, and ran red-team reviews against the analysis itself.
- I chose the questions, proposed the El Morro–SJU coastal line, set the rules (US units, service from 6 am to 11 pm, treating the airport separately), challenged results that did not add up, and decided what gets published.
- The numbers come from the models, not from the AI's opinion: each one traces back to a data source and an assumption.
What failed
- Plenty. The first version overstated peak-hour delays in interior towns and had to be recalibrated.
- In the base design the train beat the car in only 5 of 12 test trips; that forced a redesign (faster trains, no transfer at Condado, feeder buses) until it won all 12.
- Two Old San Juan stations were misplaced at first. I could not get station-level ridership from ATI, so that part is estimated. Routes are drawn over coordinates, not exact track geometry.
- And the most important result is uncomfortable: rail alone does not pay off. It needs policy changes, and even with them it pays off in one simulation out of five.
What comes next
- Ask ATI and the Highway Authority for ridership by station and route to validate further, and bring these numbers to the FTA's public process.
Sources and licenses13 · Census data through ACS 2020–2024 · version of 2026-10-23
| Source | What I use | License | Commercial use? |
|---|---|---|---|
| US Census: ACS 2016–2020 (commuting flows), ACS 2020–2024, 2020 Census blocks | Commutes, travel times, population near stations | Public domain (US government) | Yes |
| FHWA, Highway Performance Monitoring System | Road volumes and capacity | Public domain | Yes |
| FTA: National Transit Database 2024 and Predicted and Actual Impacts of New Starts (2007) | Tren Urbano costs, ridership and forecast | Public domain | Yes |
| USDOT, Benefit-Cost Analysis Guidance 2026 | Value of time, crashes and emissions | Public domain | Yes |
| NREL, PR100 | Solar and battery costs | Public domain (DOE) | Yes |
| NOAA / National Hurricane Center | Hurricane tracks and damage | Public domain | Yes |
| Flyvbjerg et al. (2007); TRB / ACRP | Reference class for overruns and demand | Copyrighted; figures cited only | Citation |
| INRIX Global Traffic Scorecard | Traffic context | Proprietary; published figures cited only | Citation |
| LUMA, current tariff | Electricity price (33.86¢/kWh) | Public document | Citation |
| USGS The National Map (imagery and topo) | Explorer base maps | Public domain | Yes |
| OpenStreetMap | Explorer street map | ODbL data with attribution; OSMF tiles for light use only | Data yes; tiles: switch provider if traffic or ads grow |
| Natural Earth | Island outline | Public domain | Yes |
| d3.js · Barlow Condensed · IBM Plex | Charts and type | ISC · SIL Open Font License | Yes |
Notice: TRAINS PR is an independent analysis by an engineering student, not an official government study or an engineering service. The numbers are model estimates with explicit assumptions: use them to ask better questions, not as a final design.