13th December 2007, 11:40 pm
Even though sactraffic.org runs generally by itself, I just added some updates to it this evening, including some layout changes and support for microformats.
I moved things around, primarily to look better on smaller browsers (am talking to you iPhone). I also added real estate for site-specific updates (like this post) to automagically populate when, well, there are updates.
I then added microformats, specifically the vevent and geo formats. Not a whole lot of value to the casual browser, but full geek points get awarded anyway.
Finally I pulled the Sac DOT video cameras, because basically they sucked. I have a huge list of CalTrans video cameras to add here soon, it’s much better quality video but the immediate problem is that it’s 640×480 and doesn’t scale down to fit.
14th September 2007, 10:01 am
Now here is a good use of Twitter (IMHO): Sacramento Traffic Updates
Unbeknownst to most people the CHP makes available a dynamically generated XML file of all their working incidents state-wide. Borrowing a page from the LA Fire Department, it struck me that using this feed for updates to Twitter would pretty slick.
So @sactraffic was born.
I of course made it configurable so I can set the “Center” and “Dispatch” that I want (in case I get a hankering for “FresnoTraffic” I guess) and then I found that at least in the Sacramento area there are still a lot of incidents so I further added configurable filtering on the “Area” (as in “just give me ‘Sacramento’ and not ‘Placerville’ or ‘Auburn’”).
Then I went and filtered all those nifty CHP shorthand acronyms, “JSO EB ONR” (just south of east bound onramp) and low and behold actually readable alerts.
I was (and still am) concerned that hitting that XML file every 5 minutes is unnecessary traffic and load, I would rather not grab the whole file if it hasn’t changed. I was surprised to find out that the file seems to be generated on the fly on every access as both the Last-Modified and Etags headers apparently update on every access regardless of any changes. And they look like they don’t use compression either. Seems to me that the CHP itself is not worried about excess traffic or load.
This whole exercise took about an hour, give or take, and then a few minutes here and there for tweaking, and of course writing this blog post.