Avenue Street

I answered a lot of phone calls last night at the taxi company.

Around 3am a girl called demanding a cab at “320 Avenue.”

That didn’t make any sense. “320 Avenue? That doesn’t make any sense. What’s the street name?”
– “Avenue.”
– “Which avenue? Like 3rd Avenue, 4th Avenue?”
– “Avenue!!! Avenue Street!”
– “What city are you in?”
– “San Francisco, duh…” in a perfect valley girl accent.
– “There is no street called ‘avenue’. Are you on 20th Avenue? Maybe 3rd Avenue? What’s your address?”
– “It’s 320 on Avenue Street!”
– “Avenue Street?”
– “Yeah Avenue Street! 320 Avenue!”
– “Maam, there is no street named ‘avenue’ in San Francisco. Can you call back with your real address?”

She called back 3 or 4 times in the next hour, always very frustrated and presumably thinking I was part of some conspiracy meant to silence the existence of Avenue Street in San Francisco.

Posted in taxi, work | Tagged | 1 Comment

Fetch OAuth Authenticated YouTube API Version 2.0 Requests with GData-Python-Client, Including Insight

We’ve been using Google’s GData-Python-Client library to connect our VidCaster client accounts to YouTube, which allows for neat operations like importing* and exporting of video.

A key component of VidCaster is to provide simple aggregated video analytics to our users, which means we need to import YouTube Insight data.

The general YouTube 2.0 API supports downloading of this Insight data if the request is authenticated on the behalf of the user that owns this video. Per the documentation, you can obtain a link to a CSV video analytics report for an individual clip by requesting a video entry while authenticated on behalf of the user. In Google’s words:

A video entry contains a link to an Insight data feed if the authenticated user retrieving the entry owns the video.

Unfortunately, this is a GData 2.0 API call and the current Python-GData-Client library only supports 1.0 API calls for YouTube, through the deprecated service class, instead of the 2.0 API client class.

The question: How to access this YouTube 2.0 API data using the current version of the GData-Python-Client library? We’ve already gone through the trouble of integrating OAuth for our users, and we’d rather not write a full OAuth query implementation, nor rewrite the GData-Python-Client library.

The answer: We can use a rather generic authenticated 2.0 request to fetch raw queries and process the XML response ourselves.

While we can’t use the developer-friendly feed-specific queries like yt_service.GetYouTubeVideoFeed() from the 1.0 API, we can still make the request and retrieve a response while authenticated which allows us to get the valuable Insight data.

Below is the basic code, note that you’ll have to implement OAuth before using this solution:

import gdata.gauth
import gdata.youtube.client
import gdata.youtube.service
from gdata.gauth import OAuthHmacToken

# Our code to fetch site settings and individual OAuth credentials
from django.conf import settings
from myproject.credentials.models import Credential

CONSUMER_KEY = settings.GOOGLE_CONSUMER_KEY
CONSUMER_SECRET = settings.GOOGLE_CONSUMER_SECRET
YOUTUBE_DEVELOPER_KEY = settings.YOUTUBE_DEVELOPER_KEY
SCOPES = ['http://gdata.youtube.com']

# Fetch token and token_secret per your existing OAuth implementation
credential = Credential.objects.get(pk=1)
token = credential.token
token_secret = credential.token_secret

yt_service = gdata.youtube.client.YouTubeClient(source='MyCompany-MyApp-v1')
yt_service.developer_key = YOUTUBE_DEVELOPER_KEY

oauth_token = OAuthHmacToken(consumer_key=CONSUMER_KEY, consumer_secret=CONSUMER_SECRET, token=token, token_secret=token_secret, auth_state=gdata.gauth.ACCESS_TOKEN)

feed = yt_service.get_feed(uri="http://gdata.youtube.com/feeds/api/users/default/uploads/?v=2", auth_token=oauth_token)

# Great, now you have a feed that includes links to the Insight CSV files!
# I'll leave pagination and parsing XML as an exercise for the reader.

Goods:

  • It works.
  • No modification of existing gdata-python-client library needed, also saves you from needing to write a raw oauth signed query to obtain this data.

Bads:

  • Returns raw XML response, you’ll have to parse this yourself.
  • Not a standard way of implementing a signed OAuth request in V2.0, these functions are normally performed by fancy client class methods on your behalf.
  • In theory this code shouldn’t break even with future releases, but there will be a better way of performing this request when the gdata-python-client maintainer(s) update the library.
  • Very frustrating: The Insight data returned in these CSV files only has the last 7-days of statistics for a given video. This is an artificial limitation enforced by their proprietary security token passed in the generated link. There’s a bit of discussion about this limitation here. Take a second and “star” the feature request to unlock this additional data.

*Downloading videos from YouTube is not officially supported in the API. Youtube-dl.py is the best solution I’ve found as a workaround. It’s well maintained and Python based.

Posted in tech, work | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

SFMTA Taxi Medallion Sales Pilot Program


(PDF Link)

I’m returning from my blogging hiatus at an amazingly unique time in the history of San Francisco taxi regulation. In the past I’ve written extensively about the San Francisco medallion system and other regulations, including:

Thanks to a combination of forces the SFMTA has acted extremely quickly to create a pilot program with a view toward migrating the City to a transferable medallion scheme. A full writeup will have to wait, but for now here’s a scan of the form that the SFMTA is sending out to drivers to gauge interest in taxi medallion buyers and sellers.

Link:

Posted in econ, politics, taxi | Tagged , , , , , , , , , , , , , , | 1 Comment

Driving April 22

It’s time to try this blogging thing again.

Yesterday I drove a normal “extra” day shift from 7a-5p. Some notes:

  • I drove my favorite taxicab: the Toyota Camry Hybrid. Ample space, great handling, adequate (but not stellar) gas mileage, smooth ride, good stereo and accessories, nice pickup.
  • I thought I would tire of cab driving after a year, but I still enjoy it. Approaching my third year. Scary! Admittedly, it is much more fun to drive just 1 or 2 days a week. When I drove 3+ per week it felt like a job.
  • Thursday was a very busy day, owing in part to a fatal Muni accident which shut down all inbound/outbound Muni Metro service for a significant portion of the day.

    However, both as a dispatch order taker and as a driver I notice a significant improvement in demand for taxicabs (and thus earnings) compared to last year. Last winter was the toughest I ever experienced driving a cab, when $150 take-home seemed like an amazing accomplishment. (My all-time average prior was $170 per shift, so a peak of $150 per shift is extremely scary.)

    In the mornings in the dispatch office we notice significantly higher numbers of airport advances and generally higher numbers of inbound calls. On the street I’m again finding hails in unpredictable areas, a fun sign of increased demand.

    It is fascinating to directly experience fluctuation in demand for a service I provide that so closely parallels the greater economy.

  • I had an amazing nonstop pickup streak yesterday. As a day driver, it’s tough for me to encounter this regularly, but some night drivers (especially on weekends) are very familiar with this feeling: when you drop and have an immediate or near-immediate followup fare it’s like a drug.

    Here’s mine:

    • Picked up a radio call at the St Francis hospital. An older woman got in my cab and we headed out to her home in the Inner Sunset. We spoke at length about her ailment, apparently some sort of muscle related pain in her legs. She’s going through physical therapy at the St Francis.

      I love the drive from St Francis hospital to the Sunset district. That’s fortunate for me, as countless elderly ladies seem to regularly commute to and from the St Francis hospital and the Sunset. They should have just put the St Francis in the Sunset.

      Depending on the traffic I’ll head down Hyde, out Turk to Masonic, out Masonic to Lincoln to 7th Ave and left. As we passed by an elder home I saw an elderly couple desperately hailing. Noted.

      Dropped off my St Francis fare and returned. They were still there!

    • Very short fare, from 7th Ave and Irving to the UC Hospital (near 3rd and Parnassus). Checked in via radio for an en route order at the UC Hospital. She was ready to go as soon as I arrived and heading toward Glen Park.

      When I first started driving I wouldn’t have been excited to go to Glen Park from the UC. The optimal route is difficult to determine given rush hour traffic and traffic signal priorities, and Diamond Heights/Glen Park is rather maze like. In my wiser years my ways have changed. I worked out a nice path and we flew down O’Shaughnessy with Toyota’s Hybrid drivetrain whining in pleasure as it gobbled up regenerative juice.

      After dropping checked in for an order nearby in Bernal Heights. Another case of “if I had just started driving I wouldn’t know where the f* those streets are.” But, now I know and it was close by.

    • Picked up a middle-aged lady from the Bernal Heights Library. (Thanks for waiting, middle-aged lady.) She had just finished her weekly writing class which she enjoys immensely. Dropped at 23rd and Dolores.

      23rd and Dolores is rather residential and not a prime place for finding passengers or hailing cabs. I spent a minute filling out my waybill after my passenger had departed. To my surprise a man gave me the “eye” as he walked toward my freshly empty cab and I gladly welcomed him in. We headed downtown. Nice. $70 (revenue, not income) in about in hour. Keep up the good work, San Francisco economy.

  • Thursdays I work in the dispatch office for a few hours before driving. Normally I answer incoming telephone requests for taxi service. I kindly greet our callers and enter / confirm their address, destination and special needs. Dispatch operations at our company use an older but very effective computer solution from the 90s. The system automatically remembers past callers and matches their address. I simply send this to the dispatcher’s screen and s/he sees all the currently open orders. (I’ve written about the radio dispatch process once or twice before.)

    Unfortunately this past Thursday our computers didn’t cooperate so we were forced to use the old fashioned system — paper and pen. I take orders (address and phone) on the left side of a pad of paper, the dispatcher finds cabs and writes the cab number on the right side of the paper.

    I was amazed at how well this worked. For the drivers and customers there was little difference between the two systems. We were able to dispatch drivers to hundreds of dollars worth of business with a phone, a pad of paper, and a motorola radio. Sometimes low tech is okay.

  • Sometimes high tech is okay too. Thursday I made an extra $70 during my shift using Cabulous, smart phone software that connects individual drivers with passengers via GPS maps. (Disclaimer: I am an advisor to the Cabulous team.)

    So far the Cabulous team has been doing their best to balance the difficult equations of driver availability vs passenger demand on the Cabulous network. But, regardless of technology used, from hailing a cab with your hand to calling a company dispatch service, this is an impossible task.

    I’ve helped test the Cabulous driver system on the iPhone on AT&T and my BlackBerry 8820 on T-Mobile. Over the past 6 months of testing and subsequent public release regular usage I haven’t earned much more than $20 per shift and not usually exceeding 2 successful hails per shift using Cabulous.

    Yesterday was different. As usual, I used the J2ME CabulousLite app on my BlackBerry 8820 on T-Mobile. The “lite” app uses a very basic interface to let me login and then it simply periodically reports my GPS location to the Cabulous server. Twilio integration notifies me via telephone text to speech where people have hailed me, and if I accept then I can call the passenger directly.

    I was amazed by how much extra it earned me — I earned just over $70 just from Cabulous yesterday. I was also impressed how well it integrated with my normal sources of fares: street hails and traditional radio dispatch.

    Here are my Cabulous hails:

    • After picking up a radio dispatch order in Marina/Cow Hollow I was headed toward the JCC with a very precocious 5 year old and her adoring mother. (When I had pulled up to their luxurious abode the 5-year old clearly raised her hand to hail my cab. A lifelong customer.)

      Approaching the JCC I received a Cabulous call. (Unfortunately, there isn’t a good way to distinguish a Cabulous call from a personal call, my only hint is whether or not the incoming call registers as an existing entry in my personal address book.) Clicked on the speakerphone to hear madame Twilio say it was relatively close — Golden Gate and Scott. (Another “unfortunately”, the Twilio robot only gives me the raw address. As a somewhat experienced driver I’m able to ballpark the intersection hearing an address, but many new drivers wouldn’t be able to determine the pickup point without a cross street.) The JCC is at California and Presidio. 10 minutes max, more like 5.

      The fascinating part about Cabulous is that technology alone does not make the system successful – it’s half technology and half driver initiative that makes a positive experience for both the driver and passenger. As I use the system more it becomes clear that significantly more onus is placed on the driver to provide a good experience for the passenger with Cabulous than with traditional dispatch (and even traditional computerized dispatch solutions like DDS).

      I now call all passengers as soon as I accept the hail. I call them to accomplish a few key goals:

      • Establish a personal relationship: I identify my name and taxi company affiliation and confirm that they hailed me using Cabulous.
      • Confirm pickup location: “Are you at 2238 Geary at Divisadero?”
      • Sometimes I’ll ask their destination if it’s a distant location.
      • Estimate arrival time and receive verbal commitment that party will wait for me. This is crucial. In this case, “I’m about 5-10 minutes away, are you willing to wait?”

      The amazing thing here is that humans are much more willing to wait if they are “in” the queue and have an accurate estimate of time. Humans get very angry when they are queueing for an indeterminate amount of time, worse if they’re queuing for a falsely reporting amount of time, and worst of all if they’re queuing for an unknown time and believe that the queuing/fulfillment system is flawed.

      In this case, the above phone call addresses all the above common queue concerns: yes, you’re “in the queue”; yes, there’s an accurate estimate of time; yes, there’s a fair and transparent queueing system (it’s simple: you’re next).

      I picked up the fare at Scott and Golden Gate, and saw an empty taxicab drive by. My passenger didn’t even consider hailing him, he knew I was on the way. He paid me well. $20

    • I had picked up another radio order, also from Cow Hollow, but this time heading downtown.

      I received the Cabulous hail just after the passenger entered the vehicle. I’m a good sport so I accepted to see where they were — maybe they’d be close to our destination. (Unfortunately, a driver must accept the order before the location is revealed.) To my surprise the order was downtown, perfect.

      I called the passenger to confirm his location and that he was indeed willing to wait for me to arrive. Again, this is essential for both parties to have comfort with the transaction. He was still in an office and would wait for me to get there before even going down. Nice, captive audiences are best. I didn’t ask destination.

      After dropping my fare off nearby I headed around the corner and stopped at the address given and gave him a quick call. He saw me (told me my cab number and color from his upstairs view) and said he’d be down in a few. 10 minutes later I wondered if I had made a mistake. Should I have taken him at his word? Did he just grab another cab? I called him back, “I’ll be down in 5. Going to SFO.” He knew the magic words. Nice trip to the airport, $40.

    • Last fare was a pickup near Geary and Presidio. A bit challenging as the woman didn’t give me her actual address, just saying she was near the Best Buy. Not very helpful. We eventually came up with Geary and Presidio as a meeting point. Worked great. Another $12.

    A total of just over $70 from Cabulous. Nice.

Posted in taxi, work | Tagged , , , , , , , , , , , , | Leave a comment

Kieran and John on KPOO San Francisco

As part of my ongoing work with Cabulous, John Wolpert (Founder and CEO) and I had great fun doing a radio interview about the Cabulous app on San Francisco’s KPOO 89.5 FM. Harrison Chastang was our host.

It was great to see the KPOO studios, comfortably nested in a nice office near Geary and Divis.

Listen to the interview here:
Cabulous Interview on 89.5 FM KPOO San Francisco

Posted in taxi | Tagged , , , , , , , , , , , , , , , , , , | 1 Comment

My First Hail Using Cabulous

I’ve been advising the team working on Cabulous, a new mobile location-enabled app that makes it easier for cabbies to advertise their locations — and for passengers to find them.

I drove last Saturday and helped with an early beta test. John taped the first successful Cabulous hail:

A few weeks back, Cabulous had nice coverage on the old fashioned TV tubes:

Link – more info on Cabulous including a live demo of the app in use.

Posted in internets, taxi, tech | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , | 5 Comments

Back in the Saddle: Driving Fleet Weekend

San Francisco Taxi with Photoshopped Blue Angels in Sky

San Francisco Taxi with Photoshopped Blue Angels in Sky

It’s been a long time since I’ve taxi blogged.

I drove last Saturday for the first time in a few weeks. I’ve been working dispatch phones and doing VidSF work instead of driving over the past few weeks.

Novel-length post after the break.
Continue reading

Posted in taxi, transit | Tagged , , , , , , , , , , , , , , , , , , , , , , , | 1 Comment

Built-for-Purpose Taxi Concept Car Stops by San Francisco

I happened to be driving past City Hall a few minutes ago and caught sight of the MV-1 manufactured by Vehicle Production Group.

I was able to speak with John Gaydash a former GM executive.

Here are the important details:

  • Given its pricing and options, the vehicle is intended to compete directly with ramp (disabled) taxi vans, not regular cabs.
  • Production cost should be less than $40k
  • Expected MPG of 17 city 22 highway (not officially EPA rated yet)
  • Based on a V6 GM truck engine of some sort
  • Understandably, John et al. are hitting up City Halls across the country to get their regulatory foot in the door. If they can get municipalities to code this as standard disable cab equipment they’re looking at some real cash.
  • This will be the only built-for-purpose taxicab in the North American market.

Thanks John and the VPG crew for stopping by SF!

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , | 1 Comment

My grandfather passes away.

My mother’s father, Boris Drucker, passed away last week in Philadelphia.

My Aunt sent me a link to a nice obituary in the Philadelphia Inquirer.

I’m sad over his passing, but I’m happy that over Christmas vacation I was able to see him along with my immediate family. We had a great visit and together enjoyed our family company and the Philadelphia center city.

Link

Posted in family | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

SFMTA takeover of Taxi Commission on track for March

snapshot-2008-12-15-19-52-03

San Francisco’s Municipal Transportation Agency absorbs the Taxi Commission in March, but SFMTA Chief Nathaniel Ford says progress will be slow.

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , | Leave a comment