NYC has a bunch of traffic cameras and makes them available through static images like this one. If you refresh the page you'll see the image upd

maxm/asciiNycCameras | Val Town

submited by
Style Pass
2024-06-10 14:30:06

NYC has a bunch of traffic cameras and makes them available through static images like this one. If you refresh the page you'll see the image update every 2 seconds or so. I thought it might be fun to make these cameras viewable as an ASCII art video feed. I made a small library that takes most of its logic from this repo. You can see a basic example of how to convert any image to ASCII here.

I pull in NYC GeoJSON from here and then hook up a Server-Sent Events endpoint to stream the ASCII updates to the browser. (Polling would work just as well, I've just been on a bit of a SSE kick lately.)

Hilariously (and expectedly) The ASCII representation is about 4x the size of the the source jpeg and harder to see, but it has a retro-nostalgia look to it that is cool to me :)

Leave a Comment