Add more Travel IQ dot cam states

This commit is contained in:
Chandler Swift 2024-02-03 03:01:05 -06:00
parent c125525413
commit 8f5803b5bc
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F
2 changed files with 76 additions and 68 deletions

View file

@ -5,64 +5,71 @@ Many states are through one of a few providers:
* Castle Rock: https://www.castlerockits.com/oneweb
* IBI Travel IQ: https://www.ibigroup.com/ibi-products/traveliq/
| State | DOT Name[^name] | Online Service Name | Still | Video | Web provider | Link |
| ----- | --------------- | ------------------- | ----- | ----- | ------------ | ------------------------------- |
| AK | DOT&PF | Alaska 511 | 111 | 0 | Travel IQ | https://511.alaska.gov/ |
| AL | ALDOT | algotraffic | 0 | 568 | custom | https://algotraffic.com/cameras |
| AR | ARDOT | | | | | |
| AZ | ADOT | | | | | |
| CA | Caltrans | | | | | |
| CO | CDOT | COtrip | 832 | 686 | Castle Rock | https://maps.cotrip.org/ |
| CT | CTDOT | | | | | |
| DE | DelDOT | | | | | |
| FL | FDOT | | | | | |
| GA | GDOT | 511GA | 1 | 3416 | Travel IQ | https://511ga.org/ |
| HI | HDOT | | | | | |
| IA | Iowa DOT | 511IA | 446 | 485 | Castle Rock | https://511ia.org/ |
| ID | ITD | | | | | |
| IL | IDOT | | | | | |
| IN | IDOT | TrafficWise | 0 | 640 | Castle Rock | https://511in.org/ |
| KS | KDOT | KanDrive | 382 | 167 | Castle Rock | https://www.kandrive.gov/ |
| KY | KYTC | | | | | |
| LA | DOTD | 511 | 0 | 288 | Travel IQ | https://www.511la.org/ |
| MA | MassDOT | Mass511 | 20 | 225 | Castle Rock | https://mass511.com/ |
| MD | MDOT | | | | | |
| ME | MaineDOT | | | | | |
| MI | MDOT | | | | | |
| MN | MNDOT | 511MN | 647 | 1131 | Castle Rock | https://511mn.org/ |
| MO | MoDOT | | | | | https://traveler.modot.org/map/ |
| MS | MDOT | | | | | |
| MT | MDT | | | | | |
| NC | NCDOT | | | | | |
| ND | NDDOT | | | | | |
| NE | NDOT | Nebraska 511 | 919 | 0 | Castle Rock | https://new.511.nebraska.gov/ |
| NH | NHDOT | | | | | |
| NJ | NJDOT | | | | | |
| NM | NMDOT | | | | | |
| NV | NDOT | Nevada 511 | 0 | 606 | Travel IQ | https://www.nvroads.com/ |
| NY | NYSDOT | 511NY | 369 | 1272 | Travel IQ | https://www.511ny.org/ |
| OH | ODOT | | | | | |
| OK | ODOT | | | | | |
| OR | ODOT | | | | | |
| PA | PennDOT | | | | | |
| RI | RIDOT | | | | | |
| SC | SCDOT | | | | | |
| SD | SDDOT | | | | | |
| TN | TDOT | | | | | |
| TX | TxDOT | | | | | |
| UT | UDOT | | | | | |
| VA | VDOT | | | | | |
| VT | VTrans | | | | | |
| WA | WSDOT | | | | | |
| WI | WisDOT | 511WI | 0 | 468 | Travel IQ | https://511wi.gov/ |
| WV | WVDOT | | | | | |
| WY | WYDOT | | | | | |
### State list
| State | DOT Name[^name] | Online Service Name | Still | Video | Web provider | Link |
| ----- | --------------- | ------------------- | ----- | ----- | ------------ | --------------------------------- |
| AK | DOT&PF | Alaska 511 | 111 | 0 | Travel IQ | https://511.alaska.gov/ |
| AL | ALDOT | algotraffic | 0 | 568 | custom | https://algotraffic.com/cameras |
| AR | ARDOT | | | | | |
| AZ | ADOT | AZ511 | 602 | 0 | Travel IQ | https://az511.com/ |
| CA | Caltrans | | | | | |
| CO | CDOT | COtrip | 832 | 686 | Castle Rock | https://maps.cotrip.org/ |
| CT | CTDOT | CTroads | 350 | 0 | Travel IQ | https://ctroads.org/ |
| DE | DelDOT | | | | | |
| FL | FDOT | | | | | |
| GA | GDOT | 511GA | 1 | 3416 | Travel IQ | https://511ga.org/ |
| HI | HDOT | | | | | |
| IA | Iowa DOT | 511IA | 446 | 485 | Castle Rock | https://511ia.org/ |
| ID | ITD | Idaho 511 | 274 | 0 | Travel IQ | https://511.idaho.gov/ |
| IL | IDOT | | | | | |
| IN | IDOT | TrafficWise | 0 | 640 | Castle Rock | https://511in.org/ |
| KS | KDOT | KanDrive | 382 | 167 | Castle Rock | https://www.kandrive.gov/ |
| KY | KYTC | | | | | |
| LA | DOTD | 511 | 0 | 288 | Travel IQ | https://www.511la.org/ |
| MA | MassDOT | Mass511 | 20 | 225 | Castle Rock | https://mass511.com/ |
| MD | MDOT | | | | | |
| ME | MaineDOT | | | | | |
| MI | MDOT | | | | | |
| MN | MNDOT | 511MN | 647 | 1131 | Castle Rock | https://511mn.org/ |
| MO | MoDOT | | | | | https://traveler.modot.org/map/ |
| MS | MDOT | | | | | |
| MT | MDT | | | | | |
| NC | NCDOT | | | | | |
| ND | NDDOT | | | | | |
| NE | NDOT | Nebraska 511 | 919 | 0 | Castle Rock | https://new.511.nebraska.gov/ |
| NH | NHDOT | | | | | |
| NJ | NJDOT | | | | | |
| NM | NMDOT | | | | | |
| NV | NDOT | Nevada 511 | 0 | 606 | Travel IQ | https://www.nvroads.com/ |
| NY | NYSDOT | 511NY | 369 | 1272 | Travel IQ | https://www.511ny.org/ |
| OH | ODOT | | | | | |
| OK | ODOT | | | | | |
| OR | ODOT | | | | | |
| PA | PennDOT | | | | | |
| RI | RIDOT | | | | | |
| SC | SCDOT | | | | | |
| SD | SDDOT | | | | | |
| TN | TDOT | | | | | |
| TX | TxDOT | | | | | |
| UT | UDOT | UDOT Traffic | 0 | 1787 | Travel IQ | https://www.udottraffic.utah.gov/ |
| VA | VDOT | | | | | |
| VT | VTrans | | | | | |
| WA | WSDOT | | | | | |
| WI | WisDOT | 511WI | 0 | 468 | Travel IQ | https://511wi.gov/ |
| WV | WVDOT | | | | | |
| WY | WYDOT | | | | | |
[^name]: From https://en.wikipedia.org/wiki/Department_of_transportation#List_of_U.S._state_and_insular_area_departments_of_transportation
### Non-State aligned
* New England 511 (https://newengland511.org/) consolidates Maine, New Hampshire, and Vermont into one site (341 photo/0 video/Travel IQ)
### Notes
https://map.wyoroad.info/wtimap/index.html
@ -128,14 +135,5 @@ https://dot.ca.gov/programs/traffic-operations/traveler-information/511
"rr": "https://riverregion511.org" castlerock
No video, only photos ??
"ak": "https://511.alaska.gov/",
"az": "https://az511.com/",
"ct": "https://ctroads.org/",
"new england": "https://newengland511.org/",
"id": "https://511.idaho.gov/",
"ut": "https://www.udottraffic.utah.gov/",
Some kind of signature needed:
"fl": "https://fl511.com/",

View file

@ -5,10 +5,15 @@ import json
states = {
"Alaska": "https://511.alaska.gov/",
"Arizona": "https://az511.com/",
"Connecticut": "https://ctroads.org/",
"Georgia": "https://511ga.org/",
"Idaho": "https://511.idaho.gov/",
"Louisiana": "https://www.511la.org/",
"Nevada": "https://www.nvroads.com/",
"NewEngland": "https://newengland511.org/",
"NewYork": "https://www.511ny.org/",
"Utah": "https://www.udottraffic.utah.gov/",
"Wisconsin": "https://511wi.gov/"
}
@ -54,18 +59,23 @@ for state, baseURL in states.items():
available_cameras = 999_999 # lots
while len(cameras) < available_cameras:
res = requests.get(f"{baseURL}/List/GetData/Cameras", {
"query": json.dumps(query),
"lang": "en",
})
if state == "Connecticut":
# gotta be a special snowflake I guess?
res = requests.post(f"{baseURL}/List/GetData/Cameras", json={"draw":1,"columns":[{"data":"sortId","name":"sortId","searchable":True,"orderable":True,"search":{"value":"","regex":False}},{"data":"cityName","name":"cityName","searchable":True,"orderable":True,"search":{"value":"","regex":False}},{"data":"roadway","name":"roadway","searchable":True,"orderable":True,"search":{"value":"","regex":False}},{"data":"sortIdDisplay","name":"sortIdDisplay","searchable":True,"orderable":True,"search":{"value":"","regex":False}},{"data":"description1","name":"description1","searchable":False,"orderable":True,"search":{"value":"","regex":False}},{"data":"direction","name":"direction","searchable":False,"orderable":False,"search":{"value":"","regex":False}},{"data":6,"name":"","searchable":False,"orderable":False,"search":{"value":"","regex":False}}],"order":[{"column":0,"dir":"asc"},{"column":1,"dir":"asc"}],"start":0,"length":10,"search":{"value":"","regex":False}})
else:
res = requests.get(f"{baseURL}/List/GetData/Cameras", {
"query": json.dumps(query),
"lang": "en",
})
res.raise_for_status()
res = res.json()
available_cameras = res['recordsTotal']
for c in res['data']:
if isinstance(c['videoUrl'], list): # LA returns multiple (identical?) streams
if 'videoUrl' in c and isinstance(c['videoUrl'], list): # LA returns multiple (identical?) streams
src = c['videoUrl'][0]
video_camera_count += 1
elif c['videoUrl']:
elif 'videoUrl' in c and c['videoUrl'] and c['videoUrl'] != '0':
# Yeah, Idaho has a single camera where videoURL = '0'. Nice.
src = c['videoUrl']
video_camera_count += 1
else:
@ -81,7 +91,7 @@ for state, baseURL in states.items():
"properties": {
'name': c['displayName'],
'views': [{
'hasVideo': bool(c['videoUrl']),
'hasVideo': 'videoUrl' in c and bool(c['videoUrl']),
'src': src,
}],
},