Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feb open data #1029

Merged
merged 15 commits into from
Feb 22, 2024
Merged
Prev Previous commit
Next Next commit
change log statement
tiffanychu90 committed Feb 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 88a050bea79a490d7e7a11764a56e9ffccd7ae00
16 changes: 9 additions & 7 deletions gtfs_funnel/logs/vp_preprocessing.log
Original file line number Diff line number Diff line change
@@ -3,10 +3,12 @@
2024-01-27 14:27:17.221 | INFO | __main__:<module>:136 - 2023-11-15: condense vp for trip-direction 0:07:23.319808
2024-01-27 14:39:49.578 | INFO | __main__:<module>:144 - 2023-11-15: prepare vp to use in nearest neighbor: 0:12:32.357147
2024-01-27 14:46:57.364 | INFO | __main__:<module>:136 - 2023-10-11: condense vp for trip-direction 0:07:07.785109
2024-01-27 14:58:58.072 | INFO | __main__:<module>:144 - 2023-10-11: prepare vp to use in nearest neighbor: 0:12:00.7079612024-02-15 09:41:33.748 | INFO | __main__:<module>:169 - 2024-02-14: pare down vp: 0:01:27.651510
2024-02-15 09:44:30.781 | INFO | __main__:attach_prior_vp_add_direction:89 - persist vp gddf: 0:02:42.188876
2024-02-15 09:47:04.578 | INFO | __main__:attach_prior_vp_add_direction:121 - np vectorize arrays for direction: 0:02:33.796804
2024-02-15 09:47:10.531 | INFO | __main__:<module>:193 - 2024-02-14: export vp direction: 0:05:21.938881
2024-02-15 09:48:06.074 | INFO | __main__:<module>:199 - 2024-02-14: export usable vp with direction: 0:00:55.543053
2024-02-15 09:48:06.075 | INFO | __main__:<module>:202 - 2024-02-14: vp_direction script execution time: 0:06:17.481934
2024-02-15 10:01:29.162 | INFO | __main__:<module>:142 - 2024-02-14: condense vp for trip-direction 0:13:09.224619
2024-01-27 14:58:58.072 | INFO | __main__:<module>:144 - 2023-10-11: prepare vp to use in nearest neighbor: 0:12:00.707961
2024-02-15 12:35:27.737 | INFO | __main__:<module>:169 - 2024-02-14: pare down vp: 0:01:27.967360
2024-02-15 12:40:05.610 | INFO | __main__:attach_prior_vp_add_direction:89 - persist vp gddf: 0:02:46.966446
2024-02-15 12:42:39.989 | INFO | __main__:attach_prior_vp_add_direction:121 - np vectorize arrays for direction: 0:02:34.378961
2024-02-15 12:42:45.707 | INFO | __main__:<module>:193 - 2024-02-14: export vp direction: 0:05:27.063384
2024-02-15 12:43:43.624 | INFO | __main__:<module>:199 - 2024-02-14: export usable vp with direction: 0:00:57.917219
2024-02-15 12:43:43.624 | INFO | __main__:<module>:202 - 2024-02-14: vp_direction script execution time: 0:06:24.980603
2024-02-15 12:50:35.377 | INFO | __main__:<module>:142 - 2024-02-14: condense vp for trip-direction 0:06:37.853370
2024-02-15 13:02:43.454 | INFO | __main__:<module>:150 - 2024-02-14: prepare vp to use in nearest neighbor: 0:12:08.077021
22 changes: 8 additions & 14 deletions gtfs_funnel/vp_condenser.py
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@
from calitp_data_analysis import utils
from segment_speed_utils import vp_transform, wrangle_shapes
from segment_speed_utils.project_vars import SEGMENT_GCS
from shared_utils import dask_utils

def condense_vp_to_linestring(
analysis_date: str,
@@ -102,13 +101,8 @@ def prepare_vp_for_all_directions(
for direction in wrangle_shapes.ALL_DIRECTIONS
]

dask_utils.compute_and_export(
dfs,
SEGMENT_GCS,
file_name =f"{EXPORT_FILE}_{analysis_date}",
export_single_parquet = True,
)
'''
results = [compute(i)[0] for i in dfs]

gdf = pd.concat(
results, axis=0, ignore_index=True
).sort_values(
@@ -124,7 +118,7 @@ def prepare_vp_for_all_directions(
)

del gdf
'''

return


@@ -142,13 +136,13 @@ def prepare_vp_for_all_directions(
for analysis_date in analysis_date_list:
start = datetime.datetime.now()

#condense_vp_to_linestring(analysis_date, CONFIG_DICT)
condense_vp_to_linestring(analysis_date, CONFIG_DICT)

time1 = datetime.datetime.now()
#logger.info(
# f"{analysis_date}: condense vp for trip-direction "
# f"{time1 - start}"
#)
logger.info(
f"{analysis_date}: condense vp for trip "
f"{time1 - start}"
)

prepare_vp_for_all_directions(analysis_date, CONFIG_DICT)