Post #2008: Pedestrian traffic counts via cheap camera.

Posted on August 30, 2024

 

It took about an hour to construct the vehicle and foot traffic counts you see here.  The hardware was an $18 Kasa camera, plus my laptop to view the resulting footage.

I let the camera film the street in front of my house.  That was not intrinsically different from (e.g.) a Ring doorbell.  (It is legal in Virginia to film anything in the public right-of-way, or anything you can view while in the public right-of-way, other than restricted areas such as military installations, as long as you don’t record conversations that you are not part of.)

I then did the simplest thing possible.  I transferred the SD card from camera to laptop, and watched the video on fast-forward.  It was like the worlds most boring, yet tense, home video.  I stopped the film when something happened, and put down tally marks.

The fastest I could comfortably watch was 16X.  Doing that, recording the events in eight hours of video took about an hour.  (The camera itself is capable of noting the passage of cars, via built-in motion detection, but would not identify passing pedestrians at the distance this was from the street.)

If nothing else, this confirms what my wife and I had both noticed, that this street is used by a lot of dog-walkers.

This is just a proof-of-concept.  Today it’s drizzly, and there’s a school holiday, so this would not be representative of typical Friday morning foot traffic.

The context is the value of sidewalk improvements in the Town of Vienna.  With rare exception, there are no counts of pedestrian traffic in any of the Town’s various studies.  (I did find one, once, but they referred to rush-hour pedestrian street crossing counts along selected corners of Maple Avenue, our main thoroughfare).

The idea being that there’s more value in putting a sidewalk where people will use it, than putting it where they won’t.  Assuming that current foot traffic along a route is a good indicator for eventual foot traffic there, once a sidewalk is built.  (There could be exceptions to that.  But in the main, I think that’s right.)

And that, for planning purposes, you’d like to have some idea of what they’re using a particular route for.

There are currently at least two ways to get pedestrian count data on (e.g.) suburban side-streets that do not have traffic lights.  Other than the old-fashioned approach of having somebody sit by the street and count passers-by.

One is to use cell-phone data, because many cell phones track and report their user’s location on a flow basis, and that information is sold commercially.  Courtesy of the improved accuracy of GPS, data vendors can now tell you (e.g.) how long the average customer walks around a store, based on how long their cell phones linger there.

(I am not sure that this tracking is entirely “voluntary” or not.  That is, did you download an app that, had you bothered to scrutinize the dozens of pages of fine print before clicking “ACCEPT”, would have revealed that you gave that app the right to collection and transmit your location to some central source?  Or, just as plausibly, if you don’t manage to turn off every blessed way that your phone can track you, then somebody’s picking up your location on a flow basis, you just have no clue whom?  For sure, the phone companies themselves always have a crude idea of where your phone is (based on which cell tower your area nearest), and I’m pretty sure they also get your GPS data, nominally so that they may more accurately predict when your signal needs to switch from one cell tower to the next.)

The problem with counts based on cell-phone tracking that it is of an unknown completeness.  Plausibly, some people manage to keep themselves from being continuously tracked.  Or, more likely, any one data vendor only buys that data from a limited number of app providers.   Generally, it’s fine for making relative statements about one area versus another, but needs to be “calibrated” to real-world observations in order to get a rule-of-thumb for inflating the number of tracked phones in an area, to the actual on-the-ground pedestrian count.

Plus, it costs money, and it’s geared toward deep-pocketed commercial users.

Finally, it’s likely that certain classes of pedestrians will be systematically under-represented in cell phone data, most importantly school children, but also possibly joggers.

The other way to do it in the modern world is to use a cheap camera.  Then count by eye.

So, as an alternative, I decided to see how hard it would be to gather that information this way.  Turns out, it’s not hard at all, even with doing the counts manually.  All it takes is a cheap camera, my eyes, and, for eight hours of data, an hour of fast-forwarding.

Not sure where I’m going with this, in the context of writing up the multi-million-dollar make-over of my little street.  I just wanted to prove that it’s not at all hard to get data-based counts of pedestrian traffic on any street.  All you need is a camera, and a place to put it.  And the time to view the results, if you can’t figure out an automated system for that.

My approach may be a bit low-tech for the 21st century in the surveillance state.  But it works.  Fill in the hourly wage of (say) the employee who would have to watch that video, and you come up with a pretty cheap way to provide hard data on need for sidewalks, as evidenced by counts of pedestrian foot traffic.

If you’re going to spend millions of dollars on sidewalks … how could you not do this first, to see that the expenditure is efficient, in the sense of pedestrians served per dollar of expense?

More on this still to come.


Coda

As if to underscore the power of the surveillance state, about six hours after I posted this, I got my first-ever email from Kasa, with an offer for a video doorbell.

That, presumably, because this blog post had the words “Kasa” and “doorbell” in it.

This happens enough that I know the root cause of it.

Sure enough, yesterday I signed into Google, using this browser, to access something via my Google account, and I foolishly forgot to sign out.  Google was therefore somewhat aware of just about everything I did on this browser in the meantime.

Presumably Google ratted me out to Kasa.

Somewhere, the ghost of Orwell is surely laughing.