Skip to content

Commit d723544

Browse files
committed
Updated vignette
1 parent a7bb656 commit d723544

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

vignettes/finding-stops.Rmd

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,18 +199,25 @@ tm_cr_place_id("CR-Fairmount", "Fairmount")
199199

200200
### Using these in API calls
201201

202-
```{r cr-api}
203-
# Headways at Fairmount station, outbound
204-
tm_headways("2024-01-15",
205-
stop = tm_cr_stop_id("CR-Fairmount", "Fairmount", "outbound")
202+
CR stops work with `tm_headways()` and `tm_travel_times()`. The key is to pass
203+
stop IDs whose **direction matches the direction of travel**. For a trip heading
204+
toward South Station (inbound, direction 1), use `"inbound"` stop IDs for both
205+
`from_stop` and `to_stop`.
206+
207+
Note: South Station is the inbound terminus, so it has no inbound stop IDs —
208+
you cannot use it as a `to_stop` for inbound travel times.
209+
210+
```{r cr-api, eval = FALSE}
211+
# Headways at Fairmount, inbound trains (toward South Station)
212+
fairmount_headways = tm_headways("2026-06-18",
213+
stop = tm_cr_stop_id("CR-Fairmount", "Fairmount", "inbound")
206214
)
207215
208-
# Aggregate travel time, Fairmount → South Station (pass all platform stop IDs)
209-
tm_aggregate_travel_times(
210-
from_stop = tm_cr_stop_id("CR-Fairmount", "Fairmount", "outbound"),
211-
to_stop = tm_cr_stop_id("CR-Fairmount", "South Station", "outbound"),
212-
start_date = "2024-01-01",
213-
end_date = "2024-01-31"
216+
# Travel time, Fairmount → Blue Hill Avenue, inbound
217+
# Both stops use "inbound" because the train is traveling toward South Station
218+
fairmount_2_bha_tt = tm_travel_times("2026-06-18",
219+
from_stop = tm_cr_stop_id("CR-Fairmount", "Fairmount", "inbound"),
220+
to_stop = tm_cr_stop_id("CR-Fairmount", "Blue Hill Avenue", "inbound")
214221
)
215222
```
216223

0 commit comments

Comments
 (0)