Traffic Data

Have a great idea about how to expand ML - post it here
User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Traffic Data

Postby albright_family » Sat Nov 09, 2013 3:23 pm

I have found that Bing offers a REST protocol for getting Traffic information. Could this be developed into an app that can track traffic? (http://msdn.microsoft.com/en-us/library/hh441725)

I used to use the customizable RSS feeds from Traffic.com, but since they merged with Here.com, those RSS feeds no longer work. And the wife REALLY wants it, so it is up to me to figure out if there is anyway to create this.

Thank you

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Traffic Data

Postby CinemarDave » Sat Nov 09, 2013 3:37 pm

It would be possible to write a nice little app wrapping this api. I can put it on the list.

User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Re: Traffic Data

Postby albright_family » Sat Nov 09, 2013 4:35 pm

Also have a nice API for Mapquest that can send out information in both XML or JSON format. http://www.mapquestapi.com/traffic/

It also utilizes universal event codes: Which are best explained and cataloged here: http://natwg.itsa.wikispaces.net/ALERT-C+Codes+Project

This shows an example of what information it can pull (this is using my personal key for near my house): http://www.mapquestapi.com/traffic/v2/i ... Format=xml

This could make a real good replacement for the now gone traffic.com RSS feed. (If it could be used.)

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Re: Traffic Data

Postby ronsatter » Sat Nov 09, 2013 5:23 pm

I'm still able to use traffic.com for the San Francisco Bay Area rss feed.

http://cityrss.traffic.com/feeds/rss_sanfrancisco

Could it be that the feed for your area has been discontinued?

I still use my original method for parsing the feed info to give me color-coded signal alerts "JAM FACTOR" and "INCIDENTS". You can find the "How To" in the forum.

In addition to the rss feed info from traffic.com ... I discovered I could "lift" a portion of an ajax script which puts a list of SF Bay Area real-time updates in a web page ... which I re-size and add as a dynamic web object with the Designer. The ajax script advances the info every ten seconds or so ... the source url and ajax script come from "Beat The Traffic".

Here's a screen shot of my current traffic page which combines local traffic cameras, traffic.com rss feed data, beatthetraffic.com sensor data and a Google Traffic Map overlay.
Image1.png

Image2.png


This is a bit overkill for most folks, but in the SF Bay Area ... it's a lifesaver!

Ron
You do not have the required permissions to view the files attached to this post.
If it ain't broke ... don't fix it!

User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Re: Traffic Data

Postby albright_family » Sat Nov 09, 2013 8:59 pm

Ok, so I took the RSS Feed that you provided (http://cityrss.traffic.com/feeds/rss_sanfrancisco) and changed it to http://cityrss.traffic.com/feeds/rss_seattle, and I am getting a feed from them. SO YEAH FOR THAT!!

Could you please send me the information on how you set up the BeatTheTraffic.com information, I like that interface and I am sure the wife will love it too.

User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Re: Traffic Data

Postby albright_family » Mon Nov 18, 2013 10:42 am

albright_family wrote:Ok, so I took the RSS Feed that you provided (http://cityrss.traffic.com/feeds/rss_sanfrancisco) and changed it to http://cityrss.traffic.com/feeds/rss_seattle, and I am getting a feed from them. SO YEAH FOR THAT!!

Could you please send me the information on how you set up the BeatTheTraffic.com information, I like that interface and I am sure the wife will love it too.


Well so I am getting data still from the above link, but nothing actionable. What I mean by that is that for me it does not change at all. At 11pm at night, when I am showing clear roads with Google's Traffic, my rss feed is still showing a Jam Factor of 4. Are you sure you are getting accurate data on yours? I just looked at its RSS feed, and there was not a single incident in the whole list, usually by this time, there should be at least 5 or 6 incidents spread across the bay area.

This is weird, so I think I may have to go back to my request on how to process the XML response from mapquest or Bing. Dang, because I really liked the RSS feed approach.

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Re: Traffic Data

Postby ronsatter » Sat Nov 23, 2013 7:21 pm

Unfortunately, Traffic.com was bought up by Nokia they have redirected all users to their new (but not improved) website: Here.com. The site design forces you to build "collections" of saved routes to access any real-time data. Marginal at best ... nowhere close to the data provided by Traffic.com. In addition, you have to setup a user account with Nokia, which exposes you to a global tidal wave of 3rd party solicitations ... and it is difficult to delete your account!

There are optional real-time traffic sources available:

SigAlert.com and BeatTheTraffic.com are my favorites. With a bit of snooping in the browser html of these sites, it is possible to capture some real-time widget data to the Designer "Web Page" object and place it on your scenes. This is how I display the data on my traffic scenes.

There may be some undiscovered RSS feeds with real-time data lurking out there that can replace Traffic.com ... I have not found any.

Ron
If it ain't broke ... don't fix it!

User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Re: Traffic Data

Postby albright_family » Fri Apr 04, 2014 11:34 pm

Ron:

I am in the process of upgrading to a new server, and started going through my old punch lists for things that needed done (that were never done to my satisfaction), and the traffic RSS feed is one thing that was still on that list. Did your RSS feed for Traffic.com stop working? I went to test the link you posted and wasn't getting any information for either Seattle or San Franscisco. For the longest while I just disabled it off of my home screen and ignored it, now with everything else I would like to get something working on it.

Thank you for any help that you can offer.
Russell

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Re: Traffic Data

Postby ronsatter » Sat Apr 05, 2014 1:47 pm

Russel,

Easily obtained local traffic meta data like drive times and real time reporting is becoming more difficult. None of the old traffic links from my original posts from pre-web designer days work now. I would check out beatthetraffic.com for sure. That's how I get my current data. Refer to my last entry in this thread.

Sometimes local TV station websites will use Beat The Traffic widgets on their traffic web pages. You may find something similar to my widget above (left side), but with your local Seattle info. If you are that lucky, then it may be possible to get a url link to the dynamic widget. The widget url can then be loaded into a ML Web Page object and displayed. The url allows some params so you can set the number of items displayed and the display time.

If you find a local widget and need help ... give a holler.

Ron
If it ain't broke ... don't fix it!

User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Re: Traffic Data

Postby albright_family » Sat Apr 05, 2014 4:01 pm

Hollar!! :)

Well I found some really good data being delivered by King5 news they have added (or have had for some time, I am not sure) JAM FACTOR ratings using a web applet. So I set my home page WebLobby window designed for traffic to go to: http://king5tv.net/m/traffic/jamfactor/allRoutes.php which listed the bad traffic in the general area.

A little more digging gave me this little nugget:
http://king5tv.net/m/traffic/drivetimes ... php?id=125

Which uses a ID grab through this command line:
http://www.wsdot.wa.gov/Traffic/api/Tra ... TimeId=125

Which then gives me data from Washington State Dept of Transportation website generating the following XML file:
<TravelTimeRoute xmlns="http://schemas.datacontract.org/2004/07/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<AverageTime>9</AverageTime>
<CurrentTime>10</CurrentTime>
<Description>
M St. in Tacoma To NB I-5 @ Pierce King County Line
</Description>
<Distance>6.61</Distance>
<EndPoint>
<Description>I-5 @ Pierce King County Line</Description>
<Direction>N</Direction>
<Latitude>47.255624000</Latitude>
<Longitude>-122.331130000</Longitude>
<MilePost>139.41</MilePost>
<RoadName>I-5</RoadName>
</EndPoint>
<Name>NB I-5,Tacoma To Pierce King County Line</Name>
<StartPoint>
<Description>I-5 @ M St. in Tacoma</Description>
<Direction>N</Direction>
<Latitude>47.229950000</Latitude>
<Longitude>-122.442040000</Longitude>
<MilePost>132.80</MilePost>
<RoadName>I-5</RoadName>
</StartPoint>
<TimeUpdated>2014-04-05T13:55:00</TimeUpdated>
<TravelTimeID>125</TravelTimeID>
</TravelTimeRoute>

Now is there a way to process this XML data to display the following information from the above XML file:
Description
AverageTime
CurrentTime
Distance

Thank you

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Re: Traffic Data

Postby ronsatter » Sat Apr 05, 2014 8:02 pm

I looked at the KING5 Traffic link. I looks great. Appears to contain all the info in the xml data file.

If you still want to display the wsdot.wa.gov xml data in an ML web page, I believe you need to create a styles sheet for font, graphics, colors etc. Maybe Dave or others can help you there. HTML5 is not my strength.

My displays use an ajax script package created by BeatTheTraffic.com. I don't need to modify it at all, except for number of items to display and display time interval.

Ron
If it ain't broke ... don't fix it!

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Re: Traffic Data

Postby ronsatter » Fri Apr 11, 2014 11:29 pm

Hi Russell,

I poked around on the KING5 TV website and found this url:

http://king5tv.net/m/traffic/drivetimes/web_iframe.php

It looks like this on my scene:
Seattle Traffic.png


If you put this url in the ML web page object, it is completely self-contained and interactive. You can select different areas at the botton to reveal different maps and drive times. Looks much better than what I have available in San Francisco :D

Hope this helps

Ron
You do not have the required permissions to view the files attached to this post.
If it ain't broke ... don't fix it!

User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Re: Traffic Data

Postby albright_family » Sat Apr 12, 2014 1:02 am

Oh that is PERFECT. THANK YOU!! Now I just need to work on normalizing my server's hardware so that I can set that up. Thank you for your time and help on this. Hopefully something like this comes about for you in the bay area.

Russell


Return to “MainLobby Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest