Skip to content

Commit

Permalink
merge in deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate-Wessel committed May 10, 2024
2 parents 0e3b474 + 36a9c96 commit da4c966
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ The app can return results in either CSV or JSON format. The fields in either ca
| `daysOfWeek` | Text description of the days of week included in the query. |
| `holidaysIncluded` | Boolean, indicating if statutory holidays where (True) or were not (False) included in the query. |
| `hoursInRange` | The total number of hours that are theoretically within the scope of the query's various parameters. This does not imply that data is/was available at all times. It's possible to construct requests with zero hours in range such as e.g `2023-01-01` to `2023-01-02`, Mondays only (There's only one Sunday in that range). Impossible combinations are included in the output for clarity and completeness but are not actually executed against the API and should return an error. |
| `estimatedVehicleCount` | Deprecated. A very rough estimate of the number of observed probe vehicles operating within the given corridor and temporal bounds. This is NOT an estimate of traffic volume. Includes partial trips through the corridor and may be subject to additional caveats which we are still exploring. This is calculated as the total amount of time vehicles spent travelling along the selected links divided by the mean travel time. |
| `mean_travel_time_minutes` | The mean travel time in minutes is given as a floating point number rounded to two decimal places. Where insufficient data was available to complete the request, the value will be null, and in cases where the request was impossible a value of -999 will be assigned. (See `hoursInRange`). |
| `mean_travel_time_seconds` | Same as above, but measured in seconds. |

Expand Down
1 change: 1 addition & 0 deletions backend/app/get_travel_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def get_travel_time(start_node, end_node, start_time, end_time, start_date, end_
# get the hourly travel times
cursor.execute(hourly_tt_query, query_params)
sample = cursor.fetchall()

connection.close()
tt_hourly = [ tt for (dt,tt) in sample ]

Expand Down
3 changes: 1 addition & 2 deletions frontend/src/travelTimeQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export class TravelTimeQuery {
#days
#holidayOption
#travelTime
#estimatedSample
constructor({corridor,timeRange,dateRange,days,holidayOption}){
this.#corridor = corridor
this.#timeRange = timeRange
Expand Down Expand Up @@ -39,7 +38,7 @@ export class TravelTimeQuery {
}
return fetch(this.URI)
.then( response => response.json() )
.then( data => this.#travelTime = data.travel_time )
.then( data => this.#travelTime = data.results.travel_time )
}
get hasData(){
return Boolean(this.#travelTime)
Expand Down

0 comments on commit da4c966

Please sign in to comment.