How did a Department of Motor Vehicles become a national symbol of government incompetence? There are plenty of theories: uninterested employees, inflexible rules, interminable wait times. But one in particular caught my eye:
DMVs have an atrocious problem with uneven demand. EVERYBODY shows up at the DMV in about 3 days at the end of the month, and the first two or three days of it. Go to a DMV in the middle of the month, and you will likely find far shorter lines. But unlike many private companies, DMVs can’t easily scale staffing up and down.
This offers a window of hope. If you time your visit right, you can beat the rush and save yourself from the soul-grinding sandpaper rasp of a normal DMV experience. But how can one understand the mysterious rhythms of America’s most-visited bureaucracy?
In this week’s project, I think I’ve found a way. The DMV in Washington, D.C., kindly provides webcam feeds of its centers, like this one in Georgetown. They’re updated every minute to show you the size of the crowd before you schlep down there.
A programming concept called computer vision could help here. Computers aren’t good at intuitively understanding images—that’s why so many of those online human-checks you fill out before buying concert tickets or something involve deciphering a line of text in a picture. But they’ve gotten exponentially better at recognizing patterns. And in this case, the DMV long ago made a decision that will make determining the relative number of people in this photo very easy: They bought those goofy blue chairs.
It’s a color that doesn’t exist anywhere else in the picture. And as the waiting room fills up with people, there’s less and less blue in the photo. By downloading the camera footage at regular intervals and counting how much of the image is colored that shade of blue, I can estimate how many open seats are still available. Here, the computer has run its analysis and colored all the blue seats bright red:
Pretty good, huh? I’ve written the code (technical blog post here), and I’m now going to let the script run every minute for a few weeks so I can gather multiple datapoints for every time slot. Once I’ve built up enough information to puzzle out DMV traffic trends, I’ll visualize the results and post in this Notes series.