diff --git a/high_quality_transit_areas/08_2024_methodology.ipynb b/high_quality_transit_areas/08_2024_methodology.ipynb new file mode 100644 index 000000000..95d98d062 --- /dev/null +++ b/high_quality_transit_areas/08_2024_methodology.ipynb @@ -0,0 +1,3320 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "5bbd8694-444f-48c0-89a0-00c5c0e542c8", + "metadata": {}, + "outputs": [], + "source": [ + "import geopandas as gpd\n", + "import pandas as pd\n", + "from siuba import *\n", + "\n", + "from segment_speed_utils import helpers, gtfs_schedule_wrangling\n", + "from shared_utils import rt_dates, gtfs_utils_v2\n", + "import folium" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "994a67bc-1cbe-4477-ac3b-cbe0f7e4822e", + "metadata": {}, + "outputs": [], + "source": [ + "from update_vars import analysis_date, AM_PEAK, PM_PEAK, EXPORT_PATH, GCS_FILE_PATH, PROJECT_CRS" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "b263f2d3-1aa3-4576-aac6-a800f12cca19", + "metadata": {}, + "outputs": [], + "source": [ + "import sjoin_stops_to_segments" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "fd40c5c1-6d79-4bb0-87bd-18c9053af24b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'2024-09-18'" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "analysis_date" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "0b6f850f-6038-4687-bd22-68552334fd2b", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# (1) Aggregate stop times - by stop_id, find max trips in AM/PM peak\n", + "# takes 1 min\n", + "max_arrivals_by_stop = helpers.import_scheduled_stop_times(\n", + " analysis_date,\n", + " get_pandas = True,\n", + ").pipe(sjoin_stops_to_segments.prep_stop_times).pipe(sjoin_stops_to_segments.stop_times_aggregation_max_by_stop, analysis_date)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "d9772373-43a4-40c4-b7c6-b0550cbb9ad0", + "metadata": {}, + "outputs": [], + "source": [ + "# (1) Aggregate stop times - by stop_id, find max trips in AM/PM peak\n", + "# takes 1 min\n", + "max_arrivals_by_stop_single = helpers.import_scheduled_stop_times(\n", + " analysis_date,\n", + " get_pandas = True,\n", + ").pipe(sjoin_stops_to_segments.prep_stop_times).pipe(\n", + " sjoin_stops_to_segments.stop_times_aggregation_max_by_stop, analysis_date, single_route_dir=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "23295ce6-a2c8-4fdd-b849-0d21183b362b", + "metadata": {}, + "outputs": [], + "source": [ + "new_hq_multi = max_arrivals_by_stop >> filter(_.am_max_trips_hr > 4, _.pm_max_trips_hr > 4) # new HQ corridor (still multi-route)\n", + "new_ms_multi = max_arrivals_by_stop >> filter(_.am_max_trips_hr > 3, _.pm_max_trips_hr > 3) # new major stop precursor (still multi-route)\n", + "new_hq_single = max_arrivals_by_stop_single >> filter(_.am_max_trips_hr > 4, _.pm_max_trips_hr > 4) # new HQ corridor (single-route)\n", + "new_ms_single = max_arrivals_by_stop_single >> filter(_.am_max_trips_hr > 3, _.pm_max_trips_hr > 3) # new major stop precursor (single-route)" + ] + }, + { + "cell_type": "markdown", + "id": "92977e9b-bb4d-4455-9178-7d8f03a174b5", + "metadata": { + "tags": [] + }, + "source": [ + "## preliminary mapping\n", + "\n", + "* add bus/rail/ferry MTS in orange to help decide" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "663c2e6f-6a31-40f4-8e3d-f03d290429f7", + "metadata": {}, + "outputs": [], + "source": [ + "OLD_EXPORT_PATH = f\"{GCS_FILE_PATH}export/{rt_dates.DATES['aug2024']}/\"" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "f1fff741-c6f0-43c2-a236-7670da61e209", + "metadata": {}, + "outputs": [], + "source": [ + "old_stops = gpd.read_parquet(f\"{OLD_EXPORT_PATH}ca_hq_transit_stops.parquet\")" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "ee6b8713-26b8-40bd-8f64-7964ea70e4eb", + "metadata": {}, + "outputs": [], + "source": [ + "non_bus = old_stops >> filter(-_.hqta_type.isin(['hq_corridor_bus', 'major_stop_bus']))" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "70431fa2-4856-4f83-b67b-92f802809398", + "metadata": {}, + "outputs": [], + "source": [ + "feeds = (gtfs_utils_v2.schedule_daily_feed_to_gtfs_dataset_name(selected_date=analysis_date)\n", + " >> select(_.feed_key, _.schedule_gtfs_dataset_key == _.gtfs_dataset_key)\n", + " >> filter(_.schedule_gtfs_dataset_key.isin(max_arrivals_by_stop.schedule_gtfs_dataset_key))\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "b2a77335-5940-4527-8457-ce6ac27c9f39", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/conda/lib/python3.9/site-packages/sqlalchemy_bigquery/_types.py:101: SAWarning: Did not recognize type 'GEOGRAPHY' of column 'pt_geom'\n", + " sqlalchemy.util.warn(\n" + ] + } + ], + "source": [ + "stops = gtfs_utils_v2.get_stops(selected_date=analysis_date, operator_feeds=feeds.feed_key,\n", + " stop_cols=['feed_key', 'stop_id'])" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "6633dce1-42ef-4e86-9af0-8305b904e0e6", + "metadata": {}, + "outputs": [], + "source": [ + "stops = stops >> inner_join(_, feeds, on='feed_key')" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "2f9d4f2e-e955-41d1-b97f-cb2ff0e2f3a4", + "metadata": {}, + "outputs": [], + "source": [ + "def add_to_map(test_df, m=None, **kwargs):\n", + " gdf = stops >> inner_join(_, test_df, on=['schedule_gtfs_dataset_key', 'stop_id'])\n", + " m = gdf.explore(m = m, **kwargs)\n", + " return m" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "3ed52cda-d707-4ff4-abae-95331c133988", + "metadata": {}, + "outputs": [], + "source": [ + "m1 = old_stops.explore(color='blue')\n", + "m1 = non_bus.explore(m = m1, color='orange')" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "00188b90-31be-40bf-9c66-c5ecd0e28514", + "metadata": {}, + "outputs": [], + "source": [ + "m1 = add_to_map(new_hq_multi, m=m1, color='green')" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "b547f7cb-3efc-4558-987f-c27db0957f8c", + "metadata": {}, + "outputs": [], + "source": [ + "m1 = add_to_map(new_hq_single, m=m1, color='red')" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "42c0505c-456f-41b3-80ac-2d0673ae8c6d", + "metadata": {}, + "outputs": [], + "source": [ + "folium.LayerControl().add_to(m1);" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "7af76c43-60e7-4220-a4ce-1ef82b1aaaf0", + "metadata": {}, + "outputs": [], + "source": [ + "# m1" + ] + }, + { + "cell_type": "markdown", + "id": "ade435a2-6a54-4833-8f76-8ca5bc35b2a9", + "metadata": { + "tags": [] + }, + "source": [ + "## major stops" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "6d016523-2a2f-4c84-a7fc-97d2aa63ca9d", + "metadata": {}, + "outputs": [], + "source": [ + "m = old_stops.explore(color='blue')\n", + "m = non_bus.explore(m = m, color='orange')" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "42ebce25-f799-4bd8-8299-affd3d28ddeb", + "metadata": {}, + "outputs": [], + "source": [ + "m = add_to_map(new_ms_multi, m=m, color='green')" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "f7aba8a7-17b8-4a42-a75a-d2bdfe4613ed", + "metadata": {}, + "outputs": [], + "source": [ + "m = add_to_map(new_ms_single, m=m, color='red')" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "aa30677f-1142-4a21-a4d3-b2e034a92826", + "metadata": {}, + "outputs": [], + "source": [ + "folium.LayerControl().add_to(m);" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "id": "e412a100-b5d8-495d-9dc1-b445af385802", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# m" + ] + }, + { + "cell_type": "markdown", + "id": "37599b82-0cde-4835-81f7-ae752ae02f53", + "metadata": {}, + "source": [ + "# full pipeline check" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "1381991e-2fcd-4157-8632-5f146ae5a77a", + "metadata": {}, + "outputs": [], + "source": [ + "new_stops = gpd.read_parquet(f\"{EXPORT_PATH}ca_hq_transit_stops.parquet\")" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "1df5a3b7-a4ab-428f-89a1-1f06c3ed4f07", + "metadata": {}, + "outputs": [], + "source": [ + "new_areas = gpd.read_parquet(f\"{EXPORT_PATH}ca_hq_transit_areas.parquet\")" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "ad9fbf3f-5a28-414b-b5cb-4d7f203e89a6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'gs://calitp-analytics-data/data-analyses/high_quality_transit_areas/export/2024-09-18/ca_hq_transit_areas.parquet'" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "f\"{EXPORT_PATH}ca_hq_transit_areas.parquet\"" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "8de894dd-ec42-4459-bc81-babf142d14ab", + "metadata": {}, + "outputs": [], + "source": [ + "old_areas = gpd.read_parquet(f\"{OLD_EXPORT_PATH}ca_hq_transit_areas.parquet\")" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "46380751-0288-43a9-803c-43f3b47f3cc8", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "RangeIndex: 114837 entries, 0 to 114836\n", + "Data columns (total 12 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 agency_primary 114837 non-null object \n", + " 1 hqta_type 114837 non-null object \n", + " 2 stop_id 114837 non-null object \n", + " 3 route_id 114837 non-null object \n", + " 4 hqta_details 114837 non-null object \n", + " 5 agency_secondary 44019 non-null object \n", + " 6 base64_url_primary 114837 non-null object \n", + " 7 base64_url_secondary 44019 non-null object \n", + " 8 org_id_primary 114837 non-null object \n", + " 9 org_id_secondary 44019 non-null object \n", + " 10 peak_trips 114837 non-null int64 \n", + " 11 geometry 114837 non-null geometry\n", + "dtypes: geometry(1), int64(1), object(10)\n", + "memory usage: 10.5+ MB\n" + ] + } + ], + "source": [ + "new_stops.info()" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "801f0ca1-8cc7-414a-bab8-9821966bafe4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
hqta_typen
0hq_corridor_bus68167
1major_stop_brt438
2major_stop_bus44019
3major_stop_ferry50
4major_stop_rail2163
\n", + "
" + ], + "text/plain": [ + " hqta_type n\n", + "0 hq_corridor_bus 68167\n", + "1 major_stop_brt 438\n", + "2 major_stop_bus 44019\n", + "3 major_stop_ferry 50\n", + "4 major_stop_rail 2163" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "new_stops >> count(_.hqta_type)" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "id": "935aaa0b-1c2b-443a-b1c6-4b9af795a1a0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
hqta_typen
0hq_corridor_bus43110
1major_stop_brt264
2major_stop_bus16498
3major_stop_ferry25
4major_stop_rail865
\n", + "
" + ], + "text/plain": [ + " hqta_type n\n", + "0 hq_corridor_bus 43110\n", + "1 major_stop_brt 264\n", + "2 major_stop_bus 16498\n", + "3 major_stop_ferry 25\n", + "4 major_stop_rail 865" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "old_stops >> count(_.hqta_type)" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "id": "1c6d840f-6963-4ab4-8a84-9e0a38aa6de9", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "RangeIndex: 60762 entries, 0 to 60761\n", + "Data columns (total 12 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 agency_primary 60762 non-null object \n", + " 1 hqta_type 60762 non-null object \n", + " 2 stop_id 60762 non-null object \n", + " 3 route_id 60762 non-null object \n", + " 4 hqta_details 60762 non-null object \n", + " 5 agency_secondary 16498 non-null object \n", + " 6 base64_url_primary 60762 non-null object \n", + " 7 base64_url_secondary 16498 non-null object \n", + " 8 org_id_primary 60762 non-null object \n", + " 9 org_id_secondary 16498 non-null object \n", + " 10 peak_trips 60762 non-null int64 \n", + " 11 geometry 60762 non-null geometry\n", + "dtypes: geometry(1), int64(1), object(10)\n", + "memory usage: 5.6+ MB\n" + ] + } + ], + "source": [ + "old_stops.info()" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "773bdc27-d74b-470a-bdbe-afc8ddb9b297", + "metadata": {}, + "outputs": [], + "source": [ + "m2 = (old_stops >> filter(_.hqta_type == 'major_stop_bus')).explore(color='blue')\n", + "m2 = (new_stops >> filter(_.hqta_type == 'major_stop_bus')).explore(m = m2, color='orange')\n", + "folium.LayerControl().add_to(m2);" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "1e7216a1-ff89-46ad-9155-615aa802b254", + "metadata": {}, + "outputs": [], + "source": [ + "# m2" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "id": "3606732d-2bfe-4375-b3f7-331073f4aa36", + "metadata": {}, + "outputs": [], + "source": [ + "from calitp_data_analysis.geography_utils import CA_NAD83Albers" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "e7a05ad5-7616-4b52-9a9d-74aa26cef8c2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
hqta_typearea
0hq_corridor_bus5.909532e+09
1major_stop_brt1.280199e+08
2major_stop_bus4.277683e+09
3major_stop_ferry3.810941e+07
4major_stop_rail7.895734e+08
\n", + "
" + ], + "text/plain": [ + " hqta_type area\n", + "0 hq_corridor_bus 5.909532e+09\n", + "1 major_stop_brt 1.280199e+08\n", + "2 major_stop_bus 4.277683e+09\n", + "3 major_stop_ferry 3.810941e+07\n", + "4 major_stop_rail 7.895734e+08" + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "new_dissolved = new_areas.to_crs(CA_NAD83Albers).dissolve(by='hqta_type').reset_index()\n", + "new_dissolved['area'] = new_dissolved.geometry.apply(lambda x: x.area)\n", + "new_dissolved[['hqta_type', 'area']]" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "641f6ead-9fa1-49ef-9bda-e29a0c5eb7b0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
hqta_typearea
0hq_corridor_bus8.536262e+09
1major_stop_brt1.066221e+08
2major_stop_bus3.639118e+09
3major_stop_ferry2.814088e+07
4major_stop_rail6.248111e+08
\n", + "
" + ], + "text/plain": [ + " hqta_type area\n", + "0 hq_corridor_bus 8.536262e+09\n", + "1 major_stop_brt 1.066221e+08\n", + "2 major_stop_bus 3.639118e+09\n", + "3 major_stop_ferry 2.814088e+07\n", + "4 major_stop_rail 6.248111e+08" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "old_dissolved = old_areas.to_crs(CA_NAD83Albers).dissolve(by='hqta_type').reset_index()\n", + "old_dissolved['area'] = old_dissolved.geometry.apply(lambda x: x.area)\n", + "old_dissolved[['hqta_type', 'area']]" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "25411470-3871-403a-93b3-0a730d343215", + "metadata": {}, + "outputs": [], + "source": [ + "old_hq = old_dissolved >> filter(_.hqta_type == 'major_stop_bus')" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "id": "92076219-bb92-4dc6-8e09-8e128f652767", + "metadata": {}, + "outputs": [], + "source": [ + "new_hq = new_dissolved >> filter(_.hqta_type == \"major_stop_bus\")" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "27604bf0-8a6c-49a9-9722-3cab90a747df", + "metadata": {}, + "outputs": [], + "source": [ + "only_old = old_hq.overlay(new_hq, how='difference')" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "id": "7f406855-9447-47b6-b4cc-428e7e3c2fad", + "metadata": {}, + "outputs": [], + "source": [ + "only_new = new_hq.overlay(old_hq, how='difference')" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "deb1287f-8506-442a-ad16-2cffe3e3d7d0", + "metadata": {}, + "outputs": [], + "source": [ + "# only_new.explore()" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "id": "81a50e44-2373-42ed-b7e9-5f4b9db43357", + "metadata": {}, + "outputs": [], + "source": [ + "# only_old.explore()" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "id": "be86574b-3810-4729-96a1-4fa9258374b0", + "metadata": {}, + "outputs": [], + "source": [ + "import intake" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "26c57baf-118a-4c87-9e4a-70697a26afb9", + "metadata": {}, + "outputs": [], + "source": [ + "catalog = intake.open_catalog(\"*.yml\")" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "id": "34aba925-0a98-4852-89d5-d6ff663564e2", + "metadata": {}, + "outputs": [], + "source": [ + "hqta_points = catalog.hqta_points.read().to_crs(PROJECT_CRS)" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "d5fb6a7d-061d-4b57-aa4e-8cf6c57aa88c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
agency_primaryhqta_typestop_idroute_idhqta_detailsagency_secondarybase64_url_primarybase64_url_secondaryorg_id_primaryorg_id_secondarypeak_tripsgeometry
106072Santa Clara Valley Transportation Authorityhq_corridor_bus6296564Bcorridor_other_stopNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecC5CT95EufmQCXrNone1POINT (-169331.147 -80088.000)
108176Santa Clara Valley Transportation Authoritymajor_stop_bus6296564Bintersection_2_bus_routes_same_operatorSanta Clara Valley Transportation AuthorityaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...recC5CT95EufmQCXrrecC5CT95EufmQCXr1POINT (-169331.147 -80088.000)
\n", + "
" + ], + "text/plain": [ + " agency_primary hqta_type stop_id \\\n", + "106072 Santa Clara Valley Transportation Authority hq_corridor_bus 62965 \n", + "108176 Santa Clara Valley Transportation Authority major_stop_bus 62965 \n", + "\n", + " route_id hqta_details \\\n", + "106072 64B corridor_other_stop \n", + "108176 64B intersection_2_bus_routes_same_operator \n", + "\n", + " agency_secondary \\\n", + "106072 None \n", + "108176 Santa Clara Valley Transportation Authority \n", + "\n", + " base64_url_primary \\\n", + "106072 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... \n", + "108176 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... \n", + "\n", + " base64_url_secondary org_id_primary \\\n", + "106072 None recC5CT95EufmQCXr \n", + "108176 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... recC5CT95EufmQCXr \n", + "\n", + " org_id_secondary peak_trips geometry \n", + "106072 None 1 POINT (-169331.147 -80088.000) \n", + "108176 recC5CT95EufmQCXr 1 POINT (-169331.147 -80088.000) " + ] + }, + "execution_count": 48, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "hqta_points >> filter(_.stop_id=='62965')" + ] + }, + { + "cell_type": "markdown", + "id": "dbfde200-7c8e-47f1-ad86-ccd3e3340c9f", + "metadata": {}, + "source": [ + "## Counting rail/ferry stops\n", + "\n", + "* Prior refactors have us keeping a row per stop_id x route_id, will keep\n", + "* did scan and remove a few ferry stops without bus/rail (Havasu, other Angel Island operator)" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "id": "07a401f6-f897-47c3-b38c-a1257ea8cae9", + "metadata": {}, + "outputs": [], + "source": [ + "# (new_stops >> filter(_.hqta_type == 'major_stop_ferry')).explore()" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "id": "15745774-2787-49fd-b9dd-903d5fde08e5", + "metadata": {}, + "outputs": [], + "source": [ + "# (old_stops >> filter(_.hqta_type == 'major_stop_ferry')).explore()" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "id": "2bfce1f1-a2eb-4e83-b9ec-d1f02d75c7b0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
agency_primaryn
0Chemehuevi Indian Tribe2
1Golden Gate Bridge, Highway and Transportation...5
2San Diego Metropolitan Transit System3
3San Francisco Bay Area Water Emergency Transit...13
4Treasure Island Community Development2
\n", + "
" + ], + "text/plain": [ + " agency_primary n\n", + "0 Chemehuevi Indian Tribe 2\n", + "1 Golden Gate Bridge, Highway and Transportation... 5\n", + "2 San Diego Metropolitan Transit System 3\n", + "3 San Francisco Bay Area Water Emergency Transit... 13\n", + "4 Treasure Island Community Development 2" + ] + }, + "execution_count": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(old_stops >> filter(_.hqta_type == 'major_stop_ferry')) >> count(_.agency_primary)" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "id": "71bf9c4a-a15c-46a5-9e85-3f4e6d3275b3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
agency_primaryn
0Angel Island-Tiburon Ferry Company2
1Chemehuevi Indian Tribe2
2Flagship Cruises and Events Inc.3
3Golden Gate Bridge, Highway and Transportation...9
4San Diego International Airport3
5San Diego Metropolitan Transit System3
6San Francisco Bay Area Water Emergency Transit...26
7Treasure Island Community Development2
\n", + "
" + ], + "text/plain": [ + " agency_primary n\n", + "0 Angel Island-Tiburon Ferry Company 2\n", + "1 Chemehuevi Indian Tribe 2\n", + "2 Flagship Cruises and Events Inc. 3\n", + "3 Golden Gate Bridge, Highway and Transportation... 9\n", + "4 San Diego International Airport 3\n", + "5 San Diego Metropolitan Transit System 3\n", + "6 San Francisco Bay Area Water Emergency Transit... 26\n", + "7 Treasure Island Community Development 2" + ] + }, + "execution_count": 52, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(new_stops >> filter(_.hqta_type == 'major_stop_ferry')) >> count(_.agency_primary)" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "id": "9bcc9408-71a7-4a8c-bac0-44347bff3c39", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
agency_primaryhqta_typestop_idroute_idhqta_detailsagency_secondarybase64_url_primarybase64_url_secondaryorg_id_primaryorg_id_secondarypeak_tripsgeometry
26181Golden Gate Bridge, Highway and Transportation...major_stop_ferry43000LSSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None3POINT (-122.39243 37.79592)
26182Golden Gate Bridge, Highway and Transportation...major_stop_ferry43003SSSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None2POINT (-122.47755 37.85617)
26183Golden Gate Bridge, Highway and Transportation...major_stop_ferry43004LSSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None3POINT (-122.50835 37.94471)
26184Golden Gate Bridge, Highway and Transportation...major_stop_ferry43007TBSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None2POINT (-122.45592 37.87273)
26185Golden Gate Bridge, Highway and Transportation...major_stop_ferry43008AISFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None5POINT (-122.39376 37.79653)
\n", + "
" + ], + "text/plain": [ + " agency_primary hqta_type \\\n", + "26181 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "26182 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "26183 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "26184 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "26185 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "\n", + " stop_id route_id hqta_details agency_secondary \\\n", + "26181 43000 LSSF major_stop_ferry_single_operator None \n", + "26182 43003 SSSF major_stop_ferry_single_operator None \n", + "26183 43004 LSSF major_stop_ferry_single_operator None \n", + "26184 43007 TBSF major_stop_ferry_single_operator None \n", + "26185 43008 AISF major_stop_ferry_single_operator None \n", + "\n", + " base64_url_primary base64_url_secondary \\\n", + "26181 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "26182 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "26183 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "26184 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "26185 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "\n", + " org_id_primary org_id_secondary peak_trips \\\n", + "26181 recoX7qMhlPrgfuz3 None 3 \n", + "26182 recoX7qMhlPrgfuz3 None 2 \n", + "26183 recoX7qMhlPrgfuz3 None 3 \n", + "26184 recoX7qMhlPrgfuz3 None 2 \n", + "26185 recoX7qMhlPrgfuz3 None 5 \n", + "\n", + " geometry \n", + "26181 POINT (-122.39243 37.79592) \n", + "26182 POINT (-122.47755 37.85617) \n", + "26183 POINT (-122.50835 37.94471) \n", + "26184 POINT (-122.45592 37.87273) \n", + "26185 POINT (-122.39376 37.79653) " + ] + }, + "execution_count": 53, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "old_stops >> filter(_.hqta_type == 'major_stop_ferry', _.agency_primary.str.contains('Golden'))" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "id": "3ef7c8b4-a710-4e18-a181-8de327bafe35", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
agency_primaryhqta_typestop_idroute_idhqta_detailsagency_secondarybase64_url_primarybase64_url_secondaryorg_id_primaryorg_id_secondarypeak_tripsgeometry
55389Golden Gate Bridge, Highway and Transportation...major_stop_ferry43000LSSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None3POINT (-122.39243 37.79592)
55390Golden Gate Bridge, Highway and Transportation...major_stop_ferry43000TBSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None3POINT (-122.39243 37.79592)
55391Golden Gate Bridge, Highway and Transportation...major_stop_ferry43000SSSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None3POINT (-122.39243 37.79592)
55392Golden Gate Bridge, Highway and Transportation...major_stop_ferry43003SSSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None1POINT (-122.47755 37.85617)
55393Golden Gate Bridge, Highway and Transportation...major_stop_ferry43004LSSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None2POINT (-122.50835 37.94471)
55394Golden Gate Bridge, Highway and Transportation...major_stop_ferry43007TBSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None1POINT (-122.45592 37.87273)
55395Golden Gate Bridge, Highway and Transportation...major_stop_ferry43008TBSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None1POINT (-122.39376 37.79653)
55396Golden Gate Bridge, Highway and Transportation...major_stop_ferry43008SSSFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None1POINT (-122.39376 37.79653)
55397Golden Gate Bridge, Highway and Transportation...major_stop_ferry43008AISFmajor_stop_ferry_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoX7qMhlPrgfuz3None1POINT (-122.39376 37.79653)
\n", + "
" + ], + "text/plain": [ + " agency_primary hqta_type \\\n", + "55389 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "55390 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "55391 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "55392 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "55393 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "55394 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "55395 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "55396 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "55397 Golden Gate Bridge, Highway and Transportation... major_stop_ferry \n", + "\n", + " stop_id route_id hqta_details agency_secondary \\\n", + "55389 43000 LSSF major_stop_ferry_single_operator None \n", + "55390 43000 TBSF major_stop_ferry_single_operator None \n", + "55391 43000 SSSF major_stop_ferry_single_operator None \n", + "55392 43003 SSSF major_stop_ferry_single_operator None \n", + "55393 43004 LSSF major_stop_ferry_single_operator None \n", + "55394 43007 TBSF major_stop_ferry_single_operator None \n", + "55395 43008 TBSF major_stop_ferry_single_operator None \n", + "55396 43008 SSSF major_stop_ferry_single_operator None \n", + "55397 43008 AISF major_stop_ferry_single_operator None \n", + "\n", + " base64_url_primary base64_url_secondary \\\n", + "55389 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "55390 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "55391 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "55392 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "55393 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "55394 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "55395 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "55396 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "55397 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "\n", + " org_id_primary org_id_secondary peak_trips \\\n", + "55389 recoX7qMhlPrgfuz3 None 3 \n", + "55390 recoX7qMhlPrgfuz3 None 3 \n", + "55391 recoX7qMhlPrgfuz3 None 3 \n", + "55392 recoX7qMhlPrgfuz3 None 1 \n", + "55393 recoX7qMhlPrgfuz3 None 2 \n", + "55394 recoX7qMhlPrgfuz3 None 1 \n", + "55395 recoX7qMhlPrgfuz3 None 1 \n", + "55396 recoX7qMhlPrgfuz3 None 1 \n", + "55397 recoX7qMhlPrgfuz3 None 1 \n", + "\n", + " geometry \n", + "55389 POINT (-122.39243 37.79592) \n", + "55390 POINT (-122.39243 37.79592) \n", + "55391 POINT (-122.39243 37.79592) \n", + "55392 POINT (-122.47755 37.85617) \n", + "55393 POINT (-122.50835 37.94471) \n", + "55394 POINT (-122.45592 37.87273) \n", + "55395 POINT (-122.39376 37.79653) \n", + "55396 POINT (-122.39376 37.79653) \n", + "55397 POINT (-122.39376 37.79653) " + ] + }, + "execution_count": 54, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "new_stops >> filter(_.hqta_type == 'major_stop_ferry', _.agency_primary.str.contains('Golden'))" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "id": "968d71da-61a2-4fc5-9976-8be3727ec865", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
agency_primaryhqta_typestop_idroute_idhqta_detailsagency_secondarybase64_url_primarybase64_url_secondaryorg_id_primaryorg_id_secondarypeak_tripsgeometry
99044San Francisco Bay Area Rapid Transit Districtmajor_stop_rail12THYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None23POINT (-122.27159 37.80347)
99045San Francisco Bay Area Rapid Transit Districtmajor_stop_rail12THOrange-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None23POINT (-122.27159 37.80347)
99046San Francisco Bay Area Rapid Transit Districtmajor_stop_rail12THRed-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None23POINT (-122.27159 37.80347)
99047San Francisco Bay Area Rapid Transit Districtmajor_stop_rail12THYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None23POINT (-122.27159 37.80347)
99048San Francisco Bay Area Rapid Transit Districtmajor_stop_rail12THOrange-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None23POINT (-122.27159 37.80347)
.......................................
99269San Francisco Bay Area Rapid Transit Districtmajor_stop_railWOAKGreen-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None29POINT (-122.29514 37.80492)
99270San Francisco Bay Area Rapid Transit Districtmajor_stop_railWOAKRed-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None29POINT (-122.29514 37.80492)
99271San Francisco Bay Area Rapid Transit Districtmajor_stop_railWOAKYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None29POINT (-122.29514 37.80492)
99272San Francisco Bay Area Rapid Transit Districtmajor_stop_railWOAKBlue-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None29POINT (-122.29514 37.80492)
99273San Francisco Bay Area Rapid Transit Districtmajor_stop_railWOAKGreen-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None29POINT (-122.29514 37.80492)
\n", + "

230 rows × 12 columns

\n", + "
" + ], + "text/plain": [ + " agency_primary hqta_type stop_id \\\n", + "99044 San Francisco Bay Area Rapid Transit District major_stop_rail 12TH \n", + "99045 San Francisco Bay Area Rapid Transit District major_stop_rail 12TH \n", + "99046 San Francisco Bay Area Rapid Transit District major_stop_rail 12TH \n", + "99047 San Francisco Bay Area Rapid Transit District major_stop_rail 12TH \n", + "99048 San Francisco Bay Area Rapid Transit District major_stop_rail 12TH \n", + "... ... ... ... \n", + "99269 San Francisco Bay Area Rapid Transit District major_stop_rail WOAK \n", + "99270 San Francisco Bay Area Rapid Transit District major_stop_rail WOAK \n", + "99271 San Francisco Bay Area Rapid Transit District major_stop_rail WOAK \n", + "99272 San Francisco Bay Area Rapid Transit District major_stop_rail WOAK \n", + "99273 San Francisco Bay Area Rapid Transit District major_stop_rail WOAK \n", + "\n", + " route_id hqta_details agency_secondary \\\n", + "99044 Yellow-S major_stop_rail_single_operator None \n", + "99045 Orange-S major_stop_rail_single_operator None \n", + "99046 Red-S major_stop_rail_single_operator None \n", + "99047 Yellow-N major_stop_rail_single_operator None \n", + "99048 Orange-N major_stop_rail_single_operator None \n", + "... ... ... ... \n", + "99269 Green-N major_stop_rail_single_operator None \n", + "99270 Red-S major_stop_rail_single_operator None \n", + "99271 Yellow-S major_stop_rail_single_operator None \n", + "99272 Blue-S major_stop_rail_single_operator None \n", + "99273 Green-S major_stop_rail_single_operator None \n", + "\n", + " base64_url_primary base64_url_secondary \\\n", + "99044 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "99045 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "99046 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "99047 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "99048 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "... ... ... \n", + "99269 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "99270 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "99271 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "99272 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "99273 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "\n", + " org_id_primary org_id_secondary peak_trips \\\n", + "99044 recoQLeNRISCKF8I0 None 23 \n", + "99045 recoQLeNRISCKF8I0 None 23 \n", + "99046 recoQLeNRISCKF8I0 None 23 \n", + "99047 recoQLeNRISCKF8I0 None 23 \n", + "99048 recoQLeNRISCKF8I0 None 23 \n", + "... ... ... ... \n", + "99269 recoQLeNRISCKF8I0 None 29 \n", + "99270 recoQLeNRISCKF8I0 None 29 \n", + "99271 recoQLeNRISCKF8I0 None 29 \n", + "99272 recoQLeNRISCKF8I0 None 29 \n", + "99273 recoQLeNRISCKF8I0 None 29 \n", + "\n", + " geometry \n", + "99044 POINT (-122.27159 37.80347) \n", + "99045 POINT (-122.27159 37.80347) \n", + "99046 POINT (-122.27159 37.80347) \n", + "99047 POINT (-122.27159 37.80347) \n", + "99048 POINT (-122.27159 37.80347) \n", + "... ... \n", + "99269 POINT (-122.29514 37.80492) \n", + "99270 POINT (-122.29514 37.80492) \n", + "99271 POINT (-122.29514 37.80492) \n", + "99272 POINT (-122.29514 37.80492) \n", + "99273 POINT (-122.29514 37.80492) \n", + "\n", + "[230 rows x 12 columns]" + ] + }, + "execution_count": 55, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "new_stops >> filter(_.hqta_type == 'major_stop_rail', _.agency_primary.str.contains('Bay Area'))" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "id": "81508f11-9b54-4c1e-8cdc-a6a810b4bb91", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
agency_primaryhqta_typestop_idroute_idhqta_detailsagency_secondarybase64_url_primarybase64_url_secondaryorg_id_primaryorg_id_secondarypeak_tripsgeometry
52186San Francisco Bay Area Rapid Transit Districtmajor_stop_rail12THYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None24POINT (-122.27159 37.80347)
52187San Francisco Bay Area Rapid Transit Districtmajor_stop_rail16THYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None30POINT (-122.41975 37.76518)
52188San Francisco Bay Area Rapid Transit Districtmajor_stop_rail19THOrange-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None25POINT (-122.26872 37.80806)
52189San Francisco Bay Area Rapid Transit Districtmajor_stop_rail24THRed-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None30POINT (-122.41852 37.75242)
52190San Francisco Bay Area Rapid Transit Districtmajor_stop_railANTCYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None6POINT (-121.78035 37.99541)
52191San Francisco Bay Area Rapid Transit Districtmajor_stop_railASHBOrange-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.26975 37.85307)
52192San Francisco Bay Area Rapid Transit Districtmajor_stop_railBALBRed-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None30POINT (-122.44751 37.72176)
52193San Francisco Bay Area Rapid Transit Districtmajor_stop_railBAYFGreen-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None18POINT (-122.12643 37.69694)
52194San Francisco Bay Area Rapid Transit Districtmajor_stop_railBERYOrange-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-121.87466 37.36849)
52195San Francisco Bay Area Rapid Transit Districtmajor_stop_railCASTBlue-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None6POINT (-122.07561 37.69078)
52196San Francisco Bay Area Rapid Transit Districtmajor_stop_railCIVCBlue-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None30POINT (-122.41388 37.77945)
52197San Francisco Bay Area Rapid Transit Districtmajor_stop_railCOLMYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None18POINT (-122.46617 37.68464)
52198San Francisco Bay Area Rapid Transit Districtmajor_stop_railCOLSBeige-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None38POINT (-122.19670 37.75360)
52199San Francisco Bay Area Rapid Transit Districtmajor_stop_railCONCYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.02913 37.97377)
52200San Francisco Bay Area Rapid Transit Districtmajor_stop_railDALYYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None30POINT (-122.46899 37.70630)
52201San Francisco Bay Area Rapid Transit Districtmajor_stop_railDBRKRed-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.26808 37.87012)
52202San Francisco Bay Area Rapid Transit Districtmajor_stop_railDELNOrange-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.31687 37.92520)
52203San Francisco Bay Area Rapid Transit Districtmajor_stop_railDUBLBlue-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None6POINT (-121.89924 37.70169)
52204San Francisco Bay Area Rapid Transit Districtmajor_stop_railEMBRBlue-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None30POINT (-122.39708 37.79279)
52205San Francisco Bay Area Rapid Transit Districtmajor_stop_railFRMTOrange-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-121.97661 37.55751)
52206San Francisco Bay Area Rapid Transit Districtmajor_stop_railFTVLOrange-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None18POINT (-122.22407 37.77487)
52207San Francisco Bay Area Rapid Transit Districtmajor_stop_railGLENYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None30POINT (-122.43356 37.73327)
52208San Francisco Bay Area Rapid Transit Districtmajor_stop_railHAYWOrange-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.08694 37.66973)
52209San Francisco Bay Area Rapid Transit Districtmajor_stop_railLAFYYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.12464 37.89322)
52210San Francisco Bay Area Rapid Transit Districtmajor_stop_railLAKEGreen-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None18POINT (-122.26523 37.79736)
52211San Francisco Bay Area Rapid Transit Districtmajor_stop_railMCARYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None24POINT (-122.26716 37.82881)
52212San Francisco Bay Area Rapid Transit Districtmajor_stop_railMLBRYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None6POINT (-122.38684 37.60020)
52213San Francisco Bay Area Rapid Transit Districtmajor_stop_railMLPTGreen-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-121.89080 37.40984)
52214San Francisco Bay Area Rapid Transit Districtmajor_stop_railMONTYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None30POINT (-122.40164 37.78921)
52215San Francisco Bay Area Rapid Transit Districtmajor_stop_railNBRKOrange-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.28351 37.87403)
52216San Francisco Bay Area Rapid Transit Districtmajor_stop_railNCONYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.02456 38.00341)
52217San Francisco Bay Area Rapid Transit Districtmajor_stop_railOAKLBeige-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None20POINT (-122.21224 37.71326)
52218San Francisco Bay Area Rapid Transit Districtmajor_stop_railORINYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.18372 37.87850)
52219San Francisco Bay Area Rapid Transit Districtmajor_stop_railPCTRYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None6POINT (-121.88901 38.01687)
52220San Francisco Bay Area Rapid Transit Districtmajor_stop_railPHILYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.05602 37.92846)
52221San Francisco Bay Area Rapid Transit Districtmajor_stop_railPITTYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-121.94425 38.01895)
52222San Francisco Bay Area Rapid Transit Districtmajor_stop_railPLZAOrange-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.29890 37.90263)
52223San Francisco Bay Area Rapid Transit Districtmajor_stop_railPOWLGreen-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None30POINT (-122.40739 37.78464)
52224San Francisco Bay Area Rapid Transit Districtmajor_stop_railRICHOrange-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.35300 37.93679)
52225San Francisco Bay Area Rapid Transit Districtmajor_stop_railROCKYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None13POINT (-122.25127 37.84479)
52226San Francisco Bay Area Rapid Transit Districtmajor_stop_railSANLGreen-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None18POINT (-122.16071 37.72181)
52227San Francisco Bay Area Rapid Transit Districtmajor_stop_railSBRNYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None18POINT (-122.41638 37.63772)
52228San Francisco Bay Area Rapid Transit Districtmajor_stop_railSFIAYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None24POINT (-122.39190 37.61602)
52229San Francisco Bay Area Rapid Transit Districtmajor_stop_railSHAYOrange-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.05716 37.63436)
52230San Francisco Bay Area Rapid Transit Districtmajor_stop_railSSANYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None18POINT (-122.44425 37.66444)
52231San Francisco Bay Area Rapid Transit Districtmajor_stop_railUCTYGreen-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.01723 37.59076)
52232San Francisco Bay Area Rapid Transit Districtmajor_stop_railWARMGreen-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-121.93936 37.50231)
52233San Francisco Bay Area Rapid Transit Districtmajor_stop_railWCRKYellow-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None12POINT (-122.06738 37.90581)
52234San Francisco Bay Area Rapid Transit Districtmajor_stop_railWDUBBlue-Smajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None6POINT (-121.92830 37.69976)
52235San Francisco Bay Area Rapid Transit Districtmajor_stop_railWOAKYellow-Nmajor_stop_rail_single_operatorNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecoQLeNRISCKF8I0None30POINT (-122.29514 37.80492)
\n", + "
" + ], + "text/plain": [ + " agency_primary hqta_type stop_id \\\n", + "52186 San Francisco Bay Area Rapid Transit District major_stop_rail 12TH \n", + "52187 San Francisco Bay Area Rapid Transit District major_stop_rail 16TH \n", + "52188 San Francisco Bay Area Rapid Transit District major_stop_rail 19TH \n", + "52189 San Francisco Bay Area Rapid Transit District major_stop_rail 24TH \n", + "52190 San Francisco Bay Area Rapid Transit District major_stop_rail ANTC \n", + "52191 San Francisco Bay Area Rapid Transit District major_stop_rail ASHB \n", + "52192 San Francisco Bay Area Rapid Transit District major_stop_rail BALB \n", + "52193 San Francisco Bay Area Rapid Transit District major_stop_rail BAYF \n", + "52194 San Francisco Bay Area Rapid Transit District major_stop_rail BERY \n", + "52195 San Francisco Bay Area Rapid Transit District major_stop_rail CAST \n", + "52196 San Francisco Bay Area Rapid Transit District major_stop_rail CIVC \n", + "52197 San Francisco Bay Area Rapid Transit District major_stop_rail COLM \n", + "52198 San Francisco Bay Area Rapid Transit District major_stop_rail COLS \n", + "52199 San Francisco Bay Area Rapid Transit District major_stop_rail CONC \n", + "52200 San Francisco Bay Area Rapid Transit District major_stop_rail DALY \n", + "52201 San Francisco Bay Area Rapid Transit District major_stop_rail DBRK \n", + "52202 San Francisco Bay Area Rapid Transit District major_stop_rail DELN \n", + "52203 San Francisco Bay Area Rapid Transit District major_stop_rail DUBL \n", + "52204 San Francisco Bay Area Rapid Transit District major_stop_rail EMBR \n", + "52205 San Francisco Bay Area Rapid Transit District major_stop_rail FRMT \n", + "52206 San Francisco Bay Area Rapid Transit District major_stop_rail FTVL \n", + "52207 San Francisco Bay Area Rapid Transit District major_stop_rail GLEN \n", + "52208 San Francisco Bay Area Rapid Transit District major_stop_rail HAYW \n", + "52209 San Francisco Bay Area Rapid Transit District major_stop_rail LAFY \n", + "52210 San Francisco Bay Area Rapid Transit District major_stop_rail LAKE \n", + "52211 San Francisco Bay Area Rapid Transit District major_stop_rail MCAR \n", + "52212 San Francisco Bay Area Rapid Transit District major_stop_rail MLBR \n", + "52213 San Francisco Bay Area Rapid Transit District major_stop_rail MLPT \n", + "52214 San Francisco Bay Area Rapid Transit District major_stop_rail MONT \n", + "52215 San Francisco Bay Area Rapid Transit District major_stop_rail NBRK \n", + "52216 San Francisco Bay Area Rapid Transit District major_stop_rail NCON \n", + "52217 San Francisco Bay Area Rapid Transit District major_stop_rail OAKL \n", + "52218 San Francisco Bay Area Rapid Transit District major_stop_rail ORIN \n", + "52219 San Francisco Bay Area Rapid Transit District major_stop_rail PCTR \n", + "52220 San Francisco Bay Area Rapid Transit District major_stop_rail PHIL \n", + "52221 San Francisco Bay Area Rapid Transit District major_stop_rail PITT \n", + "52222 San Francisco Bay Area Rapid Transit District major_stop_rail PLZA \n", + "52223 San Francisco Bay Area Rapid Transit District major_stop_rail POWL \n", + "52224 San Francisco Bay Area Rapid Transit District major_stop_rail RICH \n", + "52225 San Francisco Bay Area Rapid Transit District major_stop_rail ROCK \n", + "52226 San Francisco Bay Area Rapid Transit District major_stop_rail SANL \n", + "52227 San Francisco Bay Area Rapid Transit District major_stop_rail SBRN \n", + "52228 San Francisco Bay Area Rapid Transit District major_stop_rail SFIA \n", + "52229 San Francisco Bay Area Rapid Transit District major_stop_rail SHAY \n", + "52230 San Francisco Bay Area Rapid Transit District major_stop_rail SSAN \n", + "52231 San Francisco Bay Area Rapid Transit District major_stop_rail UCTY \n", + "52232 San Francisco Bay Area Rapid Transit District major_stop_rail WARM \n", + "52233 San Francisco Bay Area Rapid Transit District major_stop_rail WCRK \n", + "52234 San Francisco Bay Area Rapid Transit District major_stop_rail WDUB \n", + "52235 San Francisco Bay Area Rapid Transit District major_stop_rail WOAK \n", + "\n", + " route_id hqta_details agency_secondary \\\n", + "52186 Yellow-S major_stop_rail_single_operator None \n", + "52187 Yellow-N major_stop_rail_single_operator None \n", + "52188 Orange-N major_stop_rail_single_operator None \n", + "52189 Red-S major_stop_rail_single_operator None \n", + "52190 Yellow-N major_stop_rail_single_operator None \n", + "52191 Orange-N major_stop_rail_single_operator None \n", + "52192 Red-S major_stop_rail_single_operator None \n", + "52193 Green-S major_stop_rail_single_operator None \n", + "52194 Orange-N major_stop_rail_single_operator None \n", + "52195 Blue-S major_stop_rail_single_operator None \n", + "52196 Blue-N major_stop_rail_single_operator None \n", + "52197 Yellow-S major_stop_rail_single_operator None \n", + "52198 Beige-S major_stop_rail_single_operator None \n", + "52199 Yellow-S major_stop_rail_single_operator None \n", + "52200 Yellow-N major_stop_rail_single_operator None \n", + "52201 Red-N major_stop_rail_single_operator None \n", + "52202 Orange-S major_stop_rail_single_operator None \n", + "52203 Blue-N major_stop_rail_single_operator None \n", + "52204 Blue-S major_stop_rail_single_operator None \n", + "52205 Orange-N major_stop_rail_single_operator None \n", + "52206 Orange-N major_stop_rail_single_operator None \n", + "52207 Yellow-N major_stop_rail_single_operator None \n", + "52208 Orange-S major_stop_rail_single_operator None \n", + "52209 Yellow-N major_stop_rail_single_operator None \n", + "52210 Green-N major_stop_rail_single_operator None \n", + "52211 Yellow-N major_stop_rail_single_operator None \n", + "52212 Yellow-N major_stop_rail_single_operator None \n", + "52213 Green-S major_stop_rail_single_operator None \n", + "52214 Yellow-N major_stop_rail_single_operator None \n", + "52215 Orange-N major_stop_rail_single_operator None \n", + "52216 Yellow-S major_stop_rail_single_operator None \n", + "52217 Beige-S major_stop_rail_single_operator None \n", + "52218 Yellow-S major_stop_rail_single_operator None \n", + "52219 Yellow-N major_stop_rail_single_operator None \n", + "52220 Yellow-S major_stop_rail_single_operator None \n", + "52221 Yellow-S major_stop_rail_single_operator None \n", + "52222 Orange-S major_stop_rail_single_operator None \n", + "52223 Green-N major_stop_rail_single_operator None \n", + "52224 Orange-S major_stop_rail_single_operator None \n", + "52225 Yellow-N major_stop_rail_single_operator None \n", + "52226 Green-S major_stop_rail_single_operator None \n", + "52227 Yellow-S major_stop_rail_single_operator None \n", + "52228 Yellow-N major_stop_rail_single_operator None \n", + "52229 Orange-N major_stop_rail_single_operator None \n", + "52230 Yellow-S major_stop_rail_single_operator None \n", + "52231 Green-N major_stop_rail_single_operator None \n", + "52232 Green-S major_stop_rail_single_operator None \n", + "52233 Yellow-S major_stop_rail_single_operator None \n", + "52234 Blue-S major_stop_rail_single_operator None \n", + "52235 Yellow-N major_stop_rail_single_operator None \n", + "\n", + " base64_url_primary base64_url_secondary \\\n", + "52186 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52187 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52188 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52189 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52190 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52191 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52192 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52193 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52194 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52195 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52196 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52197 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52198 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52199 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52200 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52201 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52202 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52203 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52204 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52205 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52206 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52207 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52208 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52209 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52210 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52211 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52212 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52213 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52214 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52215 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52216 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52217 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52218 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52219 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52220 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52221 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52222 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52223 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52224 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52225 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52226 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52227 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52228 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52229 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52230 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52231 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52232 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52233 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52234 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "52235 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... None \n", + "\n", + " org_id_primary org_id_secondary peak_trips \\\n", + "52186 recoQLeNRISCKF8I0 None 24 \n", + "52187 recoQLeNRISCKF8I0 None 30 \n", + "52188 recoQLeNRISCKF8I0 None 25 \n", + "52189 recoQLeNRISCKF8I0 None 30 \n", + "52190 recoQLeNRISCKF8I0 None 6 \n", + "52191 recoQLeNRISCKF8I0 None 12 \n", + "52192 recoQLeNRISCKF8I0 None 30 \n", + "52193 recoQLeNRISCKF8I0 None 18 \n", + "52194 recoQLeNRISCKF8I0 None 12 \n", + "52195 recoQLeNRISCKF8I0 None 6 \n", + "52196 recoQLeNRISCKF8I0 None 30 \n", + "52197 recoQLeNRISCKF8I0 None 18 \n", + "52198 recoQLeNRISCKF8I0 None 38 \n", + "52199 recoQLeNRISCKF8I0 None 12 \n", + "52200 recoQLeNRISCKF8I0 None 30 \n", + "52201 recoQLeNRISCKF8I0 None 12 \n", + "52202 recoQLeNRISCKF8I0 None 12 \n", + "52203 recoQLeNRISCKF8I0 None 6 \n", + "52204 recoQLeNRISCKF8I0 None 30 \n", + "52205 recoQLeNRISCKF8I0 None 12 \n", + "52206 recoQLeNRISCKF8I0 None 18 \n", + "52207 recoQLeNRISCKF8I0 None 30 \n", + "52208 recoQLeNRISCKF8I0 None 12 \n", + "52209 recoQLeNRISCKF8I0 None 12 \n", + "52210 recoQLeNRISCKF8I0 None 18 \n", + "52211 recoQLeNRISCKF8I0 None 24 \n", + "52212 recoQLeNRISCKF8I0 None 6 \n", + "52213 recoQLeNRISCKF8I0 None 12 \n", + "52214 recoQLeNRISCKF8I0 None 30 \n", + "52215 recoQLeNRISCKF8I0 None 12 \n", + "52216 recoQLeNRISCKF8I0 None 12 \n", + "52217 recoQLeNRISCKF8I0 None 20 \n", + "52218 recoQLeNRISCKF8I0 None 12 \n", + "52219 recoQLeNRISCKF8I0 None 6 \n", + "52220 recoQLeNRISCKF8I0 None 12 \n", + "52221 recoQLeNRISCKF8I0 None 12 \n", + "52222 recoQLeNRISCKF8I0 None 12 \n", + "52223 recoQLeNRISCKF8I0 None 30 \n", + "52224 recoQLeNRISCKF8I0 None 12 \n", + "52225 recoQLeNRISCKF8I0 None 13 \n", + "52226 recoQLeNRISCKF8I0 None 18 \n", + "52227 recoQLeNRISCKF8I0 None 18 \n", + "52228 recoQLeNRISCKF8I0 None 24 \n", + "52229 recoQLeNRISCKF8I0 None 12 \n", + "52230 recoQLeNRISCKF8I0 None 18 \n", + "52231 recoQLeNRISCKF8I0 None 12 \n", + "52232 recoQLeNRISCKF8I0 None 12 \n", + "52233 recoQLeNRISCKF8I0 None 12 \n", + "52234 recoQLeNRISCKF8I0 None 6 \n", + "52235 recoQLeNRISCKF8I0 None 30 \n", + "\n", + " geometry \n", + "52186 POINT (-122.27159 37.80347) \n", + "52187 POINT (-122.41975 37.76518) \n", + "52188 POINT (-122.26872 37.80806) \n", + "52189 POINT (-122.41852 37.75242) \n", + "52190 POINT (-121.78035 37.99541) \n", + "52191 POINT (-122.26975 37.85307) \n", + "52192 POINT (-122.44751 37.72176) \n", + "52193 POINT (-122.12643 37.69694) \n", + "52194 POINT (-121.87466 37.36849) \n", + "52195 POINT (-122.07561 37.69078) \n", + "52196 POINT (-122.41388 37.77945) \n", + "52197 POINT (-122.46617 37.68464) \n", + "52198 POINT (-122.19670 37.75360) \n", + "52199 POINT (-122.02913 37.97377) \n", + "52200 POINT (-122.46899 37.70630) \n", + "52201 POINT (-122.26808 37.87012) \n", + "52202 POINT (-122.31687 37.92520) \n", + "52203 POINT (-121.89924 37.70169) \n", + "52204 POINT (-122.39708 37.79279) \n", + "52205 POINT (-121.97661 37.55751) \n", + "52206 POINT (-122.22407 37.77487) \n", + "52207 POINT (-122.43356 37.73327) \n", + "52208 POINT (-122.08694 37.66973) \n", + "52209 POINT (-122.12464 37.89322) \n", + "52210 POINT (-122.26523 37.79736) \n", + "52211 POINT (-122.26716 37.82881) \n", + "52212 POINT (-122.38684 37.60020) \n", + "52213 POINT (-121.89080 37.40984) \n", + "52214 POINT (-122.40164 37.78921) \n", + "52215 POINT (-122.28351 37.87403) \n", + "52216 POINT (-122.02456 38.00341) \n", + "52217 POINT (-122.21224 37.71326) \n", + "52218 POINT (-122.18372 37.87850) \n", + "52219 POINT (-121.88901 38.01687) \n", + "52220 POINT (-122.05602 37.92846) \n", + "52221 POINT (-121.94425 38.01895) \n", + "52222 POINT (-122.29890 37.90263) \n", + "52223 POINT (-122.40739 37.78464) \n", + "52224 POINT (-122.35300 37.93679) \n", + "52225 POINT (-122.25127 37.84479) \n", + "52226 POINT (-122.16071 37.72181) \n", + "52227 POINT (-122.41638 37.63772) \n", + "52228 POINT (-122.39190 37.61602) \n", + "52229 POINT (-122.05716 37.63436) \n", + "52230 POINT (-122.44425 37.66444) \n", + "52231 POINT (-122.01723 37.59076) \n", + "52232 POINT (-121.93936 37.50231) \n", + "52233 POINT (-122.06738 37.90581) \n", + "52234 POINT (-121.92830 37.69976) \n", + "52235 POINT (-122.29514 37.80492) " + ] + }, + "execution_count": 56, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "old_stops >> filter(_.hqta_type == 'major_stop_rail', _.agency_primary.str.contains('Bay Area'))" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "id": "cad5a998-9ccd-4412-ac19-92e5c20ea5a3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
agency_primaryhqta_typestop_idroute_idhqta_detailsagency_secondarybase64_url_primarybase64_url_secondaryorg_id_primaryorg_id_secondarypeak_tripsgeometry
0Alameda-Contra Costa Transit Districthq_corridor_bus5000029corridor_other_stopNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecOZgevYf7Jimm9LNone2POINT (-122.24686 37.80941)
1Alameda-Contra Costa Transit Districthq_corridor_bus50006Lcorridor_other_stopNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecOZgevYf7Jimm9LNone0POINT (-122.39791 37.78818)
2Alameda-Contra Costa Transit Districthq_corridor_bus50008LAcorridor_other_stopNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecOZgevYf7Jimm9LNone0POINT (-122.39776 37.78830)
3Alameda-Contra Costa Transit Districthq_corridor_bus50010FScorridor_other_stopNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecOZgevYf7Jimm9LNone0POINT (-122.39761 37.78842)
4Alameda-Contra Costa Transit Districthq_corridor_bus50012Gcorridor_other_stopNoneaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...NonerecOZgevYf7Jimm9LNone0POINT (-122.39746 37.78854)
.......................................
114832Yuba-Sutter Transit Authoritymajor_stop_bus758936364intersection_2_bus_routes_same_operatorYuba-Sutter Transit AuthorityaHR0cHM6Ly9kYXRhLnRyaWxsaXVtdHJhbnNpdC5jb20vZ3...aHR0cHM6Ly9kYXRhLnRyaWxsaXVtdHJhbnNpdC5jb20vZ3...rech0BusKA17h0vuLrech0BusKA17h0vuL3POINT (-121.53724 39.07871)
114833Yuma County Intergovernmental Public Transport...hq_corridor_bus4323corridor_other_stopNoneaHR0cHM6Ly93d3cueWNpcHRhLm9yZy9ndGZzL2dvb2dsZV...NonereclW3IXkAAyivJtqNone0POINT (-114.61527 32.73178)
114834Yuma County Intergovernmental Public Transport...hq_corridor_bus50023corridor_other_stopNoneaHR0cHM6Ly93d3cueWNpcHRhLm9yZy9ndGZzL2dvb2dsZV...NonereclW3IXkAAyivJtqNone0POINT (-115.56774 32.79162)
114835Yuma County Intergovernmental Public Transport...hq_corridor_bus53623corridor_other_stopNoneaHR0cHM6Ly93d3cueWNpcHRhLm9yZy9ndGZzL2dvb2dsZV...NonereclW3IXkAAyivJtqNone0POINT (-115.55900 32.79160)
114836Yuma County Intergovernmental Public Transport...hq_corridor_bus62423corridor_other_stopNoneaHR0cHM6Ly93d3cueWNpcHRhLm9yZy9ndGZzL2dvb2dsZV...NonereclW3IXkAAyivJtqNone0POINT (-115.56116 32.79171)
\n", + "

114837 rows × 12 columns

\n", + "
" + ], + "text/plain": [ + " agency_primary hqta_type \\\n", + "0 Alameda-Contra Costa Transit District hq_corridor_bus \n", + "1 Alameda-Contra Costa Transit District hq_corridor_bus \n", + "2 Alameda-Contra Costa Transit District hq_corridor_bus \n", + "3 Alameda-Contra Costa Transit District hq_corridor_bus \n", + "4 Alameda-Contra Costa Transit District hq_corridor_bus \n", + "... ... ... \n", + "114832 Yuba-Sutter Transit Authority major_stop_bus \n", + "114833 Yuma County Intergovernmental Public Transport... hq_corridor_bus \n", + "114834 Yuma County Intergovernmental Public Transport... hq_corridor_bus \n", + "114835 Yuma County Intergovernmental Public Transport... hq_corridor_bus \n", + "114836 Yuma County Intergovernmental Public Transport... hq_corridor_bus \n", + "\n", + " stop_id route_id hqta_details \\\n", + "0 50000 29 corridor_other_stop \n", + "1 50006 L corridor_other_stop \n", + "2 50008 LA corridor_other_stop \n", + "3 50010 FS corridor_other_stop \n", + "4 50012 G corridor_other_stop \n", + "... ... ... ... \n", + "114832 758936 364 intersection_2_bus_routes_same_operator \n", + "114833 43 23 corridor_other_stop \n", + "114834 500 23 corridor_other_stop \n", + "114835 536 23 corridor_other_stop \n", + "114836 624 23 corridor_other_stop \n", + "\n", + " agency_secondary \\\n", + "0 None \n", + "1 None \n", + "2 None \n", + "3 None \n", + "4 None \n", + "... ... \n", + "114832 Yuba-Sutter Transit Authority \n", + "114833 None \n", + "114834 None \n", + "114835 None \n", + "114836 None \n", + "\n", + " base64_url_primary \\\n", + "0 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... \n", + "1 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... \n", + "2 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... \n", + "3 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... \n", + "4 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... \n", + "... ... \n", + "114832 aHR0cHM6Ly9kYXRhLnRyaWxsaXVtdHJhbnNpdC5jb20vZ3... \n", + "114833 aHR0cHM6Ly93d3cueWNpcHRhLm9yZy9ndGZzL2dvb2dsZV... \n", + "114834 aHR0cHM6Ly93d3cueWNpcHRhLm9yZy9ndGZzL2dvb2dsZV... \n", + "114835 aHR0cHM6Ly93d3cueWNpcHRhLm9yZy9ndGZzL2dvb2dsZV... \n", + "114836 aHR0cHM6Ly93d3cueWNpcHRhLm9yZy9ndGZzL2dvb2dsZV... \n", + "\n", + " base64_url_secondary org_id_primary \\\n", + "0 None recOZgevYf7Jimm9L \n", + "1 None recOZgevYf7Jimm9L \n", + "2 None recOZgevYf7Jimm9L \n", + "3 None recOZgevYf7Jimm9L \n", + "4 None recOZgevYf7Jimm9L \n", + "... ... ... \n", + "114832 aHR0cHM6Ly9kYXRhLnRyaWxsaXVtdHJhbnNpdC5jb20vZ3... rech0BusKA17h0vuL \n", + "114833 None reclW3IXkAAyivJtq \n", + "114834 None reclW3IXkAAyivJtq \n", + "114835 None reclW3IXkAAyivJtq \n", + "114836 None reclW3IXkAAyivJtq \n", + "\n", + " org_id_secondary peak_trips geometry \n", + "0 None 2 POINT (-122.24686 37.80941) \n", + "1 None 0 POINT (-122.39791 37.78818) \n", + "2 None 0 POINT (-122.39776 37.78830) \n", + "3 None 0 POINT (-122.39761 37.78842) \n", + "4 None 0 POINT (-122.39746 37.78854) \n", + "... ... ... ... \n", + "114832 rech0BusKA17h0vuL 3 POINT (-121.53724 39.07871) \n", + "114833 None 0 POINT (-114.61527 32.73178) \n", + "114834 None 0 POINT (-115.56774 32.79162) \n", + "114835 None 0 POINT (-115.55900 32.79160) \n", + "114836 None 0 POINT (-115.56116 32.79171) \n", + "\n", + "[114837 rows x 12 columns]" + ] + }, + "execution_count": 58, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "new_stops" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4d6548f2-ce81-4ddb-a012-a8cb9d35b95d", + "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" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "state": {}, + "version_major": 2, + "version_minor": 0 + } + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/high_quality_transit_areas/README.md b/high_quality_transit_areas/README.md index 45fb2f624..a2afa9d63 100644 --- a/high_quality_transit_areas/README.md +++ b/high_quality_transit_areas/README.md @@ -11,32 +11,59 @@ These datasets are updated **monthly**. We usually use a Wednesday in the middle ## Understanding the Open Data -Per statute, High Quality Transit Areas are defined as the _areas surrounding_ high quality transit corridors and major transit stops. Therefore, if you're looking for our most authoratative data on where HQTAs are within California, please start with the HQTA Areas (polygon) dataset. +### Frequency Standards have Diverged -Major transit stop is a more restrictive definition that high quality transit corridor. A high quality corridor only requires that there be service in that corridor meeting the frequency standard. It need not be one route alone meeting the frequency standard – therefore we cut corridors into segments and make the high quality corridor determination based on the stop with the most trips in that segment (even if those trips are on different routes). It is possible and valid for a high quality corridor to contain no major transit stops at all. +Assembly Bill 2553(2024) is changing the definition of a bus major transit stop to be the intersection of two corridors with a service interval (headway) of every 20 minutes (3 trips/hr), instead of every 15 minutes (4 trips/hr). Although the bill formally takes effect January 1, 2025, our dataset now incorporates this change. -On the other hand, major transit stops exist at the intersection of two high-quality transit corridors as described above, and also at any rail station, most ferry terminals, and select BRT stations. +This means that there are now two frequency standards captured by this dataset: -Using the HQTA Areas dataset, it's possible to determine if an area qualifies because it is a high quality corridor, major transit stop, or both. This is useful for certain kinds of analyses, since some statutes and programs only reference major transit stops and don't include high quality corridors. +* 4 trips/hr (15min headway) for high quality transit corridors, as well as bus rapid transit major stops (along with other requirements for BRT) +* 3 trips/hr (20min headway) for bus corridors intersecting to form a bus major stop -We provide the HQTA Stops dataset as a convienience for certain kinds of analysis where it would be helpful to know actual stop locations. Note that the `hq_corridor_bus` type includes all stops in a high quality corridor. Since we make the high quality corridor determination at the corridor segment level and only then find the stops within that corridor, not every `hq_corridor_stop` is guaranteed to have frequent service (though they could all have frequent service, and at least one stop every 1,250 meters will have frequent service). +With this change, bus major stops are no longer a subset of high quality transit corridors, since the intersection of two corridors with frequencies of 3 trips/hr now creates a major stop despite neither being a high quality transit corridor. -### Additional Details -* The AM peak period is defined as 12:00 AM - 11:59 AM. The PM peak period is defined as 12:00 PM - 11:59 PM. - * Frequencies are calculated for each stop per hour. The highest frequency in the period before noon is counted for AM peak frequency; the highest frequency in the period after noon is counted for PM peak frequency. +For more details, see [links](#High-Quality-Transit-Areas-Relevant-Statutes) to each statute below. + +### How We Count Frequencies + +* The AM peak period is defined as 6:00 AM - 8:59 AM. The PM peak period is defined as 3:00 PM - 6:59 PM. + * Average hourly frequencies are calculated for each stop per peak period. * Corridors are cut for each operator-route-direction every 1,250 meters. * Stops have a 50 meter buffer drawn around them and are spatially joined to corridors. - * For each 1,250 meter corridor, the highest frequency is counted (if there are multiple stops). -* `peak_trips`: the number of trips per hour are calculated separately for the AM peak and PM peak. This column should be interpreted as: *at least x trips per hour in the peak period*. - * If these values differ, the *lesser* value is reported. - * Ex: 5 AM peak trips, 4 PM peak trips would show a value of `peak_trips = 4`. + * For each 1,250 meter corridor segment, the highest frequency stop is counted (if there are multiple stops). +* We count _all_ trips at the highest frequency stop in each corridor segment, even if they're marketed as different "routes". + * For example, if Route A serves the stop twice an hour, and Route B twice an hour, we consider the stop frequency to be 4 trips/hour, qualifying it as a high quality transit corridor and potentially a major bus stop (if an intersecting corridor is present) + +### Why Not one "Route" at a Time? + +![Long Beach Transit map as of October 2024, focusing on the area south of Willow St and east from Magnolia Ave to Lakewood Bl](img/lbt_map_2024.png) + +There is not a consistent practice as to what constitutes one "route" in the transit industry. A single "route" can have some trips that deviate from the usual routing without changing the route name or number, or have some trips only serve part of the route (shortlining). Multiple "routes" can combine to serve the same corridor and stops for many miles. The latter practice, often called interlining, is especially common, as is having local and rapid routes that take the same path but with different stop spacing. + +In the above example, Atlantic Ave is served by only Route 61, while Pacific Coast Highway is served by Routes 171, 172, and 173. Those routes combine to equal a higher frequency for riders travelling along PCH than along Atlantic, yet if we only considered one "route" at a time we would categorize Atlantic as a high quality corridor and not PCH (nor Anaheim and 7th, which function the same). We believe this would inaccurately reflect the transit rider experience. + +By considering each corridor segment seperately, our methodology is sensitive to where "routes" combine to offer high frequencies, as well as to where they diverge (or where a single route shortlines) and no longer meet the relevant frequency standard. + +### HQTA Areas is the Primary Dataset + +Per statute, High Quality Transit Areas are defined as the _half-mile surrounding_ high quality transit corridors and major transit stops. Our HQTA Areas (polygon) dataset already incorporates this half-mile buffer. + +Using the HQTA Areas dataset, it's possible to determine if an area qualifies because it is a high quality transit corridor, major transit stop, or both. This is useful for certain kinds of analyses, since some statutes and programs only reference major transit stops and don't include high quality transit corridors. + +We provide the HQTA Stops dataset as a convienience for certain kinds of analysis where it would be helpful to know actual stop locations. Note that the `hq_corridor_bus` type includes all stops in a high quality corridor. Since we make the high quality corridor determination at the corridor segment level and only then find the stops within that corridor, not every `hq_corridor_stop` is guaranteed to have frequent service (though they could all have frequent service, and at least one stop every 1,250 meters will have frequent service). + +### Additional Details + * `hqta_type = hq_corridor_bus` * `hqta_details` is `corridor_frequent_stop` if the stop has at least 4 peak trips, `corridor_other_stop` otherwise. * `hqta_type = major_stop_bus` - * Major stop bus is designation of stops appearing within 50 meters of the intersection of 2 frequent corridors. In our analysis, corridors have an operator and route associated to track it. + * Major stop bus is designation of stops appearing within 500 feet of the intersection of 2 "major stop precursor corridors" with frequencies of at least 3 trips/hr. In our analysis, corridors have an operator and route associated to track it. All stops within 500 feet of the intersection are collectively considered the "major transit stop", and the half-mile major transit stop buffer extends from each stop and is dissolved into a single polygon. * If the intersection was between 2 different operators (different agency names), `hqta_details = intersection_2_bus_routes_different_operators`. * If the intersection was between routes of the same operator, `hqta_details = intersection_2_bus_routes_same_operator` * A half-mile buffered dataset is provided for high quality transit areas. We recommend using the polygon dataset. To get the stops (points) that create these half mile polygons, we do also provide high quality transit stops. +* `peak_trips`: This column should be interpreted as: *at least x trips per hour in the peak period*. + * If AM and PM values differ, the *lesser* value is reported. + * Ex: 5 AM peak trips, 4 PM peak trips would show a value of `peak_trips = 4`. [![hqta_methodology_mermaid](https://mermaid.ink/img/pako:eNqFkk1rwzAMhv-K8Ai5NNBLGWQw6FduY7CWnQxFjZXVkNhBVthK6X9fmqxry0h3sYX0SNjvq4PKvSGVqiRJtBMrJaXwWpODBQpCAvMprBldsAIr8XUAdAbefCMUtOuaouigHYB1VlLoQoBYdlRRnEK8xUDx6Dr7jmxxW1KIf_G2VLOtkPdzX3o-9T0sJ9kkm55bL8SavuRCjcfjv8jMsyEegkrraKgWKPfO3L4jyx6XsytGiMXeIEVRxH35eLra4xhF2mlXlP4z3yELrGdPPSFsWxGT5Bly3Eiv7IY7PX-IsMOaBpA7M8LJnfOIzql_gI3YigYoNVIVcYXWtKvRmaRVZ55WaRsaKrApRav2py2KjfjV3uUqFW5opJraoNDC4gdjdU6SseL5pd-2bumO3-XAyjk?type=png)](https://mermaid.live/edit#pako:eNqFkk1rwzAMhv-K8Ai5NNBLGWQw6FduY7CWnQxFjZXVkNhBVthK6X9fmqxry0h3sYX0SNjvq4PKvSGVqiRJtBMrJaXwWpODBQpCAvMprBldsAIr8XUAdAbefCMUtOuaouigHYB1VlLoQoBYdlRRnEK8xUDx6Dr7jmxxW1KIf_G2VLOtkPdzX3o-9T0sJ9kkm55bL8SavuRCjcfjv8jMsyEegkrraKgWKPfO3L4jyx6XsytGiMXeIEVRxH35eLra4xhF2mlXlP4z3yELrGdPPSFsWxGT5Bly3Eiv7IY7PX-IsMOaBpA7M8LJnfOIzql_gI3YigYoNVIVcYXWtKvRmaRVZ55WaRsaKrApRav2py2KjfjV3uUqFW5opJraoNDC4gdjdU6SseL5pd-2bumO3-XAyjk) @@ -45,13 +72,13 @@ We provide the HQTA Stops dataset as a convienience for certain kinds of analysi [PRC 21155](https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?sectionNum=21155.&lawCode=PRC) * Major transit stop definition: _A major transit stop is as defined in Section 21064.3, except that, for purposes of this section, it also includes major transit stops that are included in the applicable regional transportation plan_ * High-quality transit corridor definition: _For purposes of this section, a high-quality transit corridor means a corridor with fixed route bus service with service intervals no longer than 15 minutes during peak commute hours._ - * Statute does not define "peak commute hours", given that peaks may vary locally we look for any hour in the morning plus any hour in the afternoon/evening. + * Statute does not define "peak commute hours", however we've started using fixed peak periods to align our methodology with other stateholders. [PRC 21064.3](https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?sectionNum=21064.3.&lawCode=PRC) * _Major transit stop means a site containing any of the following: (a) An existing rail or bus rapid transit station. (b) A ferry terminal served by either a bus or rail transit service. -(c) The intersection of two or more major bus routes with a frequency of service interval of 15 minutes or less during the morning and afternoon peak commute periods._ +(c) The intersection of two or more major bus routes with a frequency of service interval of ~15~ 20 minutes or less during the morning and afternoon peak commute periods._ * "Intersection" may not be sufficiently well-defined for this analysis [PRC 21060.2](https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=PRC§ionNum=21060.2.&highlight=true&keyword=bus%20rapid%20transit) diff --git a/high_quality_transit_areas/assemble_hqta_points.py b/high_quality_transit_areas/assemble_hqta_points.py index 4441b38c7..2af973d9d 100644 --- a/high_quality_transit_areas/assemble_hqta_points.py +++ b/high_quality_transit_areas/assemble_hqta_points.py @@ -36,7 +36,7 @@ def combine_stops_by_hq_types(crs: str) -> gpd.GeoDataFrame: major_stop_bus = catalog.major_stop_bus.read().to_crs(crs) stops_in_corridor = catalog.stops_in_hq_corr.read().to_crs(crs) - trip_count_cols = ["am_max_trips", "pm_max_trips"] + trip_count_cols = ["am_max_trips_hr", "pm_max_trips_hr"] max_arrivals = pd.read_parquet( f"{GCS_FILE_PATH}max_arrivals_by_stop.parquet", diff --git a/high_quality_transit_areas/create_bus_hqta_types.py b/high_quality_transit_areas/create_bus_hqta_types.py index 1264148b7..5fb04bf68 100644 --- a/high_quality_transit_areas/create_bus_hqta_types.py +++ b/high_quality_transit_areas/create_bus_hqta_types.py @@ -21,7 +21,8 @@ from calitp_data_analysis import utils from segment_speed_utils import helpers from update_vars import (GCS_FILE_PATH, analysis_date, - PROJECT_CRS, SEGMENT_BUFFER_METERS + PROJECT_CRS, SEGMENT_BUFFER_METERS, + INTERSECTION_BUFFER_METERS ) def buffer_around_intersections(buffer_size: int) -> gpd.GeoDataFrame: @@ -132,7 +133,7 @@ def create_stops_along_corridors(all_stops: gpd.GeoDataFrame) -> gpd.GeoDataFram # Start with the gdf of all the hqta_segments # that have a sjoin with an orthogonal route - bus_intersections = buffer_around_intersections(SEGMENT_BUFFER_METERS) + bus_intersections = buffer_around_intersections(INTERSECTION_BUFFER_METERS) # Grab point geom with all stops gtfs_keys = helpers.import_scheduled_trips( diff --git a/high_quality_transit_areas/img/bakersfield.png b/high_quality_transit_areas/img/bakersfield.png deleted file mode 100644 index a946b4d6b..000000000 Binary files a/high_quality_transit_areas/img/bakersfield.png and /dev/null differ diff --git a/high_quality_transit_areas/img/bay.png b/high_quality_transit_areas/img/bay.png deleted file mode 100644 index 9bd9dd4f4..000000000 Binary files a/high_quality_transit_areas/img/bay.png and /dev/null differ diff --git a/high_quality_transit_areas/img/bay_valley_all.png b/high_quality_transit_areas/img/bay_valley_all.png deleted file mode 100644 index f0f4b6b43..000000000 Binary files a/high_quality_transit_areas/img/bay_valley_all.png and /dev/null differ diff --git a/high_quality_transit_areas/img/fres_all.png b/high_quality_transit_areas/img/fres_all.png deleted file mode 100644 index c94cc3193..000000000 Binary files a/high_quality_transit_areas/img/fres_all.png and /dev/null differ diff --git a/high_quality_transit_areas/img/fresno.png b/high_quality_transit_areas/img/fresno.png deleted file mode 100644 index 2fc5ea802..000000000 Binary files a/high_quality_transit_areas/img/fresno.png and /dev/null differ diff --git a/high_quality_transit_areas/img/la.png b/high_quality_transit_areas/img/la.png deleted file mode 100644 index e445e5c8a..000000000 Binary files a/high_quality_transit_areas/img/la.png and /dev/null differ diff --git a/high_quality_transit_areas/img/lbt_map_2024.png b/high_quality_transit_areas/img/lbt_map_2024.png new file mode 100644 index 000000000..989cb2941 Binary files /dev/null and b/high_quality_transit_areas/img/lbt_map_2024.png differ diff --git a/high_quality_transit_areas/img/richmond.png b/high_quality_transit_areas/img/richmond.png deleted file mode 100644 index 7b1da724a..000000000 Binary files a/high_quality_transit_areas/img/richmond.png and /dev/null differ diff --git a/high_quality_transit_areas/img/sd_all.png b/high_quality_transit_areas/img/sd_all.png deleted file mode 100644 index 6eb3e2e76..000000000 Binary files a/high_quality_transit_areas/img/sd_all.png and /dev/null differ diff --git a/high_quality_transit_areas/img/sylmar.png b/high_quality_transit_areas/img/sylmar.png deleted file mode 100644 index 61954d1d5..000000000 Binary files a/high_quality_transit_areas/img/sylmar.png and /dev/null differ diff --git a/high_quality_transit_areas/logs/hqta_processing.log b/high_quality_transit_areas/logs/hqta_processing.log index 9db268abf..64100a361 100644 --- a/high_quality_transit_areas/logs/hqta_processing.log +++ b/high_quality_transit_areas/logs/hqta_processing.log @@ -37,3 +37,15 @@ 2024-09-25 10:25:48.480 | INFO | __main__::175 - C3_create_bus_hqta_types 2024-09-18 execution time: 0:00:26.100650 2024-09-25 10:27:51.226 | INFO | __main__::219 - D1_assemble_hqta_points 2024-09-18 execution time: 0:00:18.606053 2024-09-25 10:30:59.443 | INFO | __main__::168 - D2_assemble_hqta_polygons 2024-09-18 execution time: 0:00:30.215506 +2024-10-09 10:58:41.588 | INFO | __main__::275 - A1_rail_ferry_brt_stops 2024-09-18 execution time: 0:00:19.051895 +2024-10-09 11:03:32.388 | INFO | __main__::248 - B1_create_hqta_segments execution time: 0:04:32.849858 +2024-10-09 11:04:45.205 | INFO | __main__::301 - B2_sjoin_stops_to_segments 2024-09-18 execution time: 0:00:53.314014 +2024-10-09 11:05:12.682 | INFO | __main__::140 - C1_prep_pairwise_intersections 2024-09-18 execution time: 0:00:08.100040 +2024-10-10 09:43:19.078 | INFO | __main__::275 - A1_rail_ferry_brt_stops 2024-09-18 execution time: 0:00:28.597295 +2024-10-10 09:48:33.530 | INFO | __main__::248 - B1_create_hqta_segments execution time: 0:04:48.617534 +2024-10-10 09:49:52.721 | INFO | __main__::301 - B2_sjoin_stops_to_segments 2024-09-18 execution time: 0:00:59.880352 +2024-10-10 09:50:22.959 | INFO | __main__::140 - C1_prep_pairwise_intersections 2024-09-18 execution time: 0:00:09.107672 +2024-10-10 09:51:12.460 | INFO | __main__::124 - C2_find_intersections 2024-09-18 execution time: 0:00:29.617306 +2024-10-10 10:02:25.556 | INFO | __main__::175 - C3_create_bus_hqta_types 2024-09-18 execution time: 0:00:30.074431 +2024-10-10 10:03:17.217 | INFO | __main__::219 - D1_assemble_hqta_points 2024-09-18 execution time: 0:00:21.338133 +2024-10-10 10:04:22.212 | INFO | __main__::168 - D2_assemble_hqta_polygons 2024-09-18 execution time: 0:00:27.841877 diff --git a/high_quality_transit_areas/prep_pairwise_intersections.py b/high_quality_transit_areas/prep_pairwise_intersections.py index 12d9ccb4f..b7db1c835 100644 --- a/high_quality_transit_areas/prep_pairwise_intersections.py +++ b/high_quality_transit_areas/prep_pairwise_intersections.py @@ -17,22 +17,29 @@ from calitp_data_analysis import utils from update_vars import GCS_FILE_PATH, analysis_date -def prep_bus_corridors(is_hq_corr: bool) -> gpd.GeoDataFrame: +def prep_bus_corridors(is_ms_precursor: bool = False, is_hq_corr: bool = False) -> gpd.GeoDataFrame: """ - Import all hqta segments with hq_transit_corr tagged. - - Only keep if hq_transit_corr == True + Import all hqta segments with ms_precursor or is_hq_corr tagged. + Since these definitions have diverged, may be called to return either. + Only keep if ms_precursor or hq_transit_corr == True """ - bus_hqtc = gpd.read_parquet( + assert is_ms_precursor or is_hq_corr, 'must select exactly one category of segment' + if is_ms_precursor: + hqtc_or_ms_pre = gpd.read_parquet( + f"{GCS_FILE_PATH}all_bus.parquet", + filters = [[("ms_precursor", "==", is_ms_precursor)]] + ).reset_index(drop=True) + elif is_hq_corr: + hqtc_or_ms_pre = gpd.read_parquet( f"{GCS_FILE_PATH}all_bus.parquet", filters = [[("hq_transit_corr", "==", is_hq_corr)]] ).reset_index(drop=True) - - bus_hqtc = bus_hqtc.assign( + + hqtc_or_ms_pre = hqtc_or_ms_pre.assign( route_type = "3" ) - return bus_hqtc + return hqtc_or_ms_pre def sjoin_against_other_operators( @@ -132,7 +139,7 @@ def pairwise_intersections( start = datetime.datetime.now() - corridors = prep_bus_corridors(is_hq_corr=True) + corridors = prep_bus_corridors(is_ms_precursor=True) pairwise_intersections(corridors) diff --git a/high_quality_transit_areas/rail_ferry_brt_stops.py b/high_quality_transit_areas/rail_ferry_brt_stops.py index 7dcb87eef..7a0b0ca67 100644 --- a/high_quality_transit_areas/rail_ferry_brt_stops.py +++ b/high_quality_transit_areas/rail_ferry_brt_stops.py @@ -147,8 +147,10 @@ def grab_ferry_stops( """ Grab all the ferry stops. """ - # only stops without bus service - angel_and_alcatraz = ['2483552', '2483550', '43002'] + # only stops without bus or rail service + angel_and_alcatraz = ['2483552', '2483550', '43002', 'AIF'] + havasu = ['havasuLanding', 'londonBridge'] # also one of these is in AZ + no_bus_or_rail = angel_and_alcatraz + havasu return gdf[ (gdf.route_type.isin(route_types)) & diff --git a/high_quality_transit_areas/sjoin_stops_to_segments.py b/high_quality_transit_areas/sjoin_stops_to_segments.py index 085e170c4..24b2acfff 100644 --- a/high_quality_transit_areas/sjoin_stops_to_segments.py +++ b/high_quality_transit_areas/sjoin_stops_to_segments.py @@ -14,7 +14,12 @@ from calitp_data_analysis import utils from segment_speed_utils import helpers, gtfs_schedule_wrangling -from update_vars import GCS_FILE_PATH, analysis_date, PROJECT_CRS, SEGMENT_BUFFER_METERS +from update_vars import GCS_FILE_PATH, analysis_date, PROJECT_CRS, SEGMENT_BUFFER_METERS, AM_PEAK, PM_PEAK, HQ_TRANSIT_THRESHOLD, MS_TRANSIT_THRESHOLD + +am_peak_hrs = list(range(AM_PEAK[0].hour, AM_PEAK[1].hour)) +pm_peak_hrs = list(range(PM_PEAK[0].hour, PM_PEAK[1].hour)) +both_peaks_hrs = am_peak_hrs + pm_peak_hrs +peaks_dict = {key: 'am_peak' for key in am_peak_hrs} | {key: 'pm_peak' for key in pm_peak_hrs} def max_trips_by_group( df: pd.DataFrame, @@ -31,50 +36,73 @@ def max_trips_by_group( .reset_index() ) - return df2 + return df2 + +def prep_stop_times( + stop_times: pd.DataFrame, + am_peak: tuple = AM_PEAK, + pm_peak: tuple = PM_PEAK +) -> pd.DataFrame: + """ + Add fixed peak period information to stop_times for next calculations. + """ + + stop_times = stop_times.assign( + departure_hour = pd.to_datetime( + stop_times.departure_sec, unit="s").dt.hour + ) + + stop_times = stop_times[stop_times['arrival_hour'].isin(both_peaks_hrs)] + stop_times['peak'] = stop_times['arrival_hour'].map(peaks_dict) + + return stop_times def stop_times_aggregation_max_by_stop( stop_times: pd.DataFrame, - analysis_date: str + analysis_date: str, + single_route_dir: bool = False, ) -> pd.DataFrame: """ Take the stop_times table and group by stop_id-departure hour and count how many trips occur. """ + stop_cols = ["schedule_gtfs_dataset_key", "stop_id"] + trips_per_hour_cols = ["peak"] + + if single_route_dir: + trips_per_hour_cols += ["route_id", "direction_id"] - gtfs_key = helpers.import_scheduled_trips( + trips = helpers.import_scheduled_trips( analysis_date, - columns = ["feed_key", "gtfs_dataset_key"], + columns = ["feed_key", "gtfs_dataset_key", "trip_id", + "route_id", "direction_id"], get_pandas = True ) - stop_times = stop_times.assign( - departure_hour = pd.to_datetime( - stop_times.departure_sec, unit="s").dt.hour - ).merge( - gtfs_key, - on = "feed_key" + stop_times = stop_times.merge( + trips, + on = ["feed_key", "trip_id"] ) # Aggregate how many trips are made at that stop by departure hour trips_per_hour = gtfs_schedule_wrangling.stop_arrivals_per_stop( stop_times, - group_cols = stop_cols + ["departure_hour"], + group_cols = stop_cols + trips_per_hour_cols, count_col = "trip_id" ).rename(columns = {"n_arrivals": "n_trips"}) - # Subset to departure hour before or after 12pm + # Count based on fixed peak periods, take average in each am_trips = max_trips_by_group( - trips_per_hour[trips_per_hour.departure_hour < 12], + trips_per_hour[trips_per_hour.peak == 'am_peak'], group_cols = stop_cols, max_col = "n_trips" ).rename(columns = {"n_trips": "am_max_trips"}) pm_trips = max_trips_by_group( - trips_per_hour[trips_per_hour.departure_hour >= 12], + trips_per_hour[trips_per_hour.peak == 'pm_peak'], group_cols = stop_cols, max_col = "n_trips" ).rename(columns = {"n_trips": "pm_max_trips"}) @@ -85,10 +113,10 @@ def stop_times_aggregation_max_by_stop( on = stop_cols, how = "left" ) - + # divide by length of peak to get trips/hr, keep n_trips a raw sum max_trips_by_stop = max_trips_by_stop.assign( - am_max_trips = max_trips_by_stop.am_max_trips.fillna(0).astype(int), - pm_max_trips = max_trips_by_stop.pm_max_trips.fillna(0).astype(int), + am_max_trips_hr = (max_trips_by_stop.am_max_trips.fillna(0) / len(am_peak_hrs)).astype(int), + pm_max_trips_hr = (max_trips_by_stop.pm_max_trips.fillna(0) / len(pm_peak_hrs)).astype(int), n_trips = (max_trips_by_stop.am_max_trips.fillna(0) + max_trips_by_stop.pm_max_trips.fillna(0)) ) @@ -132,7 +160,7 @@ def hqta_segment_keep_one_stop( ) -> gpd.GeoDataFrame: """ Since multiple stops can fall into the same segment, - keep the stop wiht the highest trips (sum across AM and PM). + keep the stop with the highest trips (sum across AM and PM). Returns gdf where each segment only appears once. """ @@ -181,14 +209,17 @@ def sjoin_stops_and_stop_times_to_hqta_segments( stops: gpd.GeoDataFrame, stop_times: pd.DataFrame, buffer_size: int, - hq_transit_threshold: int = 4, + hq_transit_threshold: int = HQ_TRANSIT_THRESHOLD, + ms_transit_threshold: int = MS_TRANSIT_THRESHOLD, ) -> gpd.GeoDataFrame: """ Take HQTA segments, draw a buffer around the linestrings. Spatial join the stops (points) to segments (now polygons). If there are multiple stops in a segment, keep the stop with more trips. - Tag the segment as hq_transit_corr (boolean) + Tag the segment as hq_transit_corr and/or ms_precursor (boolean) + Since frequency thresholds for hq corrs and major stops have diverged, + need to track both categories """ # Draw 50 m buffer to capture stops around hqta segments hqta_segments2 = hqta_segments.assign( @@ -201,15 +232,17 @@ def sjoin_stops_and_stop_times_to_hqta_segments( segment_to_stop_unique = hqta_segment_keep_one_stop( segment_to_stop, stop_times) - # Identify hq transit corridor - # Tag segment as being hq_transit_corr if it has at least 4 trips in AM and PM - # (before 12pm, after 12pm, whatever is max in each period) + # Identify hq transit corridor or major stop precursor drop_cols = ["n_trips"] segment_hq_corr = segment_to_stop_unique.assign( hq_transit_corr = segment_to_stop_unique.apply( - lambda x: True if (x.am_max_trips >= hq_transit_threshold and - (x.pm_max_trips >= hq_transit_threshold)) + lambda x: True if (x.am_max_trips_hr >= hq_transit_threshold and + (x.pm_max_trips_hr >= hq_transit_threshold)) + else False, axis=1), + ms_precursor = segment_to_stop_unique.apply( + lambda x: True if (x.am_max_trips_hr >= ms_transit_threshold and + (x.pm_max_trips_hr >= ms_transit_threshold)) else False, axis=1) ).drop(columns = drop_cols) @@ -233,7 +266,7 @@ def sjoin_stops_and_stop_times_to_hqta_segments( max_arrivals_by_stop = helpers.import_scheduled_stop_times( analysis_date, get_pandas = True, - ).pipe(stop_times_aggregation_max_by_stop, analysis_date) + ).pipe(prep_stop_times).pipe(stop_times_aggregation_max_by_stop, analysis_date) max_arrivals_by_stop.to_parquet( f"{GCS_FILE_PATH}max_arrivals_by_stop.parquet") @@ -254,7 +287,8 @@ def sjoin_stops_and_stop_times_to_hqta_segments( stops, max_arrivals_by_stop, buffer_size = SEGMENT_BUFFER_METERS, #50meters - hq_transit_threshold = 4 + hq_transit_threshold = HQ_TRANSIT_THRESHOLD, + ms_transit_threshold = MS_TRANSIT_THRESHOLD ) utils.geoparquet_gcs_export( diff --git a/high_quality_transit_areas/update_vars.py b/high_quality_transit_areas/update_vars.py index d35684264..f022e0f93 100644 --- a/high_quality_transit_areas/update_vars.py +++ b/high_quality_transit_areas/update_vars.py @@ -1,4 +1,5 @@ from shared_utils import rt_dates +import datetime as dt analysis_date = rt_dates.DATES["sep2024"] @@ -7,6 +8,14 @@ PROJECT_CRS = "EPSG:3310" HQTA_SEGMENT_LENGTH = 1_250 # meters SEGMENT_BUFFER_METERS = 50 # buffer around segment to sjoin to stops +INTERSECTION_BUFFER_METERS = 152 # ~ 500ft HALF_MILE_BUFFER_METERS = 805 # half mile ~ 805 meters CORRIDOR_BUFFER_METERS = HALF_MILE_BUFFER_METERS - SEGMENT_BUFFER_METERS # 755 meters -EXPORT_PATH = f"{GCS_FILE_PATH}export/{analysis_date}/" \ No newline at end of file +EXPORT_PATH = f"{GCS_FILE_PATH}export/{analysis_date}/" + +AM_PEAK = (dt.time(hour=6), dt.time(hour=9)) # time range to calculate average peak frequencies +PM_PEAK = (dt.time(hour=15), dt.time(hour=19)) +HQ_TRANSIT_THRESHOLD = 4 # trips per hour, from statute, see README.md +MS_TRANSIT_THRESHOLD = 3 # different statutory threshold as of October 2024 +CORR_SINGLE_ROUTE = False # only consider frequency from a single route at each stop (not recommended, see README) +BUS_MS_SINGLE_ROUTE = False # only consider frequency from a single route at each stop (not recommended, see README) \ No newline at end of file diff --git a/portfolio/sb125_route_illustrations/_toc.yml b/portfolio/sb125_route_illustrations/_toc.yml index 5fc501284..126ba18ec 100644 --- a/portfolio/sb125_route_illustrations/_toc.yml +++ b/portfolio/sb125_route_illustrations/_toc.yml @@ -2,9 +2,9 @@ format: jb-book parts: - caption: null chapters: - - file: region_la/0__path_examples__region_la.ipynb - - file: region_sac/0__path_examples__region_sac.ipynb - - file: region_solano/0__path_examples__region_solano.ipynb - - file: region_clovis/0__path_examples__region_clovis.ipynb - - file: region_napa/0__path_examples__region_napa.ipynb + - file: region_la/00__path_examples__region_la.ipynb + - file: region_sac/00__path_examples__region_sac.ipynb + - file: region_solano/00__path_examples__region_solano.ipynb + - file: region_clovis/00__path_examples__region_clovis.ipynb + - file: region_napa/00__path_examples__region_napa.ipynb root: README diff --git a/portfolio/sb125_route_illustrations/region_clovis/00__path_examples__region_clovis.ipynb b/portfolio/sb125_route_illustrations/region_clovis/00__path_examples__region_clovis.ipynb index 1d47e8908..f901aec34 100644 --- a/portfolio/sb125_route_illustrations/region_clovis/00__path_examples__region_clovis.ipynb +++ b/portfolio/sb125_route_illustrations/region_clovis/00__path_examples__region_clovis.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c653663f8157b87780483e3e1960e6360c482b0f77647b3fcfebdfcd53d1d23 -size 340697 +oid sha256:e41f6dc12d7b1a85f4c45f204a09a419c04fbea13f766ab9797f380fc51bc03c +size 341930 diff --git a/portfolio/sb125_route_illustrations/region_la/00__path_examples__region_la.ipynb b/portfolio/sb125_route_illustrations/region_la/00__path_examples__region_la.ipynb index 1f029754a..60003fd52 100644 --- a/portfolio/sb125_route_illustrations/region_la/00__path_examples__region_la.ipynb +++ b/portfolio/sb125_route_illustrations/region_la/00__path_examples__region_la.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef405bad5cde15abde00ef4587abfe261f4b4687aaafc093936570daddebcca2 -size 4869440 +oid sha256:54027106d6829eb4848e1d2ddd0d2ace2553195b023b47a4ae3ebaafab9cb4f3 +size 4876261 diff --git a/portfolio/sb125_route_illustrations/region_napa/00__path_examples__region_napa.ipynb b/portfolio/sb125_route_illustrations/region_napa/00__path_examples__region_napa.ipynb index 2742b673b..506a3b183 100644 --- a/portfolio/sb125_route_illustrations/region_napa/00__path_examples__region_napa.ipynb +++ b/portfolio/sb125_route_illustrations/region_napa/00__path_examples__region_napa.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9bea1356a3c68ea2e4b3dedac6cf096882404d4ca92c8b7e69232f01d47b4370 -size 1605420 +oid sha256:e714e2a148c10e2a8b9caa1140a991c40775de097adbfe25d86d4fb1754e09b9 +size 1606878 diff --git a/portfolio/sb125_route_illustrations/region_sac/00__path_examples__region_sac.ipynb b/portfolio/sb125_route_illustrations/region_sac/00__path_examples__region_sac.ipynb index 46f5373dd..104deeeff 100644 --- a/portfolio/sb125_route_illustrations/region_sac/00__path_examples__region_sac.ipynb +++ b/portfolio/sb125_route_illustrations/region_sac/00__path_examples__region_sac.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f47be4a07d697e052defbc81cb0e87ad894b03c6a5ec7cf07bdad4808d904ac -size 1116443 +oid sha256:0bc048f447155735f72a750fccb6b3c6a7381d9672680d1d8a12c02557ce0c8c +size 1118300 diff --git a/portfolio/sb125_route_illustrations/region_solano/00__path_examples__region_solano.ipynb b/portfolio/sb125_route_illustrations/region_solano/00__path_examples__region_solano.ipynb index be9a8aa70..eb61b3483 100644 --- a/portfolio/sb125_route_illustrations/region_solano/00__path_examples__region_solano.ipynb +++ b/portfolio/sb125_route_illustrations/region_solano/00__path_examples__region_solano.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:380991b4b689b00304d8aa71f8e767b358d12c77ff2221d01ba2d628f3faa4e8 -size 523493 +oid sha256:04b4f1e57c2220c6e064417c4be4ba95e7251fdd1b93220579376f5e0515bd68 +size 524728 diff --git a/sb125_analyses/path_examples_tttf4/path_examples.ipynb b/sb125_analyses/path_examples_tttf4/path_examples.ipynb index 9d92b5b97..6c4da6ca5 100644 --- a/sb125_analyses/path_examples_tttf4/path_examples.ipynb +++ b/sb125_analyses/path_examples_tttf4/path_examples.ipynb @@ -210,6 +210,16 @@ "spatial_routes = conveyal_path_utils.compile_all_spatial_routes(df, warehouse_data, verbose=False)" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "cabfd130-0cf6-498f-9c92-710644cc88e9", + "metadata": {}, + "outputs": [], + "source": [ + "spatial_routes['segment_miles'] = spatial_routes.geometry.apply(lambda x: round(x.length) / shared_utils.rt_utils.METERS_PER_MILE)" + ] + }, { "cell_type": "code", "execution_count": null,