article

Action executed in 0.000

Graphing Traffic Speed Data

For the past few days i've been working on a new project. You see, i can't stand the traffic and i'm trying to avoid it. In order to do that i need to know when it's the worst. Thankfully the state of Maryland measures the speed of traffic on major roads. I take that data and graph it. Details follow.

My source is a web page that is hardly worth calling HTML. It's probably version 3.2, maybe be 4.0; in either case, (1) not easily parsable and (2) not semanticly marked up. So i wrote a script to convert it into XHTML 1.0.

Now it becomes easy to use Xerces, and just pluck the data i need. It goes directly into a database. Where are my calculations? On the back of an envelop in the trash, of course. Reading my source every 5 minutes, i'm collecting 400 kilobytes per day.

With it in a database i can create fancy views any which way i want. The next views to create are weekday versus weekend traffic, followed by school season versus non school season.

Finally i wrote a PHP script to generate graphs using JpGraph. It doesn't look great now because i haven't collected data for the averages to appear as averages.

If anyone can find similar data for Virginia, DC, let me know. The CHART website has a map to display the locations of the sensors. If anyone has suggestion or comments, just speak up.

Comments

none yet

Post a Comment

* indicates a required field
anonymous (If you want to identify yourself, please sign in first.)
required This field is required.

Max size is 2 MB, aspect ratio 3:4 width:height
required This field is required.
Please include a short description.
required This field is required.

480 characters remaining.
is public

(Use this field if you have to. 3000 characters remaining.)
1 penny, 2 nickels + 100

Trackback URL

http://derocher.org/~brian//trackback.php?ParentId=2539

form