Skip to content

Commit

Permalink
Merge branch 'main' into oct-hqta
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffanychu90 authored Oct 30, 2024
2 parents 8a4be84 + 7f7390a commit d84c5b7
Show file tree
Hide file tree
Showing 258 changed files with 28,054 additions and 4,621 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ build_gtfs_digest:
$(eval export site = gtfs_digest)
#cd data-analyses/rt_segment_speeds && pip install -r requirements.txt && cd ../_shared_utils && make setup_env && cd ..
#cd gtfs_digest/ && python deploy_portfolio_yaml.py && make assemble_data && cd ..
cd gtfs_digest/ && python deploy_portfolio_yaml.py
make build_portfolio_site
make git_check_sections

Expand Down
1 change: 1 addition & 0 deletions _shared_utils/shared_utils/rt_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"oct2024d": "2024-10-18",
"oct2024e": "2024-10-19",
"oct2024f": "2024-10-20",
"oct2024g": "2024-10-21", # additional one-off to capture Amtrak in HQTA
}

y2023_dates = [
Expand Down
2 changes: 1 addition & 1 deletion conveyal_update/conveyal_vars.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import datetime as dt

GCS_PATH = 'gs://calitp-analytics-data/data-analyses/conveyal_update/'
TARGET_DATE = dt.date(2023, 10, 18) # '2023-10-18' is most recent in Conveyal for the main 4 regions
TARGET_DATE = dt.date(2022, 9, 21) # 2022 date for SCAG request
OSM_FILE = 'us-west-latest.osm.pbf'
# http://download.geofabrik.de/north-america/us-west-latest.osm.pbf
# first download with wget...
Expand Down
14 changes: 10 additions & 4 deletions conveyal_update/evaluate_feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,22 @@ def attach_transit_services(feeds_on_target: pd.DataFrame):
def report_undefined(feeds_on_target: pd.DataFrame):
fname = 'no_apparent_service.csv'
undefined = feeds_on_target.apply(check_defined_elsewhere, axis=1, args=[feeds_on_target]) >> filter(-_.service_any_feed)
print('these feeds have no service defined on target date, nor are their services captured in other feeds:')
print(undefined >> select(_.gtfs_dataset_name, _.service_any_feed))
print(f'saving detailed csv to {fname}')
undefined.to_csv(fname)
if undefined.empty:
print('no undefined service feeds')
else:
print(undefined.columns)
print('these feeds have no service defined on target date, nor are their services captured in other feeds:')
# gtfs_dataset_name no longer present, this whole script should probably be updated/replaced
# print(undefined >> select(_.gtfs_dataset_name, _.service_any_feed))
print(f'saving detailed csv to {fname}')
undefined.to_csv(fname)
return

if __name__ == '__main__':

feeds_on_target = get_feeds_check_service()
feeds_on_target = attach_transit_services(feeds_on_target)
print(f'feeds on target date shape: {feeds_on_target.shape}')
report_undefined(feeds_on_target)
feeds_on_target.to_parquet(f'{conveyal_vars.GCS_PATH}feeds_{TARGET_DATE.isoformat()}.parquet')

Loading

0 comments on commit d84c5b7

Please sign in to comment.