Wednesday, November 21, 2012

Yelp Transit Maps

Yelp-rated routes in Boston. Click to embiggen.
I noticed a while ago—as did some other folks—that Yelp users have been, for some time, rating transit lines. I was intrigued. Here was really interesting data about how people felt about different transit lines, distilled in to a simple 1-to-5 rating. While not every line was ranked in Boston (my first search) there were plenty that were, and I compiled a list of routes, star-ratings and the number of Yelps.

In Boston, only some routes were rated, and they were, not surprisingly, centered in the more student- and hipster-centric part of the city. For instance, no bus line in Dorchester or Mattapan got Yelped, but most in Cambridge and Somerville have many reviews. I figured the best way to show these data was on a map, and after some machinations (especially in resorting the shapefile so the thinner lines would display on top of the thicker ones) I got the map above. It's pretty cool—click it to enlarge. (Here's the full MBTA system map if you're not familiar with the lines; I left off route numbers for clarity.)

But I realized that pretty cool wasn't cool enough. There was probably a much richer data set out there. Boston has about 750 Yelp reviews, 450 of those for rail lines. Was there city with a wired-in community, lots of bus and transit routes, and high transit ridership? Did I just describe San Francisco to a T? And, voila, there are nearly 2000 Yelp reviews of transit lines in San Francisco, at least one (and usually many more) for nearly every line Muni runs (see exceptions below). (Here's the Muni system map.)
Muni Lines, as reviewed by Yelp. Click to Embiggen.
San Francisco inset. Click to embiggen.
That. Is. Sexy. The N-Judah has nearly 200 reviews. Wow. And in case the downtown area is too clustered for you, there's an inset to the right.

I also realized that I had a pretty fun data set here, too. I went to a talk by Jarrett Walker the other day at MIT where he mentioned, amongst other things, that we should not focus on the technology used for transit, but whether if fulfills the mission of getting people from one place to another. In San Francisco, we have a jumble of buses, trolleybuses, streetcars and even cable cars and we have a pretty good way of quantifying whether they are accomplishing the job of transit. (In Boston, even though the B Line serves tens of thousands of passengers a day it manages a 1.36 Yelp rating—remarkable as the lowest possible rating is 1. None of its 34 raters give it a 4 or a 5. Still, it moves a lot of people marginally faster than they could walk.)

First, I averaged the ratings by technology type. Trolleybus route get more reviews than bus routes, probably because they are more heavily used. The average rating for these, however, is quite similar. (The average is a straight average of each line, the weighted average weighs more frequently-rated lines by the number of ratings). Cable cars and PCCs (F-Marked and Wharves) have higher ratings but many are likely by tourists. Light rail lines, however, are frequently rated, and given low ratings, significantly lower than the bus routes.

Vehicle typeRoutesAvg ReviewsAvg StarsWeighted Avg
Bus39223.032.77
Trolleybus12412.952.79
Cable Car3643.813.87
PCC11143.423.42
Light Rail5652.312.43

A forthcoming post will compare local and express bus routes. (Hint: people like riding expresses more than locals.)

I am so interested in San Francisco's Yelp bus ratings that I've tabled the whole of the network.
LineVehicleStars# RatingsLineVehicleStars# Ratings
1Trolleybus2.967848Bus2.7117
2Bus2.532649Bus2.3340
3Trolleybus4.531752Bus2.58
5Trolleybus2.735554Bus2.610
6Trolleybus2.881666Bus41
9Bus2.422667Bus3.45
10Bus32471Bus2.5627
12Bus3.3315108Bus2.516
14Bus2.554401AXBus3.676
17Bus3.67601BXBus3.3113
18Bus3.251608XBus2.5618
19Bus2.664114LBus43
21Trolleybus3.583114XBus46
22Trolleybus2.749228LBus4.333
23Bus3930XBus3.235
24Trolleybus2.813231AXBus3.569
27Bus2.072831BXBus3.758
28Bus2.484238AXBus3.7114
29Bus2.53638BXBus3.297
30Trolleybus1.988238LBus3.4461
31Trolleybus2.482371LBus3.510
33Trolleybus3.2433CaliforniaCable Car4.1369
36Bus2.110FPCC Streetcar3.42114
37Bus3.4212JLight Rail2.4945
38Bus2.45119KTLight Rail2.1323
41Trolleybus2.8217LLight Rail2.1338
43Bus2.8228MLight Rail2.2331
44Bus2.8324NLight Rail2.55189
45Trolleybus2.6221Powell-HydeCable Car3.7899
47Bus2.1323Powell-MasonCable Car3.5225

The only lines not Yelped are the 35-Eureka and 56-Rutland. These lines have 30-minute headways (as does the 17-Parkmerced, see this route service chart with headways for all lines) while most lines in San Francisco have service every 15 minutes or better.

Next up: New York's subways. And beyond.

Tuesday, November 20, 2012

Philly vs Melbourne

A quick follow-on to my previous post on clock face scheduling. I mentioned the commuter rail system in Melbourne, Australia. It's being rebranded as a Metro system with service levels to match. Even the longest branch line has midday service at least every 30 minutes, and most of the system has service every 20, 15 or 10 minutes, with clock face scheduling at all times.

Melbourne has 231 miles of electrified route, and serves about 700,000 passengers daily. That's more than any commuter rail system in the US outside New York City (where three systems combine with about a million riders), more than double Chicago (a city with a population more than double Melbourne) and five times the ridership of Philadelphia and Boston.

The Melbourne rail map, with the Philadelphia Regional Rail lines
flipped, rotated and overlaid (in red). Center City Philadelphia is centered
on the Melbourne CBD. In this map, the NEC runs northwest-southeast
and the Main Line runs east-southeast. Finding GIS data for Philadelphia
was simple, finding it for Melbourne's rail lines much harder. Also note:
Purple lines on the Melbourne map are not electrified and thus not
counted in the track mileage here; Philly's non-electric line, namely
the NJT-operated Atlantic City Line, is not shown.
Why compare Melbourne and Philadelphia? Both operate almost solely electric trains. They have nearly the same track length (about 221 miles for Philadelphia; Boston has almost double the track length with not much more ridership). And, most importantly, both linked two separate commuter systems with downtown tunnels in the 1970s and 1980s to improve efficiency in their systems.

Now, while it's not apples to apples, it's not apples to oranges. Both systems have about 1 million daily riders on their non-regional rail systems (270m in Melbourne, 290m in Philadelphia). Melbourne lacks any heavy rail subway, but has an extensive tram network; Philadelphia has heavy rail, light rail, streetcars and buses, with the buses carrying slightly more than half the load. Both cities have populations in the neighborhood of 5 million. Melbourne is much more isolated (Philly is less than two hours from New York, Baltimore and DC, Melbourne is that far from Geelong, Bendigo and Ballarat) but both have extensive, car-centered suburbs.

Both systems saw ridership bottom out in the early 1980s and have doubled (in the case of Philadelphia, tripled, although the low occurred after hundreds of miles of diesel service was scrapped and a crippling strike severely cut ridership) since. Both run under overhead wires. Both have quadruple-tracking on some core segments.

And Melbourne's regional rail system carries more than five times as many passengers as Philadelphia's.

There are a bunch of reasons why this is the case. Two of the biggest: Frequency is certainly one—Melbourne has more commuter rail lines with 30-minute-or-better headways all day than there are in the entire United States (*)—only two SEPTA lines operate more-than-hourly. Melbourne's two-zone fare structure, with full integration with bus and tram lines (this is the subject of another post entirely), also makes it much easier to use the system.

It would be a very interesting exercise to see if running SEPTA with Melburnian service levels and a simplified fare structure dramatically increased ridership—especially if someone has $100m burning a hole in their pocket.

* Actually, Melbourne has 11 full lines with at-least 20 minute headways and two others with 15 minute headways before branches split near their termini and have service every half hour. This is more than the 9 lines in the US which have 30 minute service patterns. BART and Washington Metro's outlying branches could be seen as a similar system to Melbourne's, but they were built in the '70s; most lines in Melbourne were built in the 1800s.

Monday, November 19, 2012

Midday clock face scheduling on commuter rail systems

I somewhat-infrequently take the MBTA's commuter rail network, usually for work. The trains midday are rather infrequent (with up to two-hour headways) but usable. Still, I almost certainly have to check schedules  before scheduling meetings or figuring out what time to get to the train. But not always. When I have a meeting in Lowell, I always know that I have to be at North Station at 10 past the hour, and that I'll arrive in Lowell at 5 til the hour, and that the train leaves Lowell at quarter past and arrives in Boston on the hour (and Lowell's hourly bus routes are timed to this, too). No schedule? No worries.

If I boarded at any other station, I'd know the schedule there, too (Winchester: inbound :42, outbound :39). It's much easier to remember how many minutes past the hour service depart than try to memorize an entire schedule. This is called clock face scheduling, and it makes it much easier to use transit.

Commuter rail in the US is commute-time oriented, with frequent services during peak hours and less frequent (and in many cases no) service midday. The frequency, as well as the, for lack of a better word, consistency (whether a schedule adheres to clock face scheduling) varies between systems and individual lines within a system. Midday train service is not heavily utilized, and most systems run full-length trains at these times, so there is certainly not a capacity constraint. However, in many cases, confusing-if-not-Byzantine schedules are a barrier to entry to new ridership, and Americans are happy to jump in their cars if given any excuse.

But, if it's provided at even a minimal level of service, rail transit can provide decent service over long distances, particularly when not focused on park-and-ride type service but walkable, town-center service (so, generally on older suburbs which developed around rail transit). As important, commuter rail often links smaller cities—and their transit systems—in to the larger system, especially in New York, Boston and Chicago. Rail can provide service that buses can not, because they can operate at relatively high speed, stop in a town center, and then resume their speed without getting bogged down in ten minutes of traffic in each town or having to get on and off highways. The technology of using full train sets may not be ideal—shorter multiple-unit trains would be more economical—but the trains are there, so you might as well use them. 

Here's a chart of commuter rail lines in the US which have midday service. Some lines have a single midday run; these were not included here. I've categorized each by its level of service and whether it adheres to a clock face schedule. The levels of service are:
  • Local-Express (multiple stopping patterns during the off-peak)
  • + hourly (better than hourly service)
  • Hourly (service approximately every hour)
  • - hourly (service less frequently than every hour)
And the clock face levels are:
  • Yes (schedules adhere to a clock face schedule; up to 2 minutes of variation allowed)
  • Mostly (most schedules are clock face, but there are up to 5 minute variation or one or two trains with a more significant variation)
  • Partially (part of the schedule is clock face, part is not)
  • No
"Headway" denotes the maximum midday headway, not the average. 30/60 denotes more frequent service on the inner portion of a long (>50 mile) line.

Finally, the "City" column denotes whether the line serves a secondary city at its terminus, or whether it serves mostly suburbs. Examples of "City" lines would be Lowell, Providence, Worcester (MBTA), New Haven and Poughkeepsie (Metro North), Trenton (SEPTA, NJT), Baltimore (MARC), Aurora/Naperville, Waukegan, Joliet (Metra), San Jose (Caltrain). These lines should see more ridership during the midday, and benefit more from hourly, clock face scheduling.

System
Line
Service
Clockface
Headway
City
LIRR
Port Jefferson (inner)
Local-Express
Yes
30/60
N
Metro North
Harlem Line
Local-Express
Yes
30/60
N
Metro North
New Haven Line
Local-Express
Yes
30/60
Y
LIRR
Babylon
Local-Express
Mostly
35
N
LIRR
Port Washington
Local-Express
Mostly
35
N
Metro North
Hudson Line
Local-Express
Mostly
65
Y
SEPTA
Airport
+ hourly
Yes
30
N
SEPTA
Paoli/Thorndale
+ hourly
Mostly
35
N
NJT
Northeast Corridor
+ hourly
No
38
Y
Austin
Capital MetroRail
Hourly
Yes
60
N
Caltrain
Caltrain
Hourly
Yes
60
Y
LIRR
Far Rockaway
Hourly
Yes
60
N
LIRR
Hempstead
Hourly
Yes
60
N
LIRR
Long Beach
Hourly
Yes
60
N
LIRR
Ronkonkoma
Hourly
Yes
60
N
MBTA
Lowell
Hourly
Yes
60
Y
METRA
METRA electric
Hourly
Yes
60
N
METRA
Milwaukee District North
Hourly
Yes
62
N
METRA
Milwaukee District West
Hourly
Yes
60
Y
METRA
Rock Island
Hourly
Yes
60
Y
METRA
UP North
Hourly
Yes
60
Y
Metro North
New Canaan Line
Hourly
Yes
60
N
NJT
NJ Coast Line (inner)
Hourly
Yes
60
N
NJT
Raritan Valley
Hourly
Yes
60
N
SEPTA
Lanesdale/Doylestown
Hourly
Yes
60
N
SEPTA
Media/Elwyn
Hourly
Yes
60
N
SEPTA
Warminster
Hourly
Yes
60
N
SEPTA
West Trenton
Hourly
Yes
60
N
UTA
FrontRunner
Hourly
Yes
60
Y
Tri-Rail
Tri-Rail
Hourly
Yes
60
Y
MARC
Penn
Hourly
Mostly
66
Y
MBTA
Beverly
Hourly
Mostly
79
Y
NJT
Main Line
Hourly
Mostly
70
N
SEPTA
Manayunk/Norristown
Hourly
Mostly
60
N
SEPTA
Wilmington/Newark
Hourly
Mostly
65
Y
NJT
Morris and Essex
Hourly
Partially
60
N
SEPTA
Chestnut Hill West
Hourly
Partially
60
N
SEPTA
Fox Chase
Hourly
Partially
74
N
SEPTA
Trenton
Hourly
Partially
65
Y
NJT
Montclair
Hourly
No
60
N
SEPTA
Chestnut Hill East
Hourly
No
72
N
DFW
Trinity Railway Express
- hourly
Yes
90
Y
LIRR
Montauk
- hourly
Yes
120
N
LIRR
Oyster Bay
- hourly
Yes
120
N
LIRR
Port Jefferson (outer)
- hourly
Yes
97
N
LIRR
West Hempstead
- hourly
Yes
120
N
MBTA
Fairmount
- hourly
Yes
120
N
MBTA
Newburyport
- hourly
Yes
120
N
MBTA
Rockport
- hourly
Yes
120
Y
METRA
BNSF
- hourly
Yes
120
Y
METRA
North Central Service
- hourly
Yes
120
N
METRA
Southwest Service
- hourly
Yes
144
N
METRA
UP Northwest
- hourly
Yes
120
N
METRA
UP West
- hourly
Yes
120
Y
Metro North
Waterbury
- hourly
Yes
180
Y
Metrolink
San Bernardino
- hourly
Yes
120
Y
NJT
Bergen County
- hourly
Mostly
96
N
NICTD
South Shore Line
- hourly
Partially
120
Y
MBTA
Fitchburg
- hourly
No
120
Y
MBTA
Franklin
- hourly
No
120
N
MBTA
Greenbush
- hourly
No
141
N
MBTA
Haverhill
- hourly
No
160
Y
MBTA
Kingston
- hourly
No
142
N
MBTA
Middleboro/Lakeville
- hourly
No
141
N
MBTA
Needham
- hourly
No
130
N
MBTA
Providence
- hourly
No
150
Y
MBTA
Worcester
- hourly
No
140
Y
Metro North
Danbury
- hourly
No
180
Y
Metrolink
Antelope Valley
- hourly
No
180
Y
NJT
Atlantic City
- hourly
No
137
Y
NJT
NJ Coast Line (outer)
- hourly
No
120
N
NJT
Pasack Valley
- hourly
No
180
N

 Lots of interesting things going on here:
  • Nearly every line with a maximum two-hour-or-better headways has 30-, 60- or 120-minute clock face scheduling. The only exception is the Trinity Railway Express between Dallas and Forth Worth, which runs every 90 minutes. 
  • With one exception, lines with better-than-hourly service adhere to clock face scheduling. The exception is the NJ Transit Northeast Corridor Line, which may be constrained by arrival slots in the Hudson River tubes (it does run at least every 38 minutes, however).
  • Amongst the major multi-line commuter rail networks (MBTA, SEPTA, METRA, NJT, MN and LIRR) only SEPTA has full hourly service on all lines, most of them operating on a clock-face or partially clock-face schedule (headways get shorter on the shoulders of rush hour, but while 45-minute headways provide more service, it might just confuse passengers and not actually encourage ridership). 
  • The New York services have hourly-or-better service on their main lines, but some far-out branches see less service. Most other agencies have some lines with hourly service, and some with less.
  • Most hourly services are operated on-or-near clock face, and even two outliers could, with minor changes, be made hourly.
  • All METRA lines in Chicago have clock face scheduling, and many the ones which are not hourly have only one two-hour service gap.
  • The MBTA, by these metrics, probably has the worst service of any major system. The Lowell Line is the only line with hourly, clock face service; although the Beverly-Boston portion of the combined Newburyport/Rockport lines has a similar level. While several MBTA lines are commuter-oriented, others serve some of the largest cities in the region: Worcester, Fitchburg, Lawrence, Providence and Brockton. 
So, yeah, the MBTA. Alon Levy wrote at some length about its poor service levels, and I concur. What's particularly bothersome is that the MBTA has an example of a line which lines up against some of the better commuter rail lines in midday service in Lowell. And while Lowell trains aren't packing five cars full, they regularly disgorge 100 riders each hour on to the platforms at North Station. I'm not necessarily saying that the T should try to improve the service on every line (without better funding, that's probably a non-starter) but it certainly could use the Lowell line as a bit of a model.

The MBTA is also hamstrung by some single-track bottlenecks which hamper more frequent service, particularly on the Old Colony Lines and those to Franklin, Needham, Fitchburg and Haverhill (portions of the latter two are being double-tracked). And there are dispatching and scheduling issues to Worcester and Providence, respectively, and there is hourly, clock face service to Beverly before the split to Newburyport and Rockport.

Here are the minutes between trains for midday service between Worcester and Boston (the two largest cities in New England):
Inbound: 60, 140, 90, 110, 75, 90, 77. Outbound: 135, 85, 112, 53, 90, 80
And for Boston and Providence (cities 1 and 3):
 Inbound: 85, 90, 146, 149, 62, 48. Outbound: 60, 155, 85, 145, 105, 30
At 180,000 apiece, Providence and Worcester are two of the largest non-hub cities served by commuter rail (only Aurora and some cities in the LA agglomeration are bigger; I'm excluding major cities at the ends of smaller systems like Baltimore, San Jose, Fort Worth and Tacoma). And, yet, their service is sub-par.

Other MBTA lines are similarly random. I can't imagine that the train times are a response to any specific peaks in demand at certain times, nor do they appear to be a response to other traffic on the railroad. They just don't make any sense.

Still, this can be remedied. Fitchburg and Haverhill could have hourly service with ongoing improvements to their trackage (hopefully this will be a goal for the Fitchburg Line once it is (re)duplicated in 2014). The state is paying an arm and a leg to acquire the line to Worcester, and they ought to try to improve frequencies to the state's second-largest city (outside of rush hour, private buses provide relatively-frequent service to Worcester, but don't serve any towns in between). And while the Providence line does have intercity trains running at double the speed of the commuter rail, there are only two per hour, and with passing tracks stray commuter trains could be scheduled in between. Or—even better—the T could acquire electric motors or multiple units and run the Providence line under the wire, with faster running times and cheaper operation.

One hour frequencies certainly aren't ideal—consider that in Melbourne, Australia (population 4m) most suburban lines run every 10, 15 or 20 minutes with a stated goal of clock face scheduling (and attract 700k riders per day, more than double Chicago and nearly as many as in New York City!)—but they provide a base level of transit. Two hour headways are quite minimal, and especially sub-par when they don't even operate on any reliable frequency. More frequent and predictable midday service also help ridership during peak periods by giving commuters more of a guarantee that, should they have to leave at a non-peak time, there will be predictable service.

Combining hourly service and clock face schedules is the standard for American commuter rail systems, but many lines fall far short It should be the goal of commuter rail operators to offer at least this level of service whenever possible. The facilities are there and the vehicles are there. The trains won't be full, but making schedules and service easier to understand will certainly increase ridership.

Wednesday, November 14, 2012

Hubway Data Challenge (and updated personal charts)

Back in September, I grabbed my Hubway use, cajoled it in to some charts, and posted them here for the world to see. Remember how cool those charts were, with 130ish data points?
This is what happens when you get more than 130 data points!

Well, in October, Hubway released the data from all rides taken on the system, which added another (approximately) 550 thousand data points, so I decided to rerun these data added together, for a grand total of about 550,130 data points.

(Totally off subject, but this reminds me of the old joke about significant digits the docent at the Museum of Natural History. A student asks how old the dinosaur skeleton is. And he replies "it is 68,000,038 years old." The student asks how they know such an exact number and he says "when I started working here, they told me it was 68 million years old. And that was 38 years ago!")

Ha ha ha. Anyway, I spent the next month dealing with this slightly larger data set, charting and mapping the data, cursing Excel (especially the Mac OS version which is so poorly designed that it will only run one one core of my four-core processor at a time, in other words, I would like my money back, Mr. Gates) and churned out an entry in the Hubway Data Challenge contest. The winner gets a free helmet, Hubway membership and t-shirt, which is slightly better than a sharp poke in the eye! You can find my entry at the above link, or go directly to it here. It has CSS! And some moderately interactive features!

Then I went and looked through all the other entries. From people who know how to make websites that work, and from people who know how to write code to do cool things. And then, I won anyway! Well, I was one of several winners. But still.

Anyway, here is my latest Hubway usage report, you can clicky to make it bigger. OH AND! If you want this treatment for your Hubway trips (and the map, too; the map is pretty cool) let me know and I will make it for you. Payment in beer is readily accepted.

2.7 million kilowatt hours is a lot of power, but …

There's a good* article on California's high speed rail plans in the LA Times. I'm not going to focus on the questions of how to engineer a high speed rail system through mountain passes (it's interesting, though), but look at one number which is put forth in the article:
When completed and fully operational, the bullet train will need an estimated 2.7 million kilowatt hours of electricity each day — about a quarter of Hoover Dam's average daily output.
2.7 million kilowatt hours! That's a lot. That's … 2.7 gigawatt hours! A big scary number! A quarter of the Hoover Dam! A number worthy of exclamation points! What a power-hungry system this will be. Why not shelve it, and have everyone drive and fly between San Francisco and LA?

Because as far as transportation goes, this is pretty darned efficient. Transportation uses a lot of power, and high speed rail is one of the more efficient ways to move people from one point to another. How much power does a car use? One gallon of gas has the equivalent of about 34 kWh. Now, let's assume that the average vehicle, being driven at highway speeds, gets, oh, I'll pick a number out of the air: 34 miles per gallon. This yields the very convenient measure of 1 kWh per mile. If the average vehicle has two occupants (a reasonable estimate for long-distance drives), it yields 0.5 kWh per mile. (Airplanes have a similar fuel efficiency.)

It's about 400 miles from San Francisco to Los Angeles. So the average person will use 200 kWh for that trip. 2,700,000 (2.7 GWh) divided by 200 yields—13,500. 2.7 million kWh is enough power to transport, using current technologies, 13,500 people each day between Los Angeles and California, or about 5 million per year.

The current HSR plans call for 1000-passenger trains (approximately—this is what is run in many other HSR systems) running every 9 minutes between San Francisco and Los Angeles at peak hours (7-10 a.m., 4-7 p.m.). That yields a peak-hour capacity of about 6.5 trains in each direction, or 13,000 passengers.

In other words, 2.7 million kWh would be enough to power the entire California High Speed Rail system—or enough to get one hour's worth of high speed rail passengers to make the same trip by car or plane. To put it another way, 2.7 million kWh in it's equivalent of gasoline will move about 5 million people between LA and San Francisco. It will move 20 to 30 million Californians along the same route by high speed rail—six times the efficiency!—with power left over for another 30-50 million shorter, interregional trips.

And this doesn't address where the power comes from. For vehicles and air travel, it is from fossil fuel. For electricity, it can come from renewable sources in a state blessed with hydro, wind and solar. Right now, 20% of California's power is from renewable sources; by 2020 the mandate is for 33%. With high speed rail drawing power from the grid, some of it's power will probably come from the Hoover Dam.

( * if slightly concern-trolling—yes, crossing faults is a worry but it's not like Japan's Shinkansen runs through a seismically-inactive region)