Hosted on a watercooled Vic-20 with 8 gigs of ram.

October 31, 2008

Understanding Traffic on the 401, pt 1.

Filed under: misc, travel, data, programming, ideas, long rambling stories — Dave @ 8:45 am

The Government of Ontario runs a fantastic service to monitor the state of traffic jams on the 401: COMPASS Freeway Traffic Management System. So the obvious question becomes, when should I drive home?

Step 1: Get some data

First I ran a cronjob on the server hosting ultrasaur.us, that basically recorded the state of the various stretches of road. It’s been running a few days now, and after 14000 readings, there seem to be the following states for a stretch of road (with counts):

  • Express and collector moving slowly (423)
  • Express and Collector moving well (7055)
  • Express and collector very slow (85)
  • Express moving slowly. Collector moving well (205)
  • Express moving slowly. Collector N/A (49)
  • Express moving slowly. Collector very slow (138)
  • Express moving well.  Collector N/A (1236)
  • Express moving well. Collector moving slowly (435)
  • Express moving well. Collector N/A (271)
  • Express moving well. Collector very slow (48)
  • Express N/A.  Collector moving well. (1241)
  • Express N/A. Collector moving slowly (129)
  • Express N/A. Collector moving well (421)
  • Express N/A. Collector very slow (43)
  • Express very slow. Collector moving slowly (45)
  • Express very slow. Collector moving well (14)
  • Express very slow. Collector N/A (75)
  • Moving slowly (122)
  • Moving well (795)
  • N/A (1198)

Notice that there are some near duplicates with double spaces after a period — I’ll convert multiple spaces into singles.

Next I needed to give all of these a value, based on my back of the envelop calculations well means 80+, slowly means 50-80 and very slow means 0 to 50.

Caveats and thoughts:

  • the values can’t be exactly calculated, so I’m not going to try,
  • one important thing that I want to do is map each status to a unique value so that I don’t lose any data. The key is that the values be in order
  • you can see that I’m biased towards the expressway

So values represent the proportional time it takes to travel over a stretch of road (ie higher is worse):

  • 100: Moving well
  • 101: Express and Collector moving well
  • 130: Express N/A. Collector moving well
  • 150: Express moving well. Collector moving slowly
  • 160: Express moving well. Collector N/A
  • 170: Express moving slowly. Collector moving well
  • 180: Express moving well. Collector very slow
  • 200: Moving slowly
  • 201: Express and collector moving slowly
  • 210: Express N/A. Collector moving slowly
  • 250: Express moving slowly. Collector N/A
  • 380: Express moving slowly. Collector very slow
  • 410: Express very slow. Collector moving well
  • 460: Express very slow. Collector moving slowly
  • 501: Express very slow. Collector N/A
  • 500: Express and collector very slow
  • 510: Express N/A. Collector very slow
  • null: N/A (I’m willing to extrapolate a guess at the other N/A’s, but not here)

So this gives me the first chance to make a graph, just over my first 14000 points, here’s the average state of the 401 Westbound over the 24 hours in a day (over a Monday-Wednesday):

Westboud 401 travel times (higher is worse)

The worst time to drive is 4-5pm, but the three hours from 3pm to 6pm seem to be the worst. That’s not much of a surprise (although it’s an hour or so sooner than I expected rush hour to start), but that evening rush hour is so much worse than morning rush hour is a bit of a shock. That 1pm is such a slow time is curious too, I wonder if that bump will go away with more data.

(Data is available to anyone who contacts me, it’ll eventually be available for download)

March 9, 2008

How Communism Kidnapped My Cat

Filed under: travel, kinda maybe funny, china, long rambling stories — Dave @ 5:41 pm

I’ve referenced this life lesson so much that I feel I should write an authoritative account that I can reference. I’ll try to keep the fun educational aspects to the parentheses. It’s worth mentioning that this story takes place on the outskirts of a dirty town you’ve never heard of in non-coastal China; there were pockets of modernity and a McDonald’s downtown but shortly after this story a donkey-drawn cart of toilets overturned in front of my building, strewing porcelain around the dirt road (this gives you a pretty accurate feel of the place).

From Socialitter to Capitalists’ Fat Cat

Baijiu (”By Joe” = White liquor, a foul tasting vodka-like drink) got his name iteratively, after we learnt out that “Chairman Māo” (mao1 meaning cat, and pronounced like an angry mother saying “now” slowly) was co-incidentally very similar to “Chairman Máo” (mao2 meaning hair or fur and pronounced more like “ow!”). Clearly this was unintentional, as my 98 gram weakling of a cat had barely a Deng Xiaopeng (4′11″) frame, never mind the great helmsman’s 5′11″. Nonetheless, we were told his political career would go better with a less contentious name, and no, Chairman Meow wasn’t going to cut it either.

As the runt in a 9 kitten litter where only 8 found homes, Baijiu was thrown out onto the street and had to compete with all the other strays for scraps from the restaurants in the open air market. He didn’t do so well. After a few weeks though, he stumbled onto a sucker (me) with an informal agreement with a veterinarian back home that if he (I) were to, say, let a cat starve to death, she would kill him (me) in his (my) sleep. So I bought the little guy some spam in a tube for a nickel (the cheapest kind of meat on earth), and people stopped and stared — it was a little strange, the idea of buying food specifically for a house pet; most local cats lived on diets of leftover scraps of bread, vegetables and tiny bits of meat and here was this stray getting the royal treatment from a lǎo wài (meaning foreigner, but in the same sort of vein as a tractor salesman from Iowa might refer to an interracial gay couple from New York thinking of opening up a chai tea shop in his town as foreign). This cat knew a good thing when he found it.

Baijiu was hooked, I was hooked. My girlfriend, who had only recently been making scary noises like “adopt” and “a Chinese child” was hooked and distracted. We took him home, bathed him, made him a collar and bought him over 30 cents worth of food (these prices are all as accurate as I can remember).

Stacey and I were living on a compound of the provincial power company in a few rooms in somewhat renovated workers quarters built in the 60’s. We each had twenty times the living space of other workers our age (of course, I doubt I would’ve been coaxed across the sea to live in a cot and share a small sink with 11 other people) but I’m allergic to cats, so Baijiu had to be an outdoor cat.

Smashing the Gang of Foreigners + Cat

All the buildings housing foreigners had “assistants,” peasant girls who slept behind the front desk. They were ostensibly there to help us, but mostly they kept a log of our comings and goings and made sure we didn’t bring any Chinese women back to our apartments. Stacey and I were relatively popular with the girls, She gave them popsicles, I hadn’t tried to sleep with any of them and we both speak a lot more Chinese than you normally get from white people. And they loved Baijiu, so they told us they’d help keep our secret, which was a little odd, since “I have a cat” doesn’t seem like a very interesting secret.

Baijiu used to sleep on top of a large column in the croquet pitch beside our apartment because he was afraid of the local stray cats. He couldn’t get down so every morning I’d get him down and give him his spam and milk.

One day he wasn’t there, the girls were concerned but reserved and wouldn’t tell me anything. This is what we’ve managed to piece together, none of this would hold up in court:

The foreigners weren’t supposed to have pets, but the people in charge of enforcing that rule weren’t really sure where we were in the hierarchy (I was drinking buddies with the local party secretary and Stacey was literally the poster girl for the school) so rather than confront us on the issue, they took my cat and drove him a little ways out of town and left him there.

Communist agents of the provincial power company disappeared my cat.

baijiu1.jpgbaijiu2.jpgbaijiu3.jpg

In which I destroy the suspense

At least a week and a half later, I was walking home from the office around midnight and a little marmalade ghost ran out across the plaza to me. He knew which side his bread was buttered on, and I guess he had more luck reading road signs than I ever did.

The cat came back.

By then we thought he was a goner, but the cat came back; he just couldn’t stay away.

And some Clarifications

Baijiu was actually kidnapped 3 times, the first was by the girls who ran the company store. They “adopted” him, tied him up in front of the store, and fed him scraps for a few days until I found him. The second time was the communists, and the third time was just before Stacey and I left town. The propane delivery man took Baijiu home to his daughter without asking our permission, but since we were looking for a home for him anyway, that may have been the best outcome anyway.

April 4, 2007

Flying 1/8th of the way around the world

Filed under: interviews, travel — Dave @ 7:35 pm

Loudspeaker: May I have your attention please — the Department of Homeland Security has raised the threat level to (ominous voice) Orange (/ominous voice).

Well, they finally got my swiss army knife. I’ve remembered to put it in checked luggage every other trip, I just didn’t check anything this time. Apparently you can store things in a zip-lock bag for $1 a day, but they couldn’t tell me how to get it back if I did — they seemed honestly confused as to why someone might not want to just throw such a useful thing away. Again I wonder how much anti-Americanism is the result of people trying to visit, aren’t we past the idea that someone can take over an airplane with a pen-knife yet. some good news though, apparently inhalers aren’t a problem any more and my laptop can no longer be a bomb, maybe they just bug every person for only one thing.

Also, I don’t mean to be rude, but if you can’t fit into the seat without raising the armrests, that means you’re flowing into me, and it’s uncomfortable.