Skip to content

Commit

Permalink
deployed notebooks and portfolio site
Browse files Browse the repository at this point in the history
  • Loading branch information
csuyat-dot committed Jan 15, 2025
1 parent 836788c commit 6a95144
Show file tree
Hide file tree
Showing 29 changed files with 268 additions and 471 deletions.
500 changes: 144 additions & 356 deletions ntd/TEST_monthly_ridership_report.ipynb

Large diffs are not rendered by default.

114 changes: 57 additions & 57 deletions ntd/monthly_ridership_report.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
" ))\n",
" ).properties(\n",
" title=f\"Total Unlinked Passenger Trips per agency in RTPA since {MIN_YEAR}\",\n",
" #width = WIDTH, \n",
" width = WIDTH, \n",
" height = HEIGHT,\n",
" ).resolve_scale(y=\"independent\").interactive()\n",
" \n",
Expand Down Expand Up @@ -431,9 +431,9 @@
"source": [
"Markdown(f\"\"\"\n",
"Within {rtpa}:\n",
"- Number of Agencies/Operators: <b>{agency_count}</b>.\n",
"- Number of Reporters: <b>{agency_count}</b>.\n",
"- Total Unlinked Passenger Trips since {MIN_YEAR}: <b>{total_upt:,}</b>.\n",
"- Individual agency/operator ridership breakdown:\n",
"- Individual Reporters ridership breakdown:\n",
"\"\"\")"
]
},
Expand All @@ -448,23 +448,23 @@
"text/html": [
"\n",
"<style>\n",
" #altair-viz-1168c1541f4a4aac8fffe9bb34334976.vega-embed {\n",
" #altair-viz-0e1258b93d6e40478aed689b7cf0bc50.vega-embed {\n",
" width: 100%;\n",
" display: flex;\n",
" }\n",
"\n",
" #altair-viz-1168c1541f4a4aac8fffe9bb34334976.vega-embed details,\n",
" #altair-viz-1168c1541f4a4aac8fffe9bb34334976.vega-embed details summary {\n",
" #altair-viz-0e1258b93d6e40478aed689b7cf0bc50.vega-embed details,\n",
" #altair-viz-0e1258b93d6e40478aed689b7cf0bc50.vega-embed details summary {\n",
" position: relative;\n",
" }\n",
"</style>\n",
"<div id=\"altair-viz-1168c1541f4a4aac8fffe9bb34334976\"></div>\n",
"<div id=\"altair-viz-0e1258b93d6e40478aed689b7cf0bc50\"></div>\n",
"<script type=\"text/javascript\">\n",
" var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n",
" (function(spec, embedOpt){\n",
" let outputDiv = document.currentScript.previousElementSibling;\n",
" if (outputDiv.id !== \"altair-viz-1168c1541f4a4aac8fffe9bb34334976\") {\n",
" outputDiv = document.getElementById(\"altair-viz-1168c1541f4a4aac8fffe9bb34334976\");\n",
" if (outputDiv.id !== \"altair-viz-0e1258b93d6e40478aed689b7cf0bc50\") {\n",
" outputDiv = document.getElementById(\"altair-viz-0e1258b93d6e40478aed689b7cf0bc50\");\n",
" }\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm/vega@5?noext\",\n",
Expand Down Expand Up @@ -542,7 +542,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 17,
"id": "c068b244-f4c2-4ae7-9153-d2724ee9f5c2",
"metadata": {},
"outputs": [
Expand All @@ -551,23 +551,23 @@
"text/html": [
"\n",
"<style>\n",
" #altair-viz-2a2e1ac538634868b7cfe44b79d7780f.vega-embed {\n",
" #altair-viz-3d1bb1cb5c3b423ca979a09a6215fa1d.vega-embed {\n",
" width: 100%;\n",
" display: flex;\n",
" }\n",
"\n",
" #altair-viz-2a2e1ac538634868b7cfe44b79d7780f.vega-embed details,\n",
" #altair-viz-2a2e1ac538634868b7cfe44b79d7780f.vega-embed details summary {\n",
" #altair-viz-3d1bb1cb5c3b423ca979a09a6215fa1d.vega-embed details,\n",
" #altair-viz-3d1bb1cb5c3b423ca979a09a6215fa1d.vega-embed details summary {\n",
" position: relative;\n",
" }\n",
"</style>\n",
"<div id=\"altair-viz-2a2e1ac538634868b7cfe44b79d7780f\"></div>\n",
"<div id=\"altair-viz-3d1bb1cb5c3b423ca979a09a6215fa1d\"></div>\n",
"<script type=\"text/javascript\">\n",
" var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n",
" (function(spec, embedOpt){\n",
" let outputDiv = document.currentScript.previousElementSibling;\n",
" if (outputDiv.id !== \"altair-viz-2a2e1ac538634868b7cfe44b79d7780f\") {\n",
" outputDiv = document.getElementById(\"altair-viz-2a2e1ac538634868b7cfe44b79d7780f\");\n",
" if (outputDiv.id !== \"altair-viz-3d1bb1cb5c3b423ca979a09a6215fa1d\") {\n",
" outputDiv = document.getElementById(\"altair-viz-3d1bb1cb5c3b423ca979a09a6215fa1d\");\n",
" }\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm/vega@5?noext\",\n",
Expand Down Expand Up @@ -620,7 +620,7 @@
"alt.FacetChart(...)"
]
},
"execution_count": 18,
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -639,7 +639,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 18,
"id": "24462fe7-2af4-4023-9a88-0cc665ce763a",
"metadata": {},
"outputs": [
Expand All @@ -648,23 +648,23 @@
"text/html": [
"\n",
"<style>\n",
" #altair-viz-d81282967144441087728f19d6e9090c.vega-embed {\n",
" #altair-viz-51a25849cbb346b9b99f7ff7336498df.vega-embed {\n",
" width: 100%;\n",
" display: flex;\n",
" }\n",
"\n",
" #altair-viz-d81282967144441087728f19d6e9090c.vega-embed details,\n",
" #altair-viz-d81282967144441087728f19d6e9090c.vega-embed details summary {\n",
" #altair-viz-51a25849cbb346b9b99f7ff7336498df.vega-embed details,\n",
" #altair-viz-51a25849cbb346b9b99f7ff7336498df.vega-embed details summary {\n",
" position: relative;\n",
" }\n",
"</style>\n",
"<div id=\"altair-viz-d81282967144441087728f19d6e9090c\"></div>\n",
"<div id=\"altair-viz-51a25849cbb346b9b99f7ff7336498df\"></div>\n",
"<script type=\"text/javascript\">\n",
" var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n",
" (function(spec, embedOpt){\n",
" let outputDiv = document.currentScript.previousElementSibling;\n",
" if (outputDiv.id !== \"altair-viz-d81282967144441087728f19d6e9090c\") {\n",
" outputDiv = document.getElementById(\"altair-viz-d81282967144441087728f19d6e9090c\");\n",
" if (outputDiv.id !== \"altair-viz-51a25849cbb346b9b99f7ff7336498df\") {\n",
" outputDiv = document.getElementById(\"altair-viz-51a25849cbb346b9b99f7ff7336498df\");\n",
" }\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm/vega@5?noext\",\n",
Expand Down Expand Up @@ -717,7 +717,7 @@
"alt.FacetChart(...)"
]
},
"execution_count": 19,
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -736,7 +736,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 19,
"id": "6d132a31-971d-44f2-a1aa-d60b2cf055f6",
"metadata": {},
"outputs": [
Expand All @@ -745,23 +745,23 @@
"text/html": [
"\n",
"<style>\n",
" #altair-viz-6e5cf771b5424e0e941d244025fd6f5a.vega-embed {\n",
" #altair-viz-e40d4ffc39d0402a8f12f79c85e6dc6b.vega-embed {\n",
" width: 100%;\n",
" display: flex;\n",
" }\n",
"\n",
" #altair-viz-6e5cf771b5424e0e941d244025fd6f5a.vega-embed details,\n",
" #altair-viz-6e5cf771b5424e0e941d244025fd6f5a.vega-embed details summary {\n",
" #altair-viz-e40d4ffc39d0402a8f12f79c85e6dc6b.vega-embed details,\n",
" #altair-viz-e40d4ffc39d0402a8f12f79c85e6dc6b.vega-embed details summary {\n",
" position: relative;\n",
" }\n",
"</style>\n",
"<div id=\"altair-viz-6e5cf771b5424e0e941d244025fd6f5a\"></div>\n",
"<div id=\"altair-viz-e40d4ffc39d0402a8f12f79c85e6dc6b\"></div>\n",
"<script type=\"text/javascript\">\n",
" var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n",
" (function(spec, embedOpt){\n",
" let outputDiv = document.currentScript.previousElementSibling;\n",
" if (outputDiv.id !== \"altair-viz-6e5cf771b5424e0e941d244025fd6f5a\") {\n",
" outputDiv = document.getElementById(\"altair-viz-6e5cf771b5424e0e941d244025fd6f5a\");\n",
" if (outputDiv.id !== \"altair-viz-e40d4ffc39d0402a8f12f79c85e6dc6b\") {\n",
" outputDiv = document.getElementById(\"altair-viz-e40d4ffc39d0402a8f12f79c85e6dc6b\");\n",
" }\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm/vega@5?noext\",\n",
Expand Down Expand Up @@ -814,7 +814,7 @@
"alt.FacetChart(...)"
]
},
"execution_count": 20,
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -825,7 +825,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 20,
"id": "a2d861b0-6baa-4d7c-89eb-4b686a77ba3e",
"metadata": {},
"outputs": [
Expand All @@ -834,23 +834,23 @@
"text/html": [
"\n",
"<style>\n",
" #altair-viz-c4145a51a6a3478b897e154e61332e59.vega-embed {\n",
" #altair-viz-6fd50e32890548fa95dd778c03a60815.vega-embed {\n",
" width: 100%;\n",
" display: flex;\n",
" }\n",
"\n",
" #altair-viz-c4145a51a6a3478b897e154e61332e59.vega-embed details,\n",
" #altair-viz-c4145a51a6a3478b897e154e61332e59.vega-embed details summary {\n",
" #altair-viz-6fd50e32890548fa95dd778c03a60815.vega-embed details,\n",
" #altair-viz-6fd50e32890548fa95dd778c03a60815.vega-embed details summary {\n",
" position: relative;\n",
" }\n",
"</style>\n",
"<div id=\"altair-viz-c4145a51a6a3478b897e154e61332e59\"></div>\n",
"<div id=\"altair-viz-6fd50e32890548fa95dd778c03a60815\"></div>\n",
"<script type=\"text/javascript\">\n",
" var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n",
" (function(spec, embedOpt){\n",
" let outputDiv = document.currentScript.previousElementSibling;\n",
" if (outputDiv.id !== \"altair-viz-c4145a51a6a3478b897e154e61332e59\") {\n",
" outputDiv = document.getElementById(\"altair-viz-c4145a51a6a3478b897e154e61332e59\");\n",
" if (outputDiv.id !== \"altair-viz-6fd50e32890548fa95dd778c03a60815\") {\n",
" outputDiv = document.getElementById(\"altair-viz-6fd50e32890548fa95dd778c03a60815\");\n",
" }\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm/vega@5?noext\",\n",
Expand Down Expand Up @@ -903,7 +903,7 @@
"alt.FacetChart(...)"
]
},
"execution_count": 21,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -922,7 +922,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 21,
"id": "e9999254-f07b-4041-a474-880a2b026434",
"metadata": {},
"outputs": [
Expand All @@ -931,23 +931,23 @@
"text/html": [
"\n",
"<style>\n",
" #altair-viz-f86473dde6e44f15b05ed7e5d5543a99.vega-embed {\n",
" #altair-viz-ca5be662a1c14e06b5a4d1d4cc1d8755.vega-embed {\n",
" width: 100%;\n",
" display: flex;\n",
" }\n",
"\n",
" #altair-viz-f86473dde6e44f15b05ed7e5d5543a99.vega-embed details,\n",
" #altair-viz-f86473dde6e44f15b05ed7e5d5543a99.vega-embed details summary {\n",
" #altair-viz-ca5be662a1c14e06b5a4d1d4cc1d8755.vega-embed details,\n",
" #altair-viz-ca5be662a1c14e06b5a4d1d4cc1d8755.vega-embed details summary {\n",
" position: relative;\n",
" }\n",
"</style>\n",
"<div id=\"altair-viz-f86473dde6e44f15b05ed7e5d5543a99\"></div>\n",
"<div id=\"altair-viz-ca5be662a1c14e06b5a4d1d4cc1d8755\"></div>\n",
"<script type=\"text/javascript\">\n",
" var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n",
" (function(spec, embedOpt){\n",
" let outputDiv = document.currentScript.previousElementSibling;\n",
" if (outputDiv.id !== \"altair-viz-f86473dde6e44f15b05ed7e5d5543a99\") {\n",
" outputDiv = document.getElementById(\"altair-viz-f86473dde6e44f15b05ed7e5d5543a99\");\n",
" if (outputDiv.id !== \"altair-viz-ca5be662a1c14e06b5a4d1d4cc1d8755\") {\n",
" outputDiv = document.getElementById(\"altair-viz-ca5be662a1c14e06b5a4d1d4cc1d8755\");\n",
" }\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm/vega@5?noext\",\n",
Expand Down Expand Up @@ -1000,7 +1000,7 @@
"alt.FacetChart(...)"
]
},
"execution_count": 22,
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -1011,7 +1011,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 22,
"id": "3c147008-7d5f-473a-886b-65bbd030de5b",
"metadata": {},
"outputs": [
Expand All @@ -1020,23 +1020,23 @@
"text/html": [
"\n",
"<style>\n",
" #altair-viz-7d3716df0df9456f8778a962bef5292c.vega-embed {\n",
" #altair-viz-82d0664df50c40d19d056d0be57c5d37.vega-embed {\n",
" width: 100%;\n",
" display: flex;\n",
" }\n",
"\n",
" #altair-viz-7d3716df0df9456f8778a962bef5292c.vega-embed details,\n",
" #altair-viz-7d3716df0df9456f8778a962bef5292c.vega-embed details summary {\n",
" #altair-viz-82d0664df50c40d19d056d0be57c5d37.vega-embed details,\n",
" #altair-viz-82d0664df50c40d19d056d0be57c5d37.vega-embed details summary {\n",
" position: relative;\n",
" }\n",
"</style>\n",
"<div id=\"altair-viz-7d3716df0df9456f8778a962bef5292c\"></div>\n",
"<div id=\"altair-viz-82d0664df50c40d19d056d0be57c5d37\"></div>\n",
"<script type=\"text/javascript\">\n",
" var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n",
" (function(spec, embedOpt){\n",
" let outputDiv = document.currentScript.previousElementSibling;\n",
" if (outputDiv.id !== \"altair-viz-7d3716df0df9456f8778a962bef5292c\") {\n",
" outputDiv = document.getElementById(\"altair-viz-7d3716df0df9456f8778a962bef5292c\");\n",
" if (outputDiv.id !== \"altair-viz-82d0664df50c40d19d056d0be57c5d37\") {\n",
" outputDiv = document.getElementById(\"altair-viz-82d0664df50c40d19d056d0be57c5d37\");\n",
" }\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm/vega@5?noext\",\n",
Expand Down Expand Up @@ -1089,7 +1089,7 @@
"alt.FacetChart(...)"
]
},
"execution_count": 23,
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
21 changes: 15 additions & 6 deletions portfolio/ntd_monthly_ridership/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,36 @@ Provide CalSTA with NTD Monthly Ridership by each RTPA.
Per the [SB125 Final Guildelines](https://calsta.ca.gov/-/media/calsta-media/documents/sb125-final-guidelines-a11y.pdf)
>Caltrans will provide all RTPAs with a summary report each month that meets the requirements of this statutory provision, drawn from the data reported to the National Transit Database. The data will be drawn from the NTD at: [Complete Monthly Ridership (with adjustments and estimates) | FTA (dot.gov)](https://www.transit.dot.gov/ntd/data-product/monthly-module-adjusted-data-release). RTPAs are required to post a link to this report and data in a manner easily accessed by the public, so that ridership trends within their region can be easily reviewed.
This report shows general ridership trends by transit agency, mode, and type of service. Reported unlinked passenger trips are reported, as well as the change from the prior year. For example, July 2023's change would be the change in July 2023's reported values against July 2022's reported values.
This report shows general ridership trends by Monthly NTD Reporter, mode, and type of service for California RTPAs from 2018 to present. Unlinked passenger trips are reported, as well as the change from the prior year. For example, July 2023's change would be the change in July 2023's reported values against July 2022's reported values.

## Definitions
- **FTA**: Federal Transit Admisistration.
- **MODE**: A system for carrying transit passengers described by specific right-of-way (ROW), technology and operational features. Examples: Bus, Cable Car, Light Rail.
- **Monthly NTD Reporter**: Full Reporters that submit Monthly Ridership (MR) and monthly Safety and Security reports to NTD.
- **NTD**: National Transit Database. A reporting system that collects public transportation financial and operating information.
- **RTPA**: Regional Transportation Planning Authority.
- **TOS**: Type of Service. Describes how public transportation services are provided by the transit agency: directly operated (DO) or purchased transportation (PT) services.
- **UZA**: Urbanized Areas. An urbanized area is an incorporated area with a population of 50,000 or more that is designated as such by the U.S. Department of Commerce, Bureau of the Census.
- **MODE**: A system for carrying transit passengers described by specific right-of-way (ROW), technology and operational features. Examples: Bus, Cable Car, Light Rail.
- **TOS**: Describes how public transportation services are provided by the transit agency: directly operated (DO) or purchased transportation (PT) services.


## Methodology
Ridership data is ingested via the `FTA Complete Monthly Ridership` report, per the SB125 guidelines. Then filtered for agencies residing in California UZAs. These California Agencies are grouped by RTPAs, then aggregated by agencies, mode and TOS. The processed data for each RTPA is saved to a public respository, see datasets below.
Ridership data is ingested via the `FTA Complete Monthly Ridership` report, per the SB125 guidelines. Then filtered for Reporters residing in California UZAs. These California Reporters are grouped by RTPAs, then aggregated mode and TOS. The processed data for each RTPA is saved to a public respository, see datasets below.


## Frequently Asked Questions
**Q: Which agencies/transit operators are in this report? Why are some agencies missing from an RTPA?**
**Q: Which Monthly NTD Reporters are in this report? Why are some Reporters missing from an RTPA?**

Per the [NTD Complete Monthly Ridership Report](https://www.transit.dot.gov/ntd/data-product/monthly-module-adjusted-data-release) webpage:
>File Summary: Contains monthly-updated service information reported by urban Full Reporters.
Urban full reporters, that submit monthly ridership data to NTD, are included in this report. This report tracks data from 2018 to present. If an agency is not a monthly reporter, or has not reported data since 2018, they will not appear in the report.
Transit operators/agencies that are **Urban full reporters, that submit monthly ridership data to NTD from 2018 to present**, are included in this report. Reporters that were previously Urban full reporters, but are currently not, may appear. This may result in Reporters showing zero or partial ridership data in the report.

If a Reporter is not a monthly reporter, or has not reported data since 2018, they will not appear in the report.

Examples:
- Reporter A is an urban full reporter from 2019-2022, then became a reduced reporter for 2023. Reporter A's ridership data will be displayed for 2019-2022 only.
- Reporter B is an urban full reporter from 2000-2017, then became a reduced reporter for 2018. Reporter B will be named in the report, but will not display ridership data.
- Reporter C was a reduced reporter form 2015-2020, then became an urban full reporter and began submitting monthly ridership data to NTD for 2021. Reporter C's ridership data will be displayed for 2021-present.


**Q: Where can I download my RTPA's data?**
Expand Down
Git LFS file not shown
Git LFS file not shown
Loading

0 comments on commit 6a95144

Please sign in to comment.