|
1 | 1 | # TravelTime/Google comparison tool
|
2 | 2 |
|
3 |
| -This tool compares the travel times obtained from [TravelTime Routes API](https://docs.traveltime.com/api/reference/routes) |
4 |
| -and [Google Maps Directions API](https://developers.google.com/maps/documentation/directions/get-directions). |
| 3 | +This tool compares the travel times obtained from [TravelTime Routes API](https://docs.traveltime.com/api/reference/routes), |
| 4 | +[Google Maps Directions API](https://developers.google.com/maps/documentation/directions/get-directions), |
| 5 | +and [TomTom Routing API](https://developer.tomtom.com/routing-api/documentation/tomtom-maps/routing-service). |
5 | 6 | Source code is available on [GitHub](https://github.com/traveltime-dev/traveltime-google-comparison).
|
6 | 7 |
|
7 | 8 | ## Features
|
8 | 9 |
|
9 |
| -- Get travel times from TravelTime API and Google Maps API in parallel, for provided origin/destination pairs and a set |
| 10 | +- Get travel times from TravelTime API, Google Maps API and TomTom API in parallel, for provided origin/destination pairs and a set |
10 | 11 | of departure times.
|
11 | 12 | - Departure times are calculated based on user provided start time, end time and interval.
|
12 | 13 | - Analyze the differences between the results and print out the average error percentage.
|
@@ -40,6 +41,12 @@ For Google Maps API:
|
40 | 41 | export GOOGLE_API_KEY=[Your Google Maps API Key]
|
41 | 42 | ```
|
42 | 43 |
|
| 44 | +For TomTom API: |
| 45 | + |
| 46 | +```bash |
| 47 | +export TOMTOM_API_KEY=[Your TomTom API Key] |
| 48 | +``` |
| 49 | + |
43 | 50 | For TravelTime API:
|
44 | 51 | ```bash
|
45 | 52 | export TRAVELTIME_APP_ID=[Your TravelTime App ID]
|
@@ -76,7 +83,9 @@ Required arguments:
|
76 | 83 |
|
77 | 84 |
|
78 | 85 | Optional arguments:
|
79 |
| -- `--google-max-rpm [int]`: Set max number of parallel requests sent to Google API per minute. Default is 60. |
| 86 | +- `--google-max-rpm [int]`: Set max number of parallel requests sent to Google API per minute. Default is 60. |
| 87 | + It is enforced on per-second basis, to avoid bursts. |
| 88 | +- `--tomtom-max-rpm [int]`: Set max number of parallel requests sent to TomTom API per minute. Default is 60. |
80 | 89 | It is enforced on per-second basis, to avoid bursts.
|
81 | 90 | - `--traveltime-max-rpm [int]`: Set max number of parallel requests sent to TravelTime API per minute. Default is 60.
|
82 | 91 | It is enforced on per-second basis, to avoid bursts.
|
@@ -106,13 +115,13 @@ The output file will contain the `origin` and `destination` columns from input f
|
106 | 115 |
|
107 | 116 | ### Sample output
|
108 | 117 | ```csv
|
109 |
| -origin,destination,departure_time,google_travel_time,tt_travel_time,error_percentage |
110 |
| -"52.1849867903527, 0.1809343829904072","52.202817030086266, 0.10935651695330152",2024-05-28 06:00:00+0100,718.0,1050.0,46 |
111 |
| -"52.1849867903527, 0.1809343829904072","52.202817030086266, 0.10935651695330152",2024-05-28 09:00:00+0100,1427.0,1262.0,11 |
112 |
| -"52.1849867903527, 0.1809343829904072","52.202817030086266, 0.10935651695330152",2024-05-28 12:00:00+0100,1064.0,1165.0,9 |
113 |
| -"52.1849867903527, 0.1809343829904072","52.202817030086266, 0.10935651695330152",2024-05-28 15:00:00+0100,1240.0,1287.0,3 |
114 |
| -"52.1849867903527, 0.1809343829904072","52.202817030086266, 0.10935651695330152",2024-05-28 18:00:00+0100,1312.0,1223.0,6 |
115 |
| -"52.18553917820687, 0.12702050752253252","52.22715259892737, 0.14811674226050345",2024-05-28 06:00:00+0100,749.0,903.0,20 |
| 118 | +origin,destination,departure_time,google_travel_time,tomtom_travel_time,tt_travel_time,error_percentage_google,error_percentage_tomtom |
| 119 | +"50.077012199999984, -5.2234787","50.184134100000726, -5.593753699999999",2024-09-20 07:00:00+0100,2276.0,2388.0,2071.0,9,13 |
| 120 | +"50.077012199999984, -5.2234787","50.184134100000726, -5.593753699999999",2024-09-20 10:00:00+0100,2702.0,2578.0,2015.0,25,21 |
| 121 | +"50.077012199999984, -5.2234787","50.184134100000726, -5.593753699999999",2024-09-20 13:00:00+0100,2622.0,2585.0,2015.0,23,22 |
| 122 | +"50.077012199999984, -5.2234787","50.184134100000726, -5.593753699999999",2024-09-20 16:00:00+0100,2607.0,2596.0,2130.0,18,17 |
| 123 | +"50.077012199999984, -5.2234787","50.184134100000726, -5.593753699999999",2024-09-20 19:00:00+0100,2398.0,2431.0,1960.0,18,19 |
| 124 | +"50.09814150000003, -5.2586104000000065","50.2165765000003, -5.4758540000000036",2024-09-20 07:00:00+0100,2175.0,2357.0,1861.0,14,21 |
116 | 125 | ```
|
117 | 126 |
|
118 | 127 | ## License
|
|
0 commit comments