If you've ever been stuck in an inexplicable traffic jam, you know how important information can be. Just knowing the reason behind a slowdown can help you estimate how much longer you'll be stuck and make some sense of the sea of cars surrounding you. With a little planning and research, you might be able to avoid those trouble spots entirely.
Scout Your Route
To get a general sense of traffic in your area before you leave the house, try looking up your city at Yahoo! Maps. Browse to http://maps.yahoo.com/traffic and plug in your city. You'll see a map that includes any known construction areas and traffic incidents, along with the general speed of the routes. shows the traffic around San Francisco and southern Marin County.
Figure 1. San Francisco Bay area traffic
The squares on the map indicate areas with construction and triangles with exclamation points indicate a traffic incident. You can get more detail by hovering over these icons. Clicking the icon gives you even more information, as shown in .
Figure 2. Traffic incident detail
As you can see from , the information won't always tell you when an incident will be over, but at least you'll know that the route could be slow.
In addition to the general overview of your city, you can look for problems along a specific route. Any driving directions provided by Yahoo! Maps also include traffic information. Point your browser to http://maps.yahoo.com, click Driving Directions (toward the top of the page), and enter a starting and ending location. The map you get by clicking Get Directions will show you traffic incidents along the route. This is great for routes you might not be familiar with, but if you have a regular commute, there are a few other ways to work this information into your daily routine.
Add Incidents to Your Dashboard
If you're a commuter, you probably know your route by heart and won't need the map. Instead, you'll want the traffic incident information in a handy spot, such as your dashboard—that is, your Mac OS X Dashboard. In Mac OS X Tiger (Version 10.4), Apple introduced a feature called Dashboard, which contains a series of widgets that can provide information or control applications.
The Yahoo! Local Traffic widget for Dashboard lets you specify a city, state, or Zip Code and receive traffic incidents within a radius of 4, 10, or 40 miles from the center of the area. You can also set the severity threshold to Minor, Moderate, or Major to filter out smaller incidents. shows the widget with traffic data for San Francisco.
Clicking on any of these incidents will open a web browser to a page that shows the incident on a map at Yahoo! Maps. You can change the location or other settings by clicking the i icon in the upper-right corner. You can also run multiple instances of the widget to track several locations.
Figure 3. Yahoo! Local Traffic widget for Mac OS X
To install the Yahoo! Local Traffic widget, go to http://www.apple.com/downloads/dashboard/transportation/yahoolocaltraffic.html and click Download. Double-click the .zip file to decompress it and then open the file YahooTraffic.wdgt to add the widget to your Dashboard.
Subscribe to Your Commute
Dashboard is great for Tiger users, but if you're on Windows (or if you're a Mac user who simply hasn't upgraded yet), there's still a way to subscribe to information about your commute with RSS.
Studying the data behind the Yahoo! Local Traffic widget, intrepid developer John Resig found that the widget was getting its data from Yahoo! in the popular RSS format; he posted his findings to his web site: http://ejohn.org/blog/traffic-conditions-data. This means you can create your own specially formatted URL to create an RSS feed of traffic incidents in your area.
Here's a look at the format of the URL:
http://maps.yahoo.com/traffic.rss?csz=94101&mag=4&minsev=2
The three variables correspond to the preferences you can set in the dashboard widget:
- csz
The Zip Code, city, or state.
- mag
The magnification of the area—that is, the radius of traffic data from the center of the specified location. Possible values are 3, 4,or 5, which correspond to 4 miles, 10 miles, and 40 miles respectively.
- minsev
The minimum severity that should be shown in the feed. A value of 1 sets the minimum to Minor, 2 is Moderate, and 3 is Major.
So, putting all of the variables together, you can set a feed of moderate traffic incidents within 40 miles of San Francisco, like so:
http://maps.yahoo.com/traffic.rss?csz=94101&mag=5&minsev=2
Now you can add this URL to your favorite RSS newsreader to keep up with any traffic problems in the area. This also means you can add the data to My Yahoo! by visiting http://my.yahoo.com and choosing Add Content from the top of the page. Then click "Add RSS by URL" and plug in your newly created traffic feed. You'll find the new module on your My Yahoo! page, as shown in .
Figure 4. Yahoo! Traffic data in My Yahoo!
Another nice feature is that once this traffic data is available in My Yahoo!, you can view these incidents with your cell phone's browser. So, not only will you be able to check your commute from home or office, but you'll also have something to check when you're stuck in your car dealing with one of these incidents!