Skip to content

Commit

Permalink
Merge pull request #1134 from cal-itp/ah_gtfs_portfolio
Browse files Browse the repository at this point in the history
Gtfs portfolio
  • Loading branch information
amandaha8 authored Jun 7, 2024
2 parents 56e8bc0 + 6a3f8fd commit 118b3f4
Show file tree
Hide file tree
Showing 262 changed files with 11,021 additions and 4,012 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ build_ntd_report:

build_gtfs_digest:
$(eval export site = gtfs_digest)
#cd rt_segment_speeds / && pip install -r requirements.txt && pip install altair_transform && cd ../_shared_utils && make setup_env && cd ..
#cd data-analyses/rt_segment_speeds && pip install altair_transform && pip install -r requirements.txt && cd ../_shared_utils && make setup_env && pip install -U altair
#cd gtfs_digest/ && python deploy_portfolio_yaml.py && cd ..
make build_portfolio_site

Expand Down
41 changes: 30 additions & 11 deletions gtfs_digest/03_report.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"outputs": [],
"source": [
"# Comment out and leave this cell right below pandas\n",
"# organization_name = \"City of Lawndale\""
"# organization_name = \"Alameda-Contra Costa Transit District\"\n",
"# organization_name = \"City of Rio Vista\""
]
},
{
Expand Down Expand Up @@ -141,8 +142,11 @@
"outputs": [],
"source": [
"# Datasets for Section 2\n",
"sched_vp_df = section2.load_schedule_vp_metrics(organization_name)\n",
"gtfs_schedule_keys = list(sched_vp_df.schedule_gtfs_dataset_key.unique())"
"try:\n",
" sched_vp_df = section2.load_schedule_vp_metrics(organization_name)\n",
" gtfs_schedule_keys = list(sched_vp_df.schedule_gtfs_dataset_key.unique())\n",
"except:\n",
" pass"
]
},
{
Expand Down Expand Up @@ -449,11 +453,15 @@
"metadata": {},
"outputs": [],
"source": [
"section1.create_service_hour_chart(\n",
"try:\n",
" display(section1.create_service_hour_chart(\n",
" scheduled_service,\n",
" \"Weekday\",\n",
" \"weekday_service_hours\"\n",
")"
" \"weekday_service_hours\",\n",
" readable_dict[\"daily_scheduled_hour\"][\"subtitle\"])\n",
" )\n",
"except:\n",
" pass"
]
},
{
Expand All @@ -463,11 +471,15 @@
"metadata": {},
"outputs": [],
"source": [
"section1.create_service_hour_chart(\n",
"try:\n",
" display(section1.create_service_hour_chart(\n",
" scheduled_service,\n",
" \"Saturday\",\n",
" \"weekend_service_hours\",\n",
")"
" \"\"\n",
" ))\n",
"except:\n",
" pass"
]
},
{
Expand All @@ -477,11 +489,15 @@
"metadata": {},
"outputs": [],
"source": [
"section1.create_service_hour_chart(\n",
"try:\n",
" display(section1.create_service_hour_chart(\n",
" scheduled_service,\n",
" \"Sunday\",\n",
" \"weekend_service_hours\",\n",
")"
" \"\"\n",
" ))\n",
"except:\n",
" pass"
]
},
{
Expand All @@ -499,7 +515,10 @@
"metadata": {},
"outputs": [],
"source": [
"section2.filtered_route(sched_vp_df)"
"try:\n",
" display(section2.filtered_route(sched_vp_df))\n",
"except:\n",
" display(Markdown(f\"\"\"{organization_name} only has schedule data.\"\"\"))"
]
}
],
Expand Down
Loading

0 comments on commit 118b3f4

Please sign in to comment.