Animation from Kaggle traffic prediction competition

January 2, 2011

(This article was first published on David Chudzicki's Blog, and kindly contributed to R-bloggers)

Below: two animations (same one twice, just as different speeds) I made from the highway data for the Kaggle traffic prediction competition.

The data are travel times for 61 different sections of Sydney’s M4 freeway, in both directions. The data comes in 3-minute intervals and goes from March 2010 to November 2010, but my video goes through only one week of it in 27-minute intervals to minimize file size.

In my display, I’ve normalized by dividing each section by its average travel time. There is a red line in the middle dividing the data for the two directions–so each point is really for the same location as its reflection.

There’s a bunch that I don’t really know about this data (how are travel times measured?), but making it was fun anyway. I intended to participate in the prediction competition, but I don’t think I really will.

With the code I used, you could create a video at a different time scale, or showing more of the time covered.)

I’m very new to R (and to having a blog, for that matter)–so I’d appreciate any advice that anyone has for me about this stuff.

Thanks to:

Animation isn’t working for some? Try these link1, link2. Need flash, either way.

If anyone has advice for me about what the problem is, I’d appreciate that. Maybe it’s related to the fact that I’m trying to embed these in a post at Blogger?]

To leave a comment for the author, please follow the link and comment on their blog: David Chudzicki's Blog. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)