From 6a95144d503177cc2c35a58f85fff857e60cb364 Mon Sep 17 00:00:00 2001 From: csuyat-dot Date: Wed, 15 Jan 2025 19:47:44 +0000 Subject: [PATCH] deployed notebooks and portfolio site --- ntd/TEST_monthly_ridership_report.ipynb | 500 +++++------------- ntd/monthly_ridership_report.ipynb | 114 ++-- portfolio/ntd_monthly_ridership/README.md | 21 +- ...ine-county-transportation-commission.ipynb | 4 +- ...te-county-association-of-governments.ipynb | 4 +- ...ado-county-transportation-commission.ipynb | 4 +- ...fresno-county-council-of-governments.ipynb | 4 +- ...ial-county-transportation-commission.ipynb | 4 +- ...rt__rtpa_kern-council-of-governments.ipynb | 4 +- ...gs-county-association-of-governments.ipynb | 4 +- ...etropolitan-transportation-authority.ipynb | 4 +- ...ed-county-association-of-governments.ipynb | 4 +- ...tropolitan-transportation-commission.ipynb | 4 +- ...ange-county-transportation-authority.ipynb | 4 +- ...ounty-transportation-planning-agency.ipynb | 4 +- ...ide-county-transportation-commission.ipynb | 4 +- ...cramento-area-council-of-governments.ipynb | 4 +- ...dino-county-transportation-authority.ipynb | 4 +- ...san-diego-association-of-governments.ipynb | 4 +- ...a_san-joaquin-council-of-governments.ipynb | 4 +- ...n-luis-obispo-council-of-governments.ipynb | 4 +- ...ra-county-association-of-governments.ipynb | 4 +- ...ruz-county-transportation-commission.ipynb | 4 +- ...hasta-regional-transportation-agency.ipynb | 4 +- ...pa_stanislaus-council-of-governments.ipynb | 4 +- ..._rtpa_tahoe-regional-planning-agency.ipynb | 4 +- ...portation-agency-for-monterey-county.ipynb | 4 +- ...re-county-association-of-governments.ipynb | 4 +- ...ura-county-transportation-commission.ipynb | 4 +- 29 files changed, 268 insertions(+), 471 deletions(-) diff --git a/ntd/TEST_monthly_ridership_report.ipynb b/ntd/TEST_monthly_ridership_report.ipynb index fc9a148f8..aeea6cbdc 100644 --- a/ntd/TEST_monthly_ridership_report.ipynb +++ b/ntd/TEST_monthly_ridership_report.ipynb @@ -54,8 +54,8 @@ "outputs": [], "source": [ "# parameters cell for local\n", - "rtpa = \"Metropolitan Transportation Commission\" # lots of reporters\n", - "#rtpa = \"Butte County Association of Governments\" # 2 reporters " + "#rtpa = \"Metropolitan Transportation Commission\" # lots of reporters\n", + "rtpa = \"Butte County Association of Governments\" # 2 reporters " ] }, { @@ -68,7 +68,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{\"rtpa\": \"Metropolitan Transportation Commission\"}\n" + "{\"rtpa\": \"Butte County Association of Governments\"}\n" ] } ], @@ -164,38 +164,38 @@ "output_type": "stream", "text": [ "\n", - "Int64Index: 6889 entries, 1103 to 95972\n", + "Int64Index: 332 entries, 23658 to 87718\n", "Data columns (total 26 columns):\n", " # Column Non-Null Count Dtype \n", "--- ------ -------------- ----- \n", - " 0 key 6889 non-null object \n", - " 1 ntd_id 6889 non-null object \n", - " 2 legacy_ntd_id 6640 non-null object \n", - " 3 agency 6889 non-null object \n", - " 4 reporter_type 6889 non-null object \n", - " 5 period_year_month 6889 non-null object \n", - " 6 period_year 6889 non-null int64 \n", - " 7 period_month 6889 non-null int64 \n", - " 8 uza_name 6889 non-null object \n", - " 9 primary_uza_code 6889 non-null object \n", - " 10 _3_mode 6889 non-null object \n", - " 11 mode_name 6889 non-null object \n", - " 12 service_type 6889 non-null object \n", - " 13 Status 6889 non-null object \n", - " 14 upt 4761 non-null float64 \n", - " 15 vrm 4761 non-null float64 \n", - " 16 vrh 4761 non-null float64 \n", - " 17 voms 4761 non-null float64 \n", - " 18 _dt 6889 non-null object \n", - " 19 RTPA 6889 non-null object \n", - " 20 _merge 6889 non-null category\n", - " 21 previous_y_m_upt 4755 non-null float64 \n", - " 22 change_1yr 4659 non-null float64 \n", - " 23 pct_change_1yr 4651 non-null float64 \n", - " 24 Mode 6889 non-null object \n", - " 25 TOS 6889 non-null object \n", + " 0 key 332 non-null object \n", + " 1 ntd_id 332 non-null object \n", + " 2 legacy_ntd_id 332 non-null object \n", + " 3 agency 332 non-null object \n", + " 4 reporter_type 332 non-null object \n", + " 5 period_year_month 332 non-null object \n", + " 6 period_year 332 non-null int64 \n", + " 7 period_month 332 non-null int64 \n", + " 8 uza_name 332 non-null object \n", + " 9 primary_uza_code 332 non-null object \n", + " 10 _3_mode 332 non-null object \n", + " 11 mode_name 332 non-null object \n", + " 12 service_type 332 non-null object \n", + " 13 Status 332 non-null object \n", + " 14 upt 166 non-null float64 \n", + " 15 vrm 166 non-null float64 \n", + " 16 vrh 166 non-null float64 \n", + " 17 voms 166 non-null float64 \n", + " 18 _dt 332 non-null object \n", + " 19 RTPA 332 non-null object \n", + " 20 _merge 332 non-null category\n", + " 21 previous_y_m_upt 166 non-null float64 \n", + " 22 change_1yr 166 non-null float64 \n", + " 23 pct_change_1yr 166 non-null float64 \n", + " 24 Mode 332 non-null object \n", + " 25 TOS 332 non-null object \n", "dtypes: category(1), float64(7), int64(2), object(16)\n", - "memory usage: 1.4+ MB\n" + "memory usage: 67.9+ KB\n" ] } ], @@ -384,7 +384,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 13, "id": "6db38c9c-47b8-4887-a9fc-cf82c2c4eea5", "metadata": {}, "outputs": [], @@ -411,7 +411,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 14, "id": "2d299cdb-21ba-4bf6-b6fb-3d64f02d59e5", "metadata": {}, "outputs": [], @@ -441,7 +441,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 15, "id": "1bca9016-0024-44e0-b0a0-e11a313ca308", "metadata": {}, "outputs": [], @@ -459,7 +459,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 16, "id": "1606b9e3-1311-40ea-aec8-1fa4ac0c2522", "metadata": {}, "outputs": [], @@ -480,7 +480,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 17, "id": "53510310-eaea-400d-af32-20f4c8773514", "metadata": {}, "outputs": [], @@ -522,7 +522,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 18, "id": "f59f697a-912a-4dfe-bcac-02c9fc50b55d", "metadata": {}, "outputs": [], @@ -579,7 +579,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 19, "id": "118b82e3-59f7-4ad4-81da-208fbcfa8280", "metadata": {}, "outputs": [], @@ -603,7 +603,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 33, "id": "413d77c9-b2cc-4847-9039-aa4d0caa64de", "metadata": { "tags": [] @@ -624,7 +624,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", @@ -641,7 +641,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 21, "id": "e4214ddd-c5b6-407f-9287-0573669adf4f", "metadata": {}, "outputs": [ @@ -649,16 +649,16 @@ "data": { "text/markdown": [ "\n", - "Within Metropolitan Transportation Commission:\n", - "- Number of Agencies/Operators: 28.\n", - "- Total Unlinked Passenger Trips since 2018: 2,213,793,549.0.\n", + "Within Butte County Association of Governments:\n", + "- Number of Agencies/Operators: 2.\n", + "- Total Unlinked Passenger Trips since 2018: 5,085,443.0.\n", "- Individual agency/operator ridership breakdown:\n" ], "text/plain": [ "" ] }, - "execution_count": 22, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -674,7 +674,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 22, "id": "6b849d54-f0a5-47b1-84ef-a669c5258261", "metadata": { "tags": [] @@ -709,236 +709,24 @@ " \n", " \n", " 0\n", - " City and County of San Francisco\n", - " 1041438510\n", - " 47.04\n", + " Butte County Association of Governments\n", + " 5085443\n", + " 100.0\n", " \n", " \n", " 1\n", - " San Francisco Bay Area Rapid Transit District\n", - " 465046516\n", - " 21.01\n", - " \n", - " \n", - " 2\n", - " Alameda-Contra Costa Transit District\n", - " 268682727\n", - " 12.14\n", - " \n", - " \n", - " 3\n", - " Santa Clara Valley Transportation Authority\n", - " 177680119\n", - " 8.03\n", - " \n", - " \n", - " 4\n", - " Peninsula Corridor Joint Powers Board\n", - " 65677887\n", - " 2.97\n", - " \n", - " \n", - " 5\n", - " San Mateo County Transit District\n", - " 61784239\n", - " 2.79\n", - " \n", - " \n", - " 6\n", - " Golden Gate Bridge, Highway and Transportation...\n", - " 21654720\n", - " 0.98\n", - " \n", - " \n", - " 7\n", - " Marin County Transit District\n", - " 17755395\n", - " 0.80\n", - " \n", - " \n", - " 8\n", - " Central Contra Costa Transit Authority\n", - " 17702390\n", - " 0.80\n", - " \n", - " \n", - " 9\n", - " San Francisco Bay Area Water Emergency Transpo...\n", - " 14013194\n", - " 0.63\n", - " \n", - " \n", - " 10\n", - " The Eastern Contra Costa Transit Authority\n", - " 9779998\n", - " 0.44\n", - " \n", - " \n", - " 11\n", - " City of Santa Rosa\n", - " 9559722\n", - " 0.43\n", - " \n", - " \n", - " 12\n", - " Livermore / Amador Valley Transit Authority\n", - " 8360705\n", - " 0.38\n", - " \n", - " \n", - " 13\n", - " Solano County Transit\n", - " 6545862\n", - " 0.30\n", - " \n", - " \n", - " 14\n", - " Western Contra Costa Transit Authority\n", - " 5237103\n", - " 0.24\n", - " \n", - " \n", - " 15\n", - " County of Sonoma\n", - " 4891306\n", - " 0.22\n", - " \n", - " \n", - " 16\n", - " Napa Valley Transportation Authority\n", - " 4433341\n", - " 0.20\n", - " \n", - " \n", - " 17\n", - " Metropolitan Transportation Commission\n", - " 4429248\n", - " 0.20\n", - " \n", - " \n", - " 18\n", - " Sonoma-Marin Area Rail Transit District\n", - " 4054884\n", - " 0.18\n", - " \n", - " \n", - " 19\n", - " City of Fairfield, California\n", - " 3321420\n", - " 0.15\n", - " \n", - " \n", - " 20\n", - " City of Petaluma\n", - " 1744263\n", - " 0.08\n", - " \n", - " \n", - " 21\n", - " City of Vallejo Transportation Program\n", - " 0\n", - " 0.00\n", - " \n", - " \n", - " 22\n", - " City of Vacaville\n", - " 0\n", - " 0.00\n", - " \n", - " \n", - " 23\n", - " City of Union City\n", - " 0\n", - " 0.00\n", - " \n", - " \n", - " 24\n", - " San Francisco Paratransit\n", - " 0\n", - " 0.00\n", - " \n", - " \n", - " 25\n", - " City of Benicia\n", + " Chico Area Transit System City of Chico\n", " 0\n", - " 0.00\n", - " \n", - " \n", - " 26\n", - " City of Alameda Ferry Services\n", - " 0\n", - " 0.00\n", - " \n", - " \n", - " 27\n", - " ATC / Vancom\n", - " 0\n", - " 0.00\n", + " 0.0\n", " \n", " \n", "\n", "" ], "text/plain": [ - " agency total_upt \\\n", - "0 City and County of San Francisco 1041438510 \n", - "1 San Francisco Bay Area Rapid Transit District 465046516 \n", - "2 Alameda-Contra Costa Transit District 268682727 \n", - "3 Santa Clara Valley Transportation Authority 177680119 \n", - "4 Peninsula Corridor Joint Powers Board 65677887 \n", - "5 San Mateo County Transit District 61784239 \n", - "6 Golden Gate Bridge, Highway and Transportation... 21654720 \n", - "7 Marin County Transit District 17755395 \n", - "8 Central Contra Costa Transit Authority 17702390 \n", - "9 San Francisco Bay Area Water Emergency Transpo... 14013194 \n", - "10 The Eastern Contra Costa Transit Authority 9779998 \n", - "11 City of Santa Rosa 9559722 \n", - "12 Livermore / Amador Valley Transit Authority 8360705 \n", - "13 Solano County Transit 6545862 \n", - "14 Western Contra Costa Transit Authority 5237103 \n", - "15 County of Sonoma 4891306 \n", - "16 Napa Valley Transportation Authority 4433341 \n", - "17 Metropolitan Transportation Commission 4429248 \n", - "18 Sonoma-Marin Area Rail Transit District 4054884 \n", - "19 City of Fairfield, California 3321420 \n", - "20 City of Petaluma 1744263 \n", - "21 City of Vallejo Transportation Program 0 \n", - "22 City of Vacaville 0 \n", - "23 City of Union City 0 \n", - "24 San Francisco Paratransit 0 \n", - "25 City of Benicia 0 \n", - "26 City of Alameda Ferry Services 0 \n", - "27 ATC / Vancom 0 \n", - "\n", - " pct_of_total_upt \n", - "0 47.04 \n", - "1 21.01 \n", - "2 12.14 \n", - "3 8.03 \n", - "4 2.97 \n", - "5 2.79 \n", - "6 0.98 \n", - "7 0.80 \n", - "8 0.80 \n", - "9 0.63 \n", - "10 0.44 \n", - "11 0.43 \n", - "12 0.38 \n", - "13 0.30 \n", - "14 0.24 \n", - "15 0.22 \n", - "16 0.20 \n", - "17 0.20 \n", - "18 0.18 \n", - "19 0.15 \n", - "20 0.08 \n", - "21 0.00 \n", - "22 0.00 \n", - "23 0.00 \n", - "24 0.00 \n", - "25 0.00 \n", - "26 0.00 \n", - "27 0.00 " + " agency total_upt pct_of_total_upt\n", + "0 Butte County Association of Governments 5085443 100.0\n", + "1 Chico Area Transit System City of Chico 0 0.0" ] }, "metadata": {}, @@ -951,7 +739,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 34, "id": "7e5b1217-5c1d-4795-9eef-c25b245c9af3", "metadata": {}, "outputs": [ @@ -960,23 +748,23 @@ "text/html": [ "\n", "\n", - "
\n", + "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, - "execution_count": 44, + "execution_count": 34, "metadata": {}, "output_type": "execute_result" } @@ -1046,7 +834,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 24, "id": "da59f86f-ba3c-4398-95ad-ad84e0ada732", "metadata": {}, "outputs": [ @@ -1055,23 +843,23 @@ "text/html": [ "\n", "\n", - "
\n", + "
\n", "" ], "text/plain": [ "alt.Chart(...)" ] }, - "execution_count": 25, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -1143,7 +931,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 25, "id": "c068b244-f4c2-4ae7-9153-d2724ee9f5c2", "metadata": {}, "outputs": [ @@ -1152,23 +940,23 @@ "text/html": [ "\n", "\n", - "
\n", + "
\n", "" ], "text/plain": [ "alt.FacetChart(...)" ] }, - "execution_count": 26, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -1240,7 +1028,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 26, "id": "24462fe7-2af4-4023-9a88-0cc665ce763a", "metadata": {}, "outputs": [ @@ -1249,23 +1037,23 @@ "text/html": [ "\n", "\n", - "
\n", + "
\n", "" ], "text/plain": [ "alt.FacetChart(...)" ] }, - "execution_count": 27, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } @@ -1332,7 +1120,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 27, "id": "ddd1a017-0907-4a9c-826d-edd958418c26", "metadata": {}, "outputs": [ @@ -1341,23 +1129,23 @@ "text/html": [ "\n", "\n", - "
\n", + "
\n", "" ], "text/plain": [ "alt.FacetChart(...)" ] }, - "execution_count": 28, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -1421,7 +1209,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 28, "id": "fd64bce0-577f-498e-9be8-4d664bfc47d1", "metadata": {}, "outputs": [ @@ -1430,23 +1218,23 @@ "text/html": [ "\n", "\n", - "
\n", + "
\n", "" ], "text/plain": [ "alt.FacetChart(...)" ] }, - "execution_count": 29, + "execution_count": 28, "metadata": {}, "output_type": "execute_result" } @@ -1518,7 +1306,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 29, "id": "6d132a31-971d-44f2-a1aa-d60b2cf055f6", "metadata": {}, "outputs": [ @@ -1527,23 +1315,23 @@ "text/html": [ "\n", "\n", - "
\n", + "
\n", "" ], "text/plain": [ "alt.FacetChart(...)" ] }, - "execution_count": 30, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -1607,7 +1395,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 30, "id": "a2d861b0-6baa-4d7c-89eb-4b686a77ba3e", "metadata": {}, "outputs": [ @@ -1616,23 +1404,23 @@ "text/html": [ "\n", "\n", - "
\n", + "
\n", "" ], "text/plain": [ "alt.FacetChart(...)" ] }, - "execution_count": 31, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -1704,7 +1492,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 31, "id": "e9999254-f07b-4041-a474-880a2b026434", "metadata": {}, "outputs": [ @@ -1713,23 +1501,23 @@ "text/html": [ "\n", "\n", - "
\n", + "
\n", "" ], "text/plain": [ "alt.FacetChart(...)" ] }, - "execution_count": 32, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -1793,7 +1581,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 32, "id": "3c147008-7d5f-473a-886b-65bbd030de5b", "metadata": {}, "outputs": [ @@ -1802,23 +1590,23 @@ "text/html": [ "\n", "\n", - "
\n", + "
\n", "" ], "text/plain": [ "alt.FacetChart(...)" ] }, - "execution_count": 33, + "execution_count": 32, "metadata": {}, "output_type": "execute_result" } diff --git a/ntd/monthly_ridership_report.ipynb b/ntd/monthly_ridership_report.ipynb index 6387f6cf3..d5842339f 100644 --- a/ntd/monthly_ridership_report.ipynb +++ b/ntd/monthly_ridership_report.ipynb @@ -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", @@ -431,9 +431,9 @@ "source": [ "Markdown(f\"\"\"\n", "Within {rtpa}:\n", - "- Number of Agencies/Operators: {agency_count}.\n", + "- Number of Reporters: {agency_count}.\n", "- Total Unlinked Passenger Trips since {MIN_YEAR}: {total_upt:,}.\n", - "- Individual agency/operator ridership breakdown:\n", + "- Individual Reporters ridership breakdown:\n", "\"\"\")" ] }, @@ -448,23 +448,23 @@ "text/html": [ "\n", "\n", - "
\n", + "
\n", "