Skip to content

Commit bc83950

Browse files
author
tiffanychu90
committed
move changes from district report into script
1 parent 4267a41 commit bc83950

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

gtfs_digest/merge_operator_data.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from calitp_data_analysis import utils
1010
from segment_speed_utils import time_series_utils
11-
from shared_utils import publish_utils
11+
from shared_utils import gtfs_utils_v2, publish_utils
1212
from merge_data import merge_in_standardized_route_names
1313
from update_vars import GTFS_DATA_DICT, SCHED_GCS, RT_SCHED_GCS
1414

@@ -120,6 +120,7 @@ def operator_category_counts_by_date() -> pd.DataFrame:
120120

121121
ntd_cols = [
122122
"schedule_gtfs_dataset_key",
123+
"caltrans_district",
123124
"counties_served",
124125
"service_area_sq_miles",
125126
"hq_city",
@@ -153,13 +154,14 @@ def operator_category_counts_by_date() -> pd.DataFrame:
153154
)
154155

155156
# Drop duplicates created after merging
156-
op_profiles_df2 = (op_profiles_df1
157-
.pipe(
158-
publish_utils.exclude_private_datasets,
159-
col = "schedule_gtfs_dataset_key",
160-
public_gtfs_dataset_keys = public_feeds
161-
).drop_duplicates(subset = list(op_profiles_df1.columns))
162-
.reset_index(drop = True))
157+
op_profiles_df2 = (
158+
op_profiles_df1
159+
.pipe(
160+
publish_utils.exclude_private_datasets,
161+
col = "schedule_gtfs_dataset_key",
162+
public_gtfs_dataset_keys = public_feeds
163+
).drop_duplicates(subset = list(op_profiles_df1.columns))
164+
.reset_index(drop = True))
163165

164166
op_profiles_df2.to_parquet(
165167
f"{RT_SCHED_GCS}{OPERATOR_PROFILE}.parquet"

0 commit comments

Comments
 (0)