Open nikolayilyin opened 3 years ago
an example of how to read all accumulated results using https://colab.research.google.com:
s3urls = """ https://s3.us-east-2.amazonaws.com/beam-outputs/index.html#output/sfbay/sfbay-smart-activitysim-120k-flowcap-0.01__2021-06-02_22-21-30_hff https://s3.us-east-2.amazonaws.com/beam-outputs/index.html#output/sfbay/sfbay-smart-activitysim-120k-flowcap-0.04__2021-06-02_22-21-30_alb https://s3.us-east-2.amazonaws.com/beam-outputs/index.html#output/sfbay/sfbay-smart-activitysim-120k-flowcap-0.03__2021-06-03_10-32-56_ekb https://s3.us-east-2.amazonaws.com/beam-outputs/index.html#output/sfbay/sfbay-smart-activitysim-120k-flowcap-0.02__2021-06-03_10-32-56_jrd https://s3.us-east-2.amazonaws.com/beam-outputs/index.html#output/sfbay/sfbay-smart-activitysim-120k-flowcap-0.04__2021-06-04_10-00-58_ndl https://s3.us-east-2.amazonaws.com/beam-outputs/index.html#output/sfbay/sfbay-smart-activitysim-240k-flowcap-0.04__2021-06-04_10-00-58_cyu https://s3.us-east-2.amazonaws.com/beam-outputs/index.html#output/sfbay/sfbay-smart-activitysim-240k-flowcap-0.05__2021-06-04_10-00-59_euq https://s3.us-east-2.amazonaws.com/beam-outputs/index.html#output/sfbay/sfbay-smart-activitysim-120k-flowcap-0.04-with-overwriteRoadTypeProperties__2021-06-05_17-54-41_dlz https://s3.us-east-2.amazonaws.com/beam-outputs/index.html#output/sfbay/sfbay-smart-activitysim-120k-flowcap-0.04-with-overwriteRoadTypeProperties__2021-06-06_13-46-54_uzv""".split('\n')
google_tt_list = []
for s3url in s3urls: iteration = 5 s3path = get_output_path_from_s3_url(s3url) google_tt = pd.read_csv(s3path + "/ITERS/it.{0}/{0}.googleTravelTimeEstimation.csv".format(iteration)) google_tt_list.append(google_tt[(google_tt['departureTime'] < 24 60 60) & (google_tt['googleTravelTime'] > 0) & (google_tt['simTravelTime'] > 0)])
google_tt = pd.concat(google_tt_list)
we have almost finished work on Google API DB here - #2904
Subtasks:
When google speed comparison for simulation is turned on, then during simulation BEAM is doing requests to google API. The requests contain origin and destination X and Y coordinates and the time of the day. The responses contain travel time and distance. Requests, responses, and BEAM simulation travel time and distance are stored in ITERS/X.it/X.googleTravelTimeEstimation.csv file. For each city, during speed calibration, we accumulate a number of these files.
We need a way to reuse these files for rough speed calibration of the same city.
A possible approach is the following: