Transit dump prompted by

Another question from my secret which necessitates a blog post!

While I guess I have a ok grasp of your thoughts on GTA transit, just want a more concrete answer on the following: 1) Transit in Scarborough 2) Metrolinx taking over TTC 3) Future expansion of TTC 4) Gardiner Expressway 5) solving Yonge line being at capacity 6) improving commuting and intercity?

Now, time for some speed writing and let’s see if I can do this from memory.

  1. The Scarborough RT should be replaced by an LRT. Literally the only reason to justify an extension of the Bloor-Danforth line is to save the transfer, which is a problem that can be solved easily with cross-platform transfers. There is no other reason. There’s no reason for it to go underground, since it already runs in its own rail corridor, separated from traffic. The projected ridership doesn’t justify the capital cost and all of the cost projections that have been done so far ignore the operating costs.

    A lot of people are under the impression that an LRT system would fall to the same shortcomings of the SRT. This is wrong. Most of the failures of the current system are because of the legacy ICTS vehicles (which we can’t replace) and trouble with the third rail in winter (which wouldn’t be a problem since LRT power is delivered via overhead wire).

    A lot of people also seem to be under the impression that the subway is a done deal. It is not. There’s still years of environmental assessments and design work and financing and procurement and tendering that needs to be worked out. It still has to go through three council votes (EA approval, financing, LRT master agreement amendment) before a single shovel is thrust into the ground. All of this extra work and these votes become unnecessary the moment council decides to build an LRT after all.

  2. Metrolinx taking over the TTC is a monumentally stupid idea because of what exactly is being proposed. No one is actually proposing that Metrolinx takes control of the TTC, they only want Metrolinx to take control of the rapid transit lines. This is a problem since the rapid transit lines are the most profitable operations in the system. Removing that money from the TTC makes it much harder to run the heavily unprofitable suburban surface routes.
  3. The Transit City plan: LRT to replace the most heavily used bus routes and corridors in the former municipalities, the Whatever Relief Line from Pape to King to Dundas West, increase bus service along identified routes to ten minute headways, implement transit signal priority to improve surface routes, etc.
  4. I don’t actually know that much about the Gardiner, so I’d go with the staff recommendation. Apparently, they don’t see it as apocalyptic to remove the eastern portion of the Gardiner as long as the necessary transit infrastructure is build and based on my admittedly low commuting on that route (taking Lake Shore from the east and down to Queen’s Quay), I’d agree with their recommendations.
  5. There are a bunch of ways to do this but the DRL is the simplest. Obviously, there are ways to try and slow down the problem like automatic train control and the TRs were supposed to help in that respect. In the end, I don’t think there’s anything that’ll make any significant inroads short of creating another north-south route to divert commuters.
  6. High speed rail is obviously the dream, but I don’t think it’s attainable or even necessary. At this point, I’d be really pleased with rail travel being made more affordable and frequent. Does that mean electrification? I don’t really know, but the federal government’s cuts to Via definitely haven’t been helping. It’s unfortunate, because Via could be a decent way to travel if it wasn’t as expensive and inconvenient.

Stolen from who will you vote for in the coming toronto mayor election and why

These are my initial impressions of the campaign so far since it is still rather early, although, if I’m honest, it’s probably going to be Olivia Chow, but I’ll be watching how the campaign unfolds quite closely. I’m hoping to write a (more) substantive blog post about all the candidates for council I like later on. For now, there are a few things to note even this early on.

First of all, I’m pretty sure I’m considered a raging socialist by most typical standards although I can’t say I subscribe to socialism because I am not really familiar with the philosophy behind but anyway, this means that I can be considered your standard urban progressive equipped with some awareness of municipal politics.

There are two basic things which I’m using as a litmus test: taxes and transit.

This is not to say that other issues aren’t important, but because I understand these issues the most so they’re the lens through which I see most of the politics of this city. They also provide a fairly accurate classification of the kinds of positions a candidate will take on a wide range of other issues like housing, social services, and general ideas about city-building.

So, why taxes and transit?

Every candidate is going to claim fiscal responsibility because everyone wants politicians to be spending taxes as little as possible. So what candidates are saying about taxes and how much they’re going to raise or lower them by is something to pay attention to. This is the same in every election, but in this election, there’s something looming ahead which hasn’t been discussed and isn’t really something that people are paying attention to unless they’re boring nerds who watch council meetings for fun.

At the special council meeting for the 2014 budget, the city’s CFO made a presentation. During that presentation, he outlined the operating budget for 2014 and pointed to some challenges over the next two years. There are two things that he noted. The first is that the city is losing a major provincial grant which will place a pressure on the budget outlook. The other thing he mentioned was that even without that loss of funding, property tax increases above the rate of inflation are going to be necessary to maintain the current level of services.

Of course, what level of services is necessary is something that’s up for debate. The problem is that candidates who promise not to raise taxes always promise that service levels won’t be impacted. That’s the exact pledge that Rob Ford made in 2010. The problem with this is that the KPMG Core Service review that he launched in order to find efficiencies basically came back with nothing. Toronto was already as efficient as it could be at current service levels. Significant savings won’t be found unless there are some drastic cuts in services.

So what I’m looking for here is a candidate who will address this problem. Either we need to see significant increases in property taxes or candidates have to say what services they consider unnecessary and will place on the chopping block.

The second thing that I’m looking at is what the candidates plan to do with transit. When Miller left office in 2010, he had significantly increased surface transit service levels and had an ambitious rapid transit plan to connect large parts of the city outside of the downtown core. Rob Ford quickly put a stop to both of those things during his first year in office.

The big ticket items that candidates are going to be talking about are the Downtown Relief Line and the Scarborough RT replacement. As a resident of Scarborough (Ward 42), this has been a serious point of frustration for me, because most Scarborough councillors either don’t understand the challenges of using transit in our part of the city or don’t care about transit riders.

Other than the big ticket items, there’s the issue of how to pay for all of it as well as improving regular old bus service. There’s no substitute for better bus service in places like my literal corner of the city. The focus of huge capital projects is to connect the city together but we’ve forgotten that just getting around the same part of the city is still a huge challenge in a lot of places. A subway isn’t going to fix that.

So, these two things immediately rule out three of the five major candidates for me. I’ll assume you are all familiar with Rob Ford. That leaves Councillor Karen Stintz (Ward 16 Eglinton—Lawrence) and John Tory.

During this term, Stintz served as the Chair of the TTC and had significantly more of impact on transit service than the mayor. Her legacy includes following in Ford’s footsteps in reducing surface transit service levels, restoring Miller’s light rail transit plan, and then subsequently placing it in jeopardy again by pushing for a hastily planned and costly subway extension. This single act disqualified her from consideration.

John Tory is a former mayoral candidate and former leader of the provincial conservatives. It’s unlikely that I’ll share his views on taxation and other policy. But it’s his position on the Scarborough RT replacement that is in direct conflict with his stated concern for fiscal responsibility that makes me raise my eyebrows to the ceiling.

That leaves two major candidates: Olivia Chow and David Soknacki.

First, David Soknacki is known as a former councillor who is relatively conservative but served as the first budget chief for High Archcommunist Mayor David Miller. He wants the Scarborough RT to be replaced by a light rail line, which is good. He also seems to be thoughtful about policy and seems like someone who can be reasoned with, which is also good. He comes off as a sincere conservative, which is in contrast to the sort of moneyed political machine atmosphere that John Tory sort of exudes.

But, my support is likely going to Olivia Chow who is the only progressive in the race. There were rumours for a long time about her supporting a subway extension, but she didn’t go there, which, other than something I personally agree with, is a pretty significant risk for someone who is perceived as being a downtowner. Of course, I am concerned about her being adamant about property tax hikes in line with inflation and I don’t really have a good answer for that yet. So yes, I’ll probably have some concerns with some of her positions as the race goes on.

But I also realize that it’s impossible to have someone who presents a plan that I’ll agree with 100%. Rather, I’m trusting her to make decisions based on the lens through which she sees the city and I’m confident that we have similar ideas about that. She’s been representing Toronto as an elected official in various capacities for over twenty years now so she understands the city and the issues it faces. She’s a legit progressive who’s popular and able to connect with a lot of people across the city because of her background.

On a personal level, I’m really excited to have a Chinese woman running to be mayor of my city. Something that Toronto claims to pride itself in is its diversity and the large number of immigrants we have from all over the world. I think it’d be wonderful to have a mayor who embodies that.

Toronto City Council web of shifting alliances, 2013 edition

So in a kind of now yearly tradition, near the end of October I spent a day downloading 45 voting records by hand because I can’t figure out how to do a batch download on the City of Toronto’s meeting monitor. Yeah, I guess I’m about a month late, but luckily, nothing interesting has happened in Toronto municipal politics in the month of November, nope, nothing at all.

So here’s what came out of it:

The above graph represents the voting correspondence for the entire 2010-2014 term to date (which, at the time of writing includes up to the October 11, 2013 meeting). Reminder: black means they voted together more than 90% of the time, blue 92.5% and green 95%. No line means they voted together less than 90% of the time. The following is a snapshot of the past year, from the October 30, 2012 meeting to the October 11, 2013 meeting.

This picture may look familiar to those of you who are familiar with Rob Ford when he was just the councillor for Ward 2.

It’s kind of hard to say what’s up with the rest of council. If you recognize any of the names, it’s really hard to draw a nice circle around any group. I guess you can say this is some evidence of wildly shifting alliances among council, which wouldn’t be too far off the mark.

The one thing the mayor is consistently great at is burning bridges. This is a skill he possessed long before his global debut as crack mayor and is a skill that many predicted would give him some trouble back during the campaign of 2010. Of course, there are others scheming on council and the whole situation is fairly volatile. Before, you could say that council was polarized, but there’s much more of a fine gradient going on here.

Anyway, God only knows what this’ll look like once election season is in full swing. You only need to dig up last year’s edition of this where I started off with “2012 has been a hell of a year” to have a good laugh. Anyway, the last regularly scheduled council meeting is in August 2014. And I mean, really, no one saw this coming. The drinking and coke-doing was a huge rumour among the City Hall folk and all, but no one saw any of this getting decisively revealed ever.

So what can Toronto City Council do about the mayor?

By now, you’ve probably heard about His Worship, Rob Ford, Mayor of Toronto and you probably have questions about whether he can be kicked out of office. The short answer is no.

The long answer is still no. The reason for this is that in most Canadian jurisdictions, whether we’re talking federal, provincial, or municipal legislatures, there is no provision for recall. The sole exception as far as I’m aware is British Columbia.

There are provisions for municipal officials to lose their seats. The first is one that you might remember from around this time last year: contravention of the Municipal Conflict of Interest Act. Funnily enough, this almost happened to the mayor before he won his appeal. The second is incarceration, which obviously hasn’t happened, but with the way the story is developing, who knows what’ll happen in a week.

However, municipalities are created and governed by the whims of the province. Theoretically, the province can do whatever it wants with a municipal government through legislation. And so if push came to shove, yes, the province can decide to remove a mayor from office. I mean, the province could technically dissolve the entire City of Toronto if it wanted to. But it probably won’t.

Unlike the province, municipal councils do not have such powers within their grasp. This was made clear on Wednesday, when Toronto City Council debated Councillor Denzil Minnan-Wong’s motion MM41.25. Essentially, the motion did the following:

  1. request that the mayor apologize for lying about the video
  2. urge the mayor to cooperate with the police investigation
  3. request that the mayor apologize for writing the letter of reference for Sandro Lisi
  4. request that the mayor answer council’s questions about this debacle
  5. urge the mayor to take a leave of absense
  6. request the Integrity Commissioner to investigate

You’ll notice that the mayor doesn’t actually need to do any of that stuff. A lot of the debate on the motion was over the fact that it didn’t really do anything.

But as it turns out, council can do something, as long as it’s not forcing the mayor to go away.

On the same day that Councillor Minnan-Wong announced that he’d be putting the motion forward at the meeting (which, if we reach into our memory, was the morning of the mayor’s impromptu admission at noon that it turns out he did, in fact, smoke crack cocaine), Councillor John Filion had another motion drawn up that’d do the following:

  1. City Council suspend the power of the Mayor to appoint and dismiss the Deputy Mayor and Standing Committee Chairs under Section 27.40 of the Council Procedures.

The rest of the motion deals with keeping the current chairs and composition of the committees. This is the first motion that, unlike Minnan-Wong’s motion, has consequences for the mayor and removes one of his fairly significant powers. You may recall that when the crack video story first hit, Councillors Jaye Robinson and Paul Ainslie were both fairly critical of the mayor. This resulted in him removing Robinson from the Executive Committee and demoting Ainslie to a less important committee chair (and even later, he’d remove him for his subway vote).

This motion required notice to be given at the next council meeting. That was done and a special meeting was called for Friday to deal with the motion. So, that’s all council can do.

Or so we thought. After the conclusion of Wednesday’s meeting, it was announced that a second special meeting would be held after the first one on Friday. During the meeting on Wednesday, Councillor Josh Matlow had asked a question about the mayor’s powers during an emergency during the debate on the response to the July floods. Presumably, this motion was a result of that. At this meeting, this motion will be debated, which will do the following:

  1. Amend Chapter 59, Emergency Management to provide that the Deputy Mayor assume those powers and duties that have been delegated by City Council to the Mayor under its own authority, to be in effect until November 30, 2014.
  2. Amend the selection process provisions of Chapter 3, Accountability Officers, to provide that the selection panels are appointed by the Deputy Mayor and chaired by the Deputy Mayor or the Deputy Mayor’s designate, to be in effect until November 30, 2014.

What this essentially does is remove emergency powers from the mayor and give them to the deputy mayor. This is probably a good idea if the city fell into an emergency like another freak snowstorm or flood or something like we’ve been seeing last year.

And again, we thought we were done until today. Today, councillors decided to hold a third special meeting to be held on Monday. This one deals with this motion, which is a doozy:

  1. City Council delegate to the Deputy Mayor all powers and duties which are not by statute assigned to the Mayor.
  2. City Council reallocate the operating budget of the Office of the Mayor as follows:
    1. The staff salary and office budget under the control of the Mayor be the same as that of a member of Council.
    2. The balance of the operating budget be reallocated to the City Clerk’s Office to be administered under the oversight of the Deputy Mayor.
  3. City Council authorize that all existing members of the Mayor’s staff be offered the opportunity to continue their employment either with the Mayor or as part of a transfer of staff to be overseen by the deputy Mayor who shall assume responsibility for staffing, including hiring and firing.
  4. City Council suspend the necessary rules and substitute new rules that give effect to the following:
    1. The Deputy Mayor is the chair of the Executive Committee.
    2. The Executive Committee elects a vice chair from among its own members.
    3. the Mayor is no longer a member of all Council committees by virtue of office, and does not enjoy the rights and privileges of other committee members when present at a committee meeting.

So what does all of this mean? Part 1 is simple, it gives all the powers of the mayor to the deputy mayor except those that are legislated by provincial law. So this includes all those powers which are granted to the mayor through council bylaws.

Parts 2 and 3 are more interesting. These reallocate the budget and staff salary of the mayor’s office so that it’s the same as a regular councillor’s. It gives whatever’s left over to the deputy mayor. To prevent staff currently employed by the mayor from losing their jobs, there’s a provision that allows them to either stay with the mayor’s office or to move over to work for the deputy mayor. This is likely partially caused by the revelations in the latest unredacted version of the Sandro Lisi ITO which alleges that the mayor had improperly used his staff for personal errands.

Part 4 removes the last of the mayor’s powers. It removes the mayor from the chair of the Executive Committee and assigns the deputy mayor to be the chair. The vice-chair is then chosen from members of the Executive Committee because the deputy mayor was automatically the vice-chair.

Part 4c deals with a little-known power of the mayor. Technically, the mayor is a member of every council committee and has the right to move motions, speak, and vote. It’s not used very often; Ford himself used it only twice that I’m aware of. Part 4c makes it so that the mayor is no longer a member of any council committee.

If all of these motions pass (and there’s little reason to believe they won’t, otherwise the meetings probably wouldn’t have been called), the end result is that Rob Ford would just be a very loud councillor with a fancy title.

Twitter bots, twitter bots, twitter bots, folks

After the incredible success of @SomeHonMembers, I decided to create @HonSpeakerBot, which was not nearly as popular, but whatever.

The lack of any transcripts or any data made a bot for #TOpoli difficult. But now, there are two. You may have seen them around as I was testing them.

Mayor Robot Ford hates streetcars

This idea is based on a popular Japanese twitter bot by the name of @akari_daisuki. What Akari does is takes a random Wikipedia article title or something from her timeline. Let’s call this thing $x$. Every fifteen minutes, she tweets the Japanese equivalent of “Yay $x$, Akari loves $x$”.

The idea behind @MayorRobotFord is similar. He takes a random Wikipedia article title or something from the #TOpoli stream and tweets, in his familiar way, “$x$, $x$, $x$, folks. We’re getting $x$.” or “People want $x$, folks. $x$, $x$.”, depending on how long $x$ is.

How does it work? Well, the Wikipedia portion is easy enough. We just get access to the API to grab a list of ten random pages. The more complicated part is pulling stuff off of #TOpoli.

Since this is a twitter app, it’s not too hard to get a bunch of tweets off of #TOpoli. We just use the API and we’ve got the fifteen latest #TOpoli tweets ready to be used. The difficult part is extracting noun phrases, or NPs, which is where that graduate class on computational linguistics comes in handy.

So how do we do this? Well, first of all we have to identify the parts of speech in a given tweet. So we tokenize it first and split it up into words and punctuation. Then, we use a part-of-speech tagger to go through and figure out what each little piece is. The POS tagger that I used was the default one that came with the Natural Language Toolkit. Normally, you’d need to train a tagger on a corpus. This default one was trained on the Brown corpus, which is a body of text which was hand tagged for training purposes.

So now our tweets are all tagged and we assume that they’re properly tagged. There’s obviously going to be some slight errors here and there, but whatever, we want to make a twitter bot, so it’s not that important. But we only have our parts of speech. We want to be able to relate the different parts of speech into phrases. So we need some kind of parsing or chunking to put these pieces together into larger phrases that make sense.

For this, I used a bigram chunker trained on the conll2000 corpus. Like the Brown corpus for tagging, the conll2000 corpus is manually parsed and chunked for training purposes. What a bigram chunker does is it analyses every consecutive pair of words in a sentence to come up with a statistical model. It uses this to come up with the most likely NPs to arise from the sentence. We can then just pluck out all of the NPs the chunker identifies.

Once we have all of our NPs, we stick them in a list with our Wikipedia titles and randomly select one to use in our tweet. The Wikipedia API has a limit of 10 titles per call and the twitter API grabs 15 tweets per call. Thus, the chance of getting a Wikipedia title is at best somewhere around 2/5 of the time. However, that’s not taking into account removing entries that are too large. That quick calculation also assumes that there’s only one NP per tweet when there could be many, so in reality, the chance of grabbing something from #TOpoli is much more likely, which might be for the best if you want weird accidental metacommentary.

The Core Service Review

One day, I decided to look through the City of Toronto’s open data catalogue and happened upon an interesting entry called the Core Service Review Qualitative data.

Lo and behold, it was exactly that.

After some fiddling around with an Excel module for Python and figuring out how to split tweets that are larger than 140 characters, I let it go.

@TOCoreService will tweet one entry, randomly chosen, from the 12000 submissions, or close to 58000 answers. These range from short answers like “transit” or “taxes” to fairly lengthy responses.

So what’s the point of this bot? Well, the data is up there for anyone to read, which is nice for transparency and engagement. Of course, whether anyone who’s not city staff would want to read 13000 responses is another matter. But here, we pretty decent collection of opinions on what our priorities should be from real citizens. It’d be a shame if the only people who read them were city staff.

About that Mighty Middle

Back in fall, I had to do a project for my social network theory course. Not too long before that, I saw a neat post on CalgaryGrit that talked about how to identify similarly aligned groups and councillors on Toronto City Council based on their voting records. With the help of the guy who actually did that analysis and his scripts, I was able to compile my own data from Toronto’s council voting records which were conveniently offered as part of the city’s open data.

And here’s what came out:

This is a graph of Toronto City Council, where edges between two councillors means that they have a high degree of similarity in their voting records. The period considered is from the beginning of the term, December 1, 2010 up until September 30, 2011, which was the last day of voting data that I had available before I had to start work on the project. An edge means that the two councillors voted the same way at least 90%. An edge is coloured blue if that goes up to 92.5% and it’s coloured green if it’s at least 95%. Or you can think of those numbers as 10%, 7.5%, and 5% different. Same thing.

It’s important to note that the edges aren’t weighted. This means that the physical distance of the councillors doesn’t actually mean anything. That Rob Ford is drawn at the top right corner is a coincidence and it doesn’t mean that Denzil Minnan-Wong is more similar to the mayor than Doug Ford. Similarly, it doesn’t mean that Paula Fletcher is necessarily the councillor least similar to the mayor just because she’s the furthest away in the drawing.

Of course, the drawing is oriented such that you can make less fine-grained observations. It’s pretty easy to see which councillors are the right or left wing and which ones reside in the middle. We can also see that the right wing of council votes together a lot more than the left wing. We can even kind of identify which councillors are most likely to break with their respective groups.

In order to get more detailed analysis, we need to look at actual numbers. There are a bunch of graph theoretic metrics that we can use together with social network theory to talk about how certain groups or councillors might act. I get into that sort of stuff in my writeup. Of course, a lot of that is handwaving since I don’t really get hardcore into stats and a lot of it is political analysis, which I’m kind of an amateur at.

Interestingly, I concluded my writeup by saying something like how, based on all of the analysis and numbers, the Mighty Middle didn’t really show any signs of life. And even if it did, it wouldn’t get very far since the number of votes Ford had on his side was pretty stable and was at the point where he’d only need one or two votes.

Well, council sure showed me. One of the first things that happened in 2012 was the Mighty Middle that I said didn’t really exist covertly orchestrated enough votes to reverse a bunch of the mayor’s cuts. So what does this mean?

Well, the most obvious lesson is that you can’t predict what’ll happen in volatile political scenarios based just on data. Obviously, the situation seemed stable, both from the perspective of the data and people watching city hall. I mean, the whole budget thing surprised everyone.

Of course, the mistake there was to assume we were in stable situation when we weren’t. Yeah, the mayor had a lot of safe votes, but he was still missing one or two. Everyone’s been treating this as the mayor having an unfortunate stranglehold on council even though in a parliamentary setting, missing one or two votes is still enough to throw everything into uncertainty (see Queen’s Park). Being a non-partisan legislature, this volatility should’ve been more expected. But that tiny gap managed to fool everyone, even though all it’d take is one or two councillors to ruin everything for the mayor.

Interestingly enough, the Mighty Middle councillors did do what I said they’d be good at. They were able to use their position to broker a compromise that managed to peel off enough votes from the mayor. When they did combine their powers, they were really effective. But also notice that the coalition they forged was still really fragile. Even on the day of the vote, it wasn’t completely slam dunk for the opposition until the vote was done. All it would’ve taken to ruin everything was one or two councillors, which is something I did note in my writeup. Of course, like I said earlier, this caveat and margin of error holds for the mayor’s side as well.

And here’s where numbers aren’t enough to capture everything. Once someone decides to rock the boat, as the Mighty Middle did in late January, it becomes easier and easier. All of a sudden, the mayor’s grip on council doesn’t seem that bad and in February, we have the TTC chair and (former) Ford ally Karen Stintz turn rally council to overturn the mayor’s transit plan.

This is obviously a huge vote. Unfortunately, my model doesn’t weigh votes according to their importance, so this is treated the same as any other banal vote like voting on extensions of speaking time or something. I did throw in some stuff about possible ways of classifying votes, but that’s already hard to do in an objective way. Figuring out how to weigh the importance of votes is probably even harder to do automatically.

None of that changes that I was way off in my conclusion. Of course, I’m thrilled at what’s been happening at city hall, so I guess I should be happy that all of this happened right after I finalized my writeup and got marked on it.

If you’re interested in reading about how wrong I was, here’s the writeup.