Skip to content

Commit

Permalink
Merge pull request #1259 from cal-itp/ah_gtfs
Browse files Browse the repository at this point in the history
Aggregating Metrics on the Operator Grain
  • Loading branch information
amandaha8 authored Oct 17, 2024
2 parents 88dc904 + 9ffcb33 commit 3369dd9
Show file tree
Hide file tree
Showing 13 changed files with 1,838 additions and 1,799 deletions.
1 change: 1 addition & 0 deletions _shared_utils/shared_utils/gtfs_analytics_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ digest_tables:
operator_profiles: "digest/operator_profiles"
operator_routes_map: "digest/operator_routes"
operator_sched_rt: "digest/operator_schedule_rt_category"
operator_metrics: "digest/operator_metrics"
scheduled_service_hours: "digest/total_scheduled_service_hours"

stop_segments:
Expand Down
122 changes: 68 additions & 54 deletions gtfs_digest/03_report.ipynb

Large diffs are not rendered by default.

734 changes: 606 additions & 128 deletions gtfs_digest/33_agg_by_agency_portfolio.ipynb

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions gtfs_digest/35_agg_by_agency2.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "2682013d-2d46-4584-a421-38b4f9fe9a13",
"metadata": {},
"source": [
"## Use `vp_trips as the jumping off point`"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "49127032-4559-415b-b7c9-9d3fb9e8c50c",
"metadata": {},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'shared_utils'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01m_aggregate_agency\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01m_report_utils\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01m_section1_utils\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01msection1\u001b[39;00m\n",
"File \u001b[0;32m~/data-analyses/gtfs_digest/_aggregate_agency.py:1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01m_operators_prep\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mgeopandas\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mgpd\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mpd\u001b[39;00m\n",
"File \u001b[0;32m~/data-analyses/gtfs_digest/_operators_prep.py:1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mshared_utils\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m catalog_utils\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mpd\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01myaml\u001b[39;00m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'shared_utils'"
]
}
],
"source": [
"import _aggregate_agency\n",
"import _report_utils\n",
"import _section1_utils as section1\n",
"import _section2_utils as section2\n",
"import geopandas as gpd\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "993d3d22-1fd2-46c2-a288-85cd5c0021fa",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit 3369dd9

Please sign in to comment.