From 7248d91a268b9baabdee6e815d25fed633d3474c Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Thu, 16 Jan 2025 23:59:32 +0000 Subject: [PATCH 01/17] start funnel --- .../shared_utils/gtfs_analytics_data.yml | 1 + _shared_utils/shared_utils/rt_dates.py | 1 + ca_transit_speed_maps/01_new_speedmaps.ipynb | 2 +- gtfs_funnel/Makefile | 4 +- gtfs_funnel/logs/download_data.log | 16 + gtfs_funnel/logs/download_vp_v2.log | 11 + gtfs_funnel/logs/vp_preprocessing.log | 1 + gtfs_funnel/update_vars.py | 3 +- gtfs_funnel/vp_keep_usable.py | 2 +- open_data/update_vars.py | 2 +- .../40_speedmap_scratchpad.ipynb | 686 ------------------ 11 files changed, 37 insertions(+), 692 deletions(-) delete mode 100644 rt_segment_speeds/40_speedmap_scratchpad.ipynb diff --git a/_shared_utils/shared_utils/gtfs_analytics_data.yml b/_shared_utils/shared_utils/gtfs_analytics_data.yml index 712d31dc1..377c04a6a 100644 --- a/_shared_utils/shared_utils/gtfs_analytics_data.yml +++ b/_shared_utils/shared_utils/gtfs_analytics_data.yml @@ -123,6 +123,7 @@ speedmap_segments: segments_file: "segment_options/speedmap_segments" shape_stop_single_segment: "rollup_singleday/speeds_shape_speedmap_segments" shape_stop_single_segment_detail: "rollup_singleday/speeds_shape_speedmap_segments_detail" + excluded_shapes_by_time_of_day: "rollup_singleday/excluded_shapes_by_time_of_day" route_dir_single_segment: "rollup_singleday/speeds_route_dir_speedmap_segments" route_dir_multi_segment: "rollup_multiday/speeds_route_dir_speedmap_segments" min_trip_minutes: ${speed_vars.time_min_cutoff} diff --git a/_shared_utils/shared_utils/rt_dates.py b/_shared_utils/shared_utils/rt_dates.py index b56873dd8..5c3b8dbe3 100644 --- a/_shared_utils/shared_utils/rt_dates.py +++ b/_shared_utils/shared_utils/rt_dates.py @@ -74,6 +74,7 @@ "oct2024g": "2024-10-21", # additional one-off to capture Amtrak in HQTA "nov2024": "2024-11-13", "dec2024": "2024-12-11", + "jan2025": "2025-01-15" } y2023_dates = [ diff --git a/ca_transit_speed_maps/01_new_speedmaps.ipynb b/ca_transit_speed_maps/01_new_speedmaps.ipynb index 097b44790..6697ef01b 100644 --- a/ca_transit_speed_maps/01_new_speedmaps.ipynb +++ b/ca_transit_speed_maps/01_new_speedmaps.ipynb @@ -440,7 +440,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.11.6" }, "widgets": { "application/vnd.jupyter.widget-state+json": { diff --git a/gtfs_funnel/Makefile b/gtfs_funnel/Makefile index d17bc190a..ef48ef920 100644 --- a/gtfs_funnel/Makefile +++ b/gtfs_funnel/Makefile @@ -38,8 +38,8 @@ monthly_scheduled_data: python concatenate_monthly_scheduled_service.py funnel_gtfs_single_day: - make download_gtfs_data - make preprocess_schedule_vp_dependency +# make download_gtfs_data +# make preprocess_schedule_vp_dependency make preprocess_vp make preprocess_schedule_only make timeseries_preprocessing diff --git a/gtfs_funnel/logs/download_data.log b/gtfs_funnel/logs/download_data.log index 833f5b529..6f9705026 100644 --- a/gtfs_funnel/logs/download_data.log +++ b/gtfs_funnel/logs/download_data.log @@ -694,3 +694,19 @@ 2024-12-17 13:03:01.386 | INFO | __main__:download_one_day:29 - # operators to run: 194 2024-12-17 13:03:01.387 | INFO | __main__:download_one_day:33 - *********** Download st data *********** 2024-12-17 13:04:59.321 | INFO | __main__:download_one_day:56 - execution time: 0:02:00.030094 +2025-01-16 13:31:53.693 | INFO | __main__:download_one_day:45 - Analysis date: 2025-01-15 +2025-01-16 13:31:57.110 | INFO | __main__:download_one_day:52 - # operators to run: 227 +2025-01-16 13:31:57.111 | INFO | __main__:download_one_day:56 - *********** Download trips data *********** +2025-01-16 13:32:29.962 | INFO | __main__:download_one_day:86 - execution time: 0:00:36.247158 +2025-01-16 13:32:48.465 | INFO | __main__:download_one_day:22 - Analysis date: 2025-01-15 +2025-01-16 13:32:50.458 | INFO | __main__:download_one_day:29 - # operators to run: 227 +2025-01-16 13:32:50.459 | INFO | __main__:download_one_day:33 - *********** Download stops data *********** +2025-01-16 13:33:00.364 | INFO | __main__:download_one_day:64 - execution time: 0:00:11.898404 +2025-01-16 13:33:16.781 | INFO | __main__:download_one_day:22 - Analysis date: 2025-01-15 +2025-01-16 13:33:18.779 | INFO | __main__:download_one_day:29 - # operators to run: 227 +2025-01-16 13:33:18.779 | INFO | __main__:download_one_day:33 - *********** Download routelines data *********** +2025-01-16 13:35:14.243 | INFO | __main__:download_one_day:63 - execution time: 0:01:57.461108 +2025-01-16 13:35:31.678 | INFO | __main__:download_one_day:21 - Analysis date: 2025-01-15 +2025-01-16 13:35:33.591 | INFO | __main__:download_one_day:29 - # operators to run: 187 +2025-01-16 13:35:33.592 | INFO | __main__:download_one_day:33 - *********** Download st data *********** +2025-01-16 13:37:29.411 | INFO | __main__:download_one_day:56 - execution time: 0:01:57.732464 diff --git a/gtfs_funnel/logs/download_vp_v2.log b/gtfs_funnel/logs/download_vp_v2.log index 52763e3dc..da38169b8 100644 --- a/gtfs_funnel/logs/download_vp_v2.log +++ b/gtfs_funnel/logs/download_vp_v2.log @@ -449,3 +449,14 @@ 2024-12-17 13:19:32.102 | INFO | __main__::112 - export concatenated vp: 0:04:12.615694 2024-12-17 13:23:34.976 | INFO | __main__::134 - remove batched parquets 2024-12-17 13:23:34.976 | INFO | __main__::137 - execution time: 0:08:23.157313 +2025-01-16 13:37:50.059 | INFO | __main__::148 - Analysis date: 2025-01-15 +2025-01-16 13:40:22.219 | INFO | __main__:loop_through_batches_and_download_vp:111 - exported batch 0 to GCS: 0:02:32.149970 +2025-01-16 13:41:31.441 | INFO | __main__:loop_through_batches_and_download_vp:111 - exported batch 1 to GCS: 0:01:09.219682 +2025-01-16 13:45:40.111 | INFO | __main__:loop_through_batches_and_download_vp:111 - exported batch 2 to GCS: 0:04:08.669348 +2025-01-16 13:47:52.255 | INFO | __main__:loop_through_batches_and_download_vp:111 - exported batch 3 to GCS: 0:02:12.137762 +2025-01-16 13:47:52.256 | INFO | __main__::155 - execution time: 0:10:02.186184 +2025-01-16 13:48:16.039 | INFO | __main__::97 - Analysis date: 2025-01-15 +2025-01-16 13:48:23.877 | INFO | __main__::105 - concat and filter batched data: 0:00:07.837533 +2025-01-16 13:52:18.653 | INFO | __main__::112 - export concatenated vp: 0:03:54.775914 +2025-01-16 13:56:18.964 | INFO | __main__::134 - remove batched parquets +2025-01-16 13:56:18.987 | INFO | __main__::137 - execution time: 0:08:02.947545 diff --git a/gtfs_funnel/logs/vp_preprocessing.log b/gtfs_funnel/logs/vp_preprocessing.log index fed013952..0966517e5 100644 --- a/gtfs_funnel/logs/vp_preprocessing.log +++ b/gtfs_funnel/logs/vp_preprocessing.log @@ -309,3 +309,4 @@ 2024-12-17 14:08:13.713 | INFO | __main__::235 - merge with original and export: 0:01:19.916578 2024-12-17 14:08:13.714 | INFO | __main__::236 - vp with dwell time 2024-12-11: 0:06:07.248833 2024-12-17 14:13:50.962 | INFO | __main__::78 - 2024-12-11: condense vp for trip 0:05:19.406518 +2025-01-16 15:00:10.192 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:40.192578 diff --git a/gtfs_funnel/update_vars.py b/gtfs_funnel/update_vars.py index 1d2d5aac3..5212a3f1d 100644 --- a/gtfs_funnel/update_vars.py +++ b/gtfs_funnel/update_vars.py @@ -13,7 +13,8 @@ # analysis_date_list = [rt_dates.DATES["dec2024"]] + [rt_dates.DATES['nov2024']] -analysis_date_list = all_dates +analysis_date_list = [rt_dates.DATES["jan2025"]] +# analysis_date_list = all_dates GTFS_DATA_DICT = catalog_utils.get_catalog("gtfs_analytics_data") COMPILED_CACHED_VIEWS = GTFS_DATA_DICT.gcs_paths.COMPILED_CACHED_VIEWS diff --git a/gtfs_funnel/vp_keep_usable.py b/gtfs_funnel/vp_keep_usable.py index f63399d82..c6f851e54 100644 --- a/gtfs_funnel/vp_keep_usable.py +++ b/gtfs_funnel/vp_keep_usable.py @@ -20,9 +20,9 @@ from calitp_data_analysis import utils from calitp_data_analysis.geography_utils import WGS84 from segment_speed_utils.project_vars import PROJECT_CRS +from segment_speed_utils import vp_transform from shared_utils import geo_utils, publish_utils, rt_utils from update_vars import GTFS_DATA_DICT, SEGMENT_GCS -import vp_transform def find_valid_trips( vp: pd.DataFrame, diff --git a/open_data/update_vars.py b/open_data/update_vars.py index ba7aed422..a651fa7d6 100644 --- a/open_data/update_vars.py +++ b/open_data/update_vars.py @@ -1,7 +1,7 @@ from pathlib import Path from shared_utils import catalog_utils, rt_dates -analysis_date = rt_dates.DATES["dec2024"] +analysis_date = rt_dates.DATES["jan2025"] GTFS_DATA_DICT = catalog_utils.get_catalog("gtfs_analytics_data") diff --git a/rt_segment_speeds/40_speedmap_scratchpad.ipynb b/rt_segment_speeds/40_speedmap_scratchpad.ipynb deleted file mode 100644 index f405efc55..000000000 --- a/rt_segment_speeds/40_speedmap_scratchpad.ipynb +++ /dev/null @@ -1,686 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "d528f399-cf33-459e-b5dc-92e0b4ae389a", - "metadata": {}, - "outputs": [], - "source": [ - "import pandas as pd\n", - "import geopandas as gpd\n", - "from siuba import *\n", - "import shared_utils\n", - "\n", - "from calitp_data_analysis import get_fs\n", - "from segment_speed_utils import helpers, time_series_utils, gtfs_schedule_wrangling\n", - "from segment_speed_utils.project_vars import SCHED_GCS, SEGMENT_GCS, GTFS_DATA_DICT, analysis_date" - ] - }, - { - "cell_type": "markdown", - "id": "82c092ac-157e-435c-be60-2f86a11a996e", - "metadata": {}, - "source": [ - "i'd start with 5, checking if the columns you want are already there in this file (saved out at the end of stop_arrivals_to_speed, and is a speeds by trip table for that day)" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "6cd318e5-5c4e-4249-b158-232f4d940770", - "metadata": {}, - "outputs": [], - "source": [ - "catalog = shared_utils.catalog_utils.get_catalog('gtfs_analytics_data')" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "6e86c1a8-d3de-4fc6-9478-c03133b6745c", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'dir': '${gcs_paths.SEGMENT_GCS}', 'stage1': '${speeds_tables.vp_dwell}', 'proxy_stop_times': 'stop_time_expansion/speedmap_stop_times', 'stage2': 'nearest/nearest_vp_speedmap_proxy', 'stage2b': 'nearest/nearest2_vp_speedmap_proxy', 'stage3': 'speedmap/stop_arrivals_proxy', 'stage3b': 'speedmap/stop_arrivals', 'stage4': 'speedmap/speeds', 'trip_stop_cols': ['trip_instance_key', 'stop_sequence', 'stop_sequence1'], 'shape_stop_cols': ['shape_array_key', 'shape_id'], 'stop_pair_cols': ['stop_pair', 'stop_pair_name', 'segment_id'], 'route_dir_cols': ['route_id', 'direction_id'], 'segments_file': 'segment_options/speedmap_segments', 'shape_stop_single_segment': 'rollup_singleday/speeds_shape_speedmap_segments', 'shape_stop_single_segment_detail': 'rollup_singleday/speeds_shape_speedmap_segments_detail', 'route_dir_single_segment': 'rollup_singleday/speeds_route_dir_speedmap_segments', 'route_dir_multi_segment': 'rollup_multiday/speeds_route_dir_speedmap_segments', 'min_trip_minutes': '${speed_vars.time_min_cutoff}', 'max_trip_minutes': 180, 'max_speed': '${speed_vars.max_speed}', 'min_meters_elapsed': 1609, 'segment_meters': 1000}" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "catalog.speedmap_segments" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "f766b50a-c70d-4681-992c-d7f8979ada69", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'2024-10-16'" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "analysis_date" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "b4dd7af7-0cfa-4d94-a96d-f11e7cdc12f9", - "metadata": {}, - "outputs": [], - "source": [ - "# path = f'{catalog.speedmap_segments.dir}{catalog.speedmap_segments.stage4}_{analysis_date}.parquet'" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "12b824f2-4326-4f5e-ae86-95a46703c948", - "metadata": {}, - "outputs": [], - "source": [ - "path = f'{catalog.speedmap_segments.dir}{catalog.speedmap_segments.shape_stop_single_segment_detail}_{analysis_date}.parquet'" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "2743cbe7-b472-4ea2-af08-13d2003e93db", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'gs://calitp-analytics-data/data-analyses/rt_segment_speeds/rollup_singleday/speeds_shape_speedmap_segments_detail_2024-10-16.parquet'" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "path" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "7669d09d-c49e-448c-b57a-299112614bd0", - "metadata": {}, - "outputs": [], - "source": [ - "detail = gpd.read_parquet(path)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "ddf376af-9781-4943-b0d7-5f5418e07735", - "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", - "
schedule_gtfs_dataset_keyshape_array_keyshape_idroute_idroute_short_namestop_pairstop_pair_namesegment_idtime_of_dayp50_mph...p20_mphp80_mphnamecaltrans_districtorganization_source_record_idorganization_namebase64_urlgeometryn_trips_schtrips_hr_sch
00139b1253130b33adcd4b3a4490530d251530f7b5ba4cdde7c644c14f262005cb0c096a2-4c32-4675-b005-43b58b3781e6874b0dfa-ab3d-47da-ac75-5fd7b9bdea42C30 WB0d1ef8b5-90e4-40de-b37b-504cb862d18b__5b9a7352...Woodlake Park EB__Cypress St & Naranjo Blvd WB0d1ef8b5-90e4-40de-b37b-504cb862d18b-5b9a7352-...AM Peak17.27...15.2020.96TCRTA TripShot Schedule06 - Fresnorec4YWVqVwJ9XqDbqTulare County Regional Transit AgencyaHR0cHM6Ly90Y3J0YS50cmlwc2hvdC5jb20vdjEvZ3Rmcy...LINESTRING (-119.09762 36.41481, -119.09762 36...41.333333
10139b1253130b33adcd4b3a4490530d251530f7b5ba4cdde7c644c14f262005cb0c096a2-4c32-4675-b005-43b58b3781e6874b0dfa-ab3d-47da-ac75-5fd7b9bdea42C30 WB5b9a7352-556f-4272-b663-22f9821d6a40__5f894da7...Cypress St & Naranjo Blvd WB__Millwood and Roa...5b9a7352-556f-4272-b663-22f9821d6a40-5f894da7-...AM Peak49.50...43.8551.81TCRTA TripShot Schedule06 - Fresnorec4YWVqVwJ9XqDbqTulare County Regional Transit AgencyaHR0cHM6Ly90Y3J0YS50cmlwc2hvdC5jb20vdjEvZ3Rmcy...LINESTRING (-119.10550 36.41377, -119.10562 36...41.333333
20139b1253130b33adcd4b3a4490530d251530f7b5ba4cdde7c644c14f262005cb0c096a2-4c32-4675-b005-43b58b3781e6874b0dfa-ab3d-47da-ac75-5fd7b9bdea42C30 WB5b9a7352-556f-4272-b663-22f9821d6a40__5f894da7...Cypress St & Naranjo Blvd WB__Millwood and Roa...5b9a7352-556f-4272-b663-22f9821d6a40-5f894da7-...AM Peak58.87...57.1559.50TCRTA TripShot Schedule06 - Fresnorec4YWVqVwJ9XqDbqTulare County Regional Transit AgencyaHR0cHM6Ly90Y3J0YS50cmlwc2hvdC5jb20vdjEvZ3Rmcy...LINESTRING (-119.11666 36.41379, -119.11684 36...41.333333
\n", - "

3 rows × 21 columns

\n", - "
" - ], - "text/plain": [ - " schedule_gtfs_dataset_key shape_array_key \\\n", - "0 0139b1253130b33adcd4b3a4490530d2 51530f7b5ba4cdde7c644c14f262005c \n", - "1 0139b1253130b33adcd4b3a4490530d2 51530f7b5ba4cdde7c644c14f262005c \n", - "2 0139b1253130b33adcd4b3a4490530d2 51530f7b5ba4cdde7c644c14f262005c \n", - "\n", - " shape_id route_id \\\n", - "0 b0c096a2-4c32-4675-b005-43b58b3781e6 874b0dfa-ab3d-47da-ac75-5fd7b9bdea42 \n", - "1 b0c096a2-4c32-4675-b005-43b58b3781e6 874b0dfa-ab3d-47da-ac75-5fd7b9bdea42 \n", - "2 b0c096a2-4c32-4675-b005-43b58b3781e6 874b0dfa-ab3d-47da-ac75-5fd7b9bdea42 \n", - "\n", - " route_short_name stop_pair \\\n", - "0 C30 WB 0d1ef8b5-90e4-40de-b37b-504cb862d18b__5b9a7352... \n", - "1 C30 WB 5b9a7352-556f-4272-b663-22f9821d6a40__5f894da7... \n", - "2 C30 WB 5b9a7352-556f-4272-b663-22f9821d6a40__5f894da7... \n", - "\n", - " stop_pair_name \\\n", - "0 Woodlake Park EB__Cypress St & Naranjo Blvd WB \n", - "1 Cypress St & Naranjo Blvd WB__Millwood and Roa... \n", - "2 Cypress St & Naranjo Blvd WB__Millwood and Roa... \n", - "\n", - " segment_id time_of_day p50_mph \\\n", - "0 0d1ef8b5-90e4-40de-b37b-504cb862d18b-5b9a7352-... AM Peak 17.27 \n", - "1 5b9a7352-556f-4272-b663-22f9821d6a40-5f894da7-... AM Peak 49.50 \n", - "2 5b9a7352-556f-4272-b663-22f9821d6a40-5f894da7-... AM Peak 58.87 \n", - "\n", - " ... p20_mph p80_mph name caltrans_district \\\n", - "0 ... 15.20 20.96 TCRTA TripShot Schedule 06 - Fresno \n", - "1 ... 43.85 51.81 TCRTA TripShot Schedule 06 - Fresno \n", - "2 ... 57.15 59.50 TCRTA TripShot Schedule 06 - Fresno \n", - "\n", - " organization_source_record_id organization_name \\\n", - "0 rec4YWVqVwJ9XqDbq Tulare County Regional Transit Agency \n", - "1 rec4YWVqVwJ9XqDbq Tulare County Regional Transit Agency \n", - "2 rec4YWVqVwJ9XqDbq Tulare County Regional Transit Agency \n", - "\n", - " base64_url \\\n", - "0 aHR0cHM6Ly90Y3J0YS50cmlwc2hvdC5jb20vdjEvZ3Rmcy... \n", - "1 aHR0cHM6Ly90Y3J0YS50cmlwc2hvdC5jb20vdjEvZ3Rmcy... \n", - "2 aHR0cHM6Ly90Y3J0YS50cmlwc2hvdC5jb20vdjEvZ3Rmcy... \n", - "\n", - " geometry n_trips_sch trips_hr_sch \n", - "0 LINESTRING (-119.09762 36.41481, -119.09762 36... 4 1.333333 \n", - "1 LINESTRING (-119.10550 36.41377, -119.10562 36... 4 1.333333 \n", - "2 LINESTRING (-119.11666 36.41379, -119.11684 36... 4 1.333333 \n", - "\n", - "[3 rows x 21 columns]" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "detail >> head(3)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "294b8f67-1486-48e9-8fe9-015b009d8e53", - "metadata": {}, - "outputs": [], - "source": [ - "path = f'{catalog.schedule_downloads.dir}{catalog.schedule_downloads.trips}_{analysis_date}.parquet'" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "508d38d4-086c-43e6-8044-6ded0882e105", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'gs://calitp-analytics-data/data-analyses/rt_delay/compiled_cached_views/trips_2024-10-16.parquet'" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "path" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "dc3543ea-2544-4917-887e-9de4441fb460", - "metadata": {}, - "outputs": [], - "source": [ - "trips = pd.read_parquet(path)" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "de097b6e-9b83-4d3a-b3e6-3646c7c7be86", - "metadata": {}, - "outputs": [], - "source": [ - "df = gtfs_schedule_wrangling.get_sched_trips_hr(analysis_date)" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "55d704c5-1a87-4bbf-bcde-e867b53c3988", - "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", - "
route_idshape_idtime_of_dayschedule_gtfs_dataset_keyn_tripstrips_hr
00010010111AM Peak9809d3f8121513057bc5cb8de7b54ce231.000000
10010010111Early AM9809d3f8121513057bc5cb8de7b54ce210.333333
20010010111Midday9809d3f8121513057bc5cb8de7b54ce251.000000
\n", - "
" - ], - "text/plain": [ - " route_id shape_id time_of_day schedule_gtfs_dataset_key n_trips \\\n", - "0 001 0010111 AM Peak 9809d3f8121513057bc5cb8de7b54ce2 3 \n", - "1 001 0010111 Early AM 9809d3f8121513057bc5cb8de7b54ce2 1 \n", - "2 001 0010111 Midday 9809d3f8121513057bc5cb8de7b54ce2 5 \n", - "\n", - " trips_hr \n", - "0 1.000000 \n", - "1 0.333333 \n", - "2 1.000000 " - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df >> head(3)" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "id": "c6f784df-8dc0-4990-aaad-4a42af5b7e5e", - "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", - "
route_idshape_idtime_of_dayschedule_gtfs_dataset_keyn_tripstrips_hrroute_short_name
00010010111AM Peak9809d3f8121513057bc5cb8de7b54ce231.0000001
10010010111Early AM9809d3f8121513057bc5cb8de7b54ce210.3333331
20010010111Midday9809d3f8121513057bc5cb8de7b54ce251.0000001
30010010111PM Peak9809d3f8121513057bc5cb8de7b54ce230.6000001
40010010113AM Peak9809d3f8121513057bc5cb8de7b54ce231.0000001
........................
19176shrdservshrdserv_loop_3PM Peaka8d5f90bfd689badb7e1deb041408e9610.200000Shared Services
19177valleywidevalleywideAM Peak31152914d10e2d0977b8b2fabb167922124.000000None
19178valleywidevalleywideEvening31152914d10e2d0977b8b2fabb16792291.800000None
19179valleywidevalleywideMidday31152914d10e2d0977b8b2fabb167922204.000000None
19180valleywidevalleywidePM Peak31152914d10e2d0977b8b2fabb167922204.000000None
\n", - "

19181 rows × 7 columns

\n", - "
" - ], - "text/plain": [ - " route_id shape_id time_of_day \\\n", - "0 001 0010111 AM Peak \n", - "1 001 0010111 Early AM \n", - "2 001 0010111 Midday \n", - "3 001 0010111 PM Peak \n", - "4 001 0010113 AM Peak \n", - "... ... ... ... \n", - "19176 shrdserv shrdserv_loop_3 PM Peak \n", - "19177 valleywide valleywide AM Peak \n", - "19178 valleywide valleywide Evening \n", - "19179 valleywide valleywide Midday \n", - "19180 valleywide valleywide PM Peak \n", - "\n", - " schedule_gtfs_dataset_key n_trips trips_hr route_short_name \n", - "0 9809d3f8121513057bc5cb8de7b54ce2 3 1.000000 1 \n", - "1 9809d3f8121513057bc5cb8de7b54ce2 1 0.333333 1 \n", - "2 9809d3f8121513057bc5cb8de7b54ce2 5 1.000000 1 \n", - "3 9809d3f8121513057bc5cb8de7b54ce2 3 0.600000 1 \n", - "4 9809d3f8121513057bc5cb8de7b54ce2 3 1.000000 1 \n", - "... ... ... ... ... \n", - "19176 a8d5f90bfd689badb7e1deb041408e96 1 0.200000 Shared Services \n", - "19177 31152914d10e2d0977b8b2fabb167922 12 4.000000 None \n", - "19178 31152914d10e2d0977b8b2fabb167922 9 1.800000 None \n", - "19179 31152914d10e2d0977b8b2fabb167922 20 4.000000 None \n", - "19180 31152914d10e2d0977b8b2fabb167922 20 4.000000 None \n", - "\n", - "[19181 rows x 7 columns]" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "gtfs_schedule_wrangling.merge_route_identifiers(df, analysis_date)" - ] - }, - { - "cell_type": "markdown", - "id": "6a062796-ae2f-4081-b73b-8923c7bd85b2", - "metadata": {}, - "source": [ - "## Where'd the J line go??\n", - "\n", - "Has no route_short_name, removed that from grouping cols and added at end" - ] - } - ], - "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 -} From 794625c6af4068f9795fed56be7ff6502346f9a7 Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Thu, 16 Jan 2025 23:59:53 +0000 Subject: [PATCH 02/17] add nb --- rt_segment_speeds/44_excluded_shapes.ipynb | 459 +++++++++++++++++++++ 1 file changed, 459 insertions(+) create mode 100644 rt_segment_speeds/44_excluded_shapes.ipynb diff --git a/rt_segment_speeds/44_excluded_shapes.ipynb b/rt_segment_speeds/44_excluded_shapes.ipynb new file mode 100644 index 000000000..4d82bcc15 --- /dev/null +++ b/rt_segment_speeds/44_excluded_shapes.ipynb @@ -0,0 +1,459 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "d528f399-cf33-459e-b5dc-92e0b4ae389a", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import geopandas as gpd\n", + "from siuba import *\n", + "import shared_utils\n", + "\n", + "from calitp_data_analysis import get_fs\n", + "from segment_speed_utils import helpers, time_series_utils, gtfs_schedule_wrangling\n", + "from segment_speed_utils.project_vars import SCHED_GCS, SEGMENT_GCS, GTFS_DATA_DICT, analysis_date" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "6cd318e5-5c4e-4249-b158-232f4d940770", + "metadata": {}, + "outputs": [], + "source": [ + "catalog = shared_utils.catalog_utils.get_catalog('gtfs_analytics_data')" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "6e86c1a8-d3de-4fc6-9478-c03133b6745c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'dir': '${gcs_paths.SEGMENT_GCS}', 'stage1': '${speeds_tables.vp_dwell}', 'proxy_stop_times': 'stop_time_expansion/speedmap_stop_times', 'stage2': 'nearest/nearest_vp_speedmap_proxy', 'stage3': 'speedmap/stop_arrivals_proxy', 'stage3b': 'speedmap/stop_arrivals', 'stage4': 'speedmap/speeds', 'trip_stop_cols': ['trip_instance_key', 'stop_sequence', 'stop_sequence1'], 'shape_stop_cols': ['shape_array_key', 'shape_id'], 'stop_pair_cols': ['stop_pair', 'stop_pair_name', 'segment_id'], 'route_dir_cols': ['route_id', 'direction_id'], 'segments_file': 'segment_options/speedmap_segments', 'shape_stop_single_segment': 'rollup_singleday/speeds_shape_speedmap_segments', 'shape_stop_single_segment_detail': 'rollup_singleday/speeds_shape_speedmap_segments_detail', 'excluded_shapes_by_time_of_day': 'rollup_singleday/excluded_shapes_by_time_of_day', 'route_dir_single_segment': 'rollup_singleday/speeds_route_dir_speedmap_segments', 'route_dir_multi_segment': 'rollup_multiday/speeds_route_dir_speedmap_segments', 'min_trip_minutes': '${speed_vars.time_min_cutoff}', 'max_trip_minutes': 180, 'max_speed': '${speed_vars.max_speed}', 'min_meters_elapsed': 1609, 'segment_meters': 1000}" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "catalog.speedmap_segments" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "f766b50a-c70d-4681-992c-d7f8979ada69", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'2024-12-11'" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "analysis_date" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "82598ccf-876a-4ab2-959c-7af1b120e1e5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "\u001b[0;31mSignature:\u001b[0m\n", + "\u001b[0mhelpers\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mimport_scheduled_shapes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0manalysis_date\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mfilters\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtuple\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mcolumns\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mlist\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'shape_array_key'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'geometry'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mget_pandas\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mbool\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mcrs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'EPSG:3310'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mUnion\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mgeopandas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgeodataframe\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mGeoDataFrame\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdask_geopandas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mGeoDataFrame\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m Import shapes.\n", + "\u001b[0;31mFile:\u001b[0m ~/data-analyses/rt_segment_speeds/segment_speed_utils/helpers.py\n", + "\u001b[0;31mType:\u001b[0m function" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "helpers.import_scheduled_shapes?" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "d2e5a320-d728-49c6-99e6-a1af00c7a37c", + "metadata": {}, + "outputs": [], + "source": [ + "shapes = helpers.import_scheduled_shapes(analysis_date)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "756f4b22-e55f-40d8-ac5b-b4f493787ac2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "\u001b[0;31mSignature:\u001b[0m\n", + "\u001b[0mhelpers\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mimport_scheduled_trips\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0manalysis_date\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mfilters\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtuple\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mcolumns\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mlist\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'gtfs_dataset_key'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'name'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'trip_id'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'shape_id'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'shape_array_key'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'route_id'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'route_key'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'direction_id'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'route_short_name'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mget_pandas\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mbool\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mUnion\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mpandas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mframe\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdask\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdataframe\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m\n", + "Get scheduled trips info (all operators) for single day, \n", + "and keep subset of columns.\n", + "\u001b[0;31mFile:\u001b[0m ~/data-analyses/rt_segment_speeds/segment_speed_utils/helpers.py\n", + "\u001b[0;31mType:\u001b[0m function" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "helpers.import_scheduled_trips?" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "2a652a6d-bf87-4f6c-a6ba-ab65d7bd029f", + "metadata": {}, + "outputs": [], + "source": [ + "trips = helpers.import_scheduled_trips(analysis_date, columns=['shape_array_key', 'shape_id', 'route_id',\n", + " 'route_short_name', 'gtfs_dataset_key']).drop_duplicates()" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "82e1e9ee-78b1-4c32-9adb-be8b8b9639f6", + "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", + "
shape_array_keygeometryshape_idroute_idroute_short_nameschedule_gtfs_dataset_key
013cb51c5ed7990a71a227d7d096426b9LINESTRING (294120.912 -448955.567, 294061.160...p_14325253551ebc783bace70899492d6206c352547d6
1229051b21f5e16ec5841ecabf98a12c7LINESTRING (-78208.700 215570.571, -77955.213 ...p_1426803126None96a5b8c5bc22b3936ddee01cac7b5fb6
2f08b835c09fe1d9e38199ad09c9327d8LINESTRING (91775.849 -41429.921, 91784.599 -4...p_143592076755Nonecb8a465cffec67c8fd90f31b389ed4c3
36be599a186ee46f51fe77bb0bc0ffc50LINESTRING (-118608.801 41853.097, -118632.536...837734311363029a23cb0e73f2a5d98a345c5e2e40
43c2b4b3de0eef26767c626504e7a839eLINESTRING (-210809.438 -23394.433, -210787.18...1540061154154aea4108997c66a74fbdae27b34b69fde
.....................
7564f90c7ca85f79cec1cf718ffe3a5ea804LINESTRING (173733.400 -444977.431, 173388.307...8577_shp50None84d3c3507a4c8df851d935b63908bbd5
75654e41a760292c44d8c07b5e187903d3cbLINESTRING (169600.675 -449977.512, 169620.127...8582_shp30None84d3c3507a4c8df851d935b63908bbd5
75668bf6f14bb04f53e24929661cf9aee280LINESTRING (176938.852 -444188.785, 176853.905...8659_shp10None84d3c3507a4c8df851d935b63908bbd5
75677ed83def41f1f965236ca51c4e059d5bLINESTRING (168680.735 -437987.848, 168658.352...8656_shp10None84d3c3507a4c8df851d935b63908bbd5
7568565c495078a145e5e9e8aedf2d3c8a02LINESTRING (177015.581 -444190.563, 177062.596...8724_shp60None84d3c3507a4c8df851d935b63908bbd5
\n", + "

7569 rows × 6 columns

\n", + "
" + ], + "text/plain": [ + " shape_array_key \\\n", + "0 13cb51c5ed7990a71a227d7d096426b9 \n", + "1 229051b21f5e16ec5841ecabf98a12c7 \n", + "2 f08b835c09fe1d9e38199ad09c9327d8 \n", + "3 6be599a186ee46f51fe77bb0bc0ffc50 \n", + "4 3c2b4b3de0eef26767c626504e7a839e \n", + "... ... \n", + "7564 f90c7ca85f79cec1cf718ffe3a5ea804 \n", + "7565 4e41a760292c44d8c07b5e187903d3cb \n", + "7566 8bf6f14bb04f53e24929661cf9aee280 \n", + "7567 7ed83def41f1f965236ca51c4e059d5b \n", + "7568 565c495078a145e5e9e8aedf2d3c8a02 \n", + "\n", + " geometry shape_id route_id \\\n", + "0 LINESTRING (294120.912 -448955.567, 294061.160... p_1432525 355 \n", + "1 LINESTRING (-78208.700 215570.571, -77955.213 ... p_1426803 126 \n", + "2 LINESTRING (91775.849 -41429.921, 91784.599 -4... p_1435920 76755 \n", + "3 LINESTRING (-118608.801 41853.097, -118632.536... 8377 3431 \n", + "4 LINESTRING (-210809.438 -23394.433, -210787.18... 1540061 154 \n", + "... ... ... ... \n", + "7564 LINESTRING (173733.400 -444977.431, 173388.307... 8577_shp 50 \n", + "7565 LINESTRING (169600.675 -449977.512, 169620.127... 8582_shp 30 \n", + "7566 LINESTRING (176938.852 -444188.785, 176853.905... 8659_shp 10 \n", + "7567 LINESTRING (168680.735 -437987.848, 168658.352... 8656_shp 10 \n", + "7568 LINESTRING (177015.581 -444190.563, 177062.596... 8724_shp 60 \n", + "\n", + " route_short_name schedule_gtfs_dataset_key \n", + "0 1 ebc783bace70899492d6206c352547d6 \n", + "1 None 96a5b8c5bc22b3936ddee01cac7b5fb6 \n", + "2 None cb8a465cffec67c8fd90f31b389ed4c3 \n", + "3 13 63029a23cb0e73f2a5d98a345c5e2e40 \n", + "4 154 aea4108997c66a74fbdae27b34b69fde \n", + "... ... ... \n", + "7564 None 84d3c3507a4c8df851d935b63908bbd5 \n", + "7565 None 84d3c3507a4c8df851d935b63908bbd5 \n", + "7566 None 84d3c3507a4c8df851d935b63908bbd5 \n", + "7567 None 84d3c3507a4c8df851d935b63908bbd5 \n", + "7568 None 84d3c3507a4c8df851d935b63908bbd5 \n", + "\n", + "[7569 rows x 6 columns]" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "shapes.merge(trips, on='shape_array_key')" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "baa0be3a-5171-4915-92a9-b83f6bd1485e", + "metadata": {}, + "outputs": [], + "source": [ + "path = f\"{catalog.speedmap_segments.dir}{catalog.speedmap_segments.shape_stop_single_segment_detail}_{analysis_date}.parquet\"" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "e340a558-84ca-4d23-8758-983169f58ad3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'gs://calitp-analytics-data/data-analyses/rt_segment_speeds/rollup_singleday/speeds_shape_speedmap_segments_detail_2024-12-11.parquet'" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "path" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "98022a2b-46c2-46ab-b4f0-774235b81663", + "metadata": {}, + "outputs": [], + "source": [ + "gdf = gpd.read_parquet(path)" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "2f572c39-8380-460a-a013-f23129d3c3bb", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index(['schedule_gtfs_dataset_key', 'shape_array_key', 'shape_id', 'route_id',\n", + " 'direction_id', 'stop_pair', 'stop_pair_name', 'segment_id',\n", + " 'time_of_day', 'p50_mph', 'n_trips', 'p20_mph', 'p80_mph', 'name',\n", + " 'caltrans_district', 'organization_source_record_id',\n", + " 'organization_name', 'base64_url', 'geometry', 'n_trips_sch',\n", + " 'trips_hr_sch', 'route_short_name'],\n", + " dtype='object')" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "gdf.columns" + ] + }, + { + "cell_type": "markdown", + "id": "68892471-46c0-4142-9e4f-ae6fdda2ad34", + "metadata": {}, + "source": [ + "could presumably iterate over `schedule_gtfs_dataset_key` and append to one gdf to have one file..." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d89e67be-79df-4b0b-b316-641dd34d7154", + "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 +} From a4f34cf1669f5885ef6787b9c5de04b70e6f11e3 Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Tue, 21 Jan 2025 04:11:47 +0000 Subject: [PATCH 03/17] rename function call to match vp_tranform --- gtfs_funnel/vp_keep_usable.py | 158 +--------------------------------- 1 file changed, 1 insertion(+), 157 deletions(-) diff --git a/gtfs_funnel/vp_keep_usable.py b/gtfs_funnel/vp_keep_usable.py index c6f851e54..870d1436c 100644 --- a/gtfs_funnel/vp_keep_usable.py +++ b/gtfs_funnel/vp_keep_usable.py @@ -1,160 +1,4 @@ -""" -Pre-processing vehicle positions. -Drop all RT trips with less than 10 min of data. -Add direction to vp. - -Doing this with geopandas gdfs will crash kernel (2 geom cols too much). -Doing this with dask_geopandas gddfs takes ~25 min. -Doing this with dask ddfs (x, y) coords takes ~7 min. -Doing this with dask ddfs + np arrays takes ~4 min. (but persisting takes another 4 min) -Doing this with pandas and numpy arrays takes ~8 min. -""" -import datetime -import geopandas as gpd -import numpy as np -import pandas as pd -import sys - -from loguru import logger - -from calitp_data_analysis import utils -from calitp_data_analysis.geography_utils import WGS84 -from segment_speed_utils.project_vars import PROJECT_CRS -from segment_speed_utils import vp_transform -from shared_utils import geo_utils, publish_utils, rt_utils -from update_vars import GTFS_DATA_DICT, SEGMENT_GCS - -def find_valid_trips( - vp: pd.DataFrame, - timestamp_col: str, - trip_time_min_cutoff: int -) -> list: - """ - Group by trip and calculate the time elapsed (max_time-min_time) - for RT vp observed. - """ - min_time = vp.groupby("trip_instance_key")[timestamp_col].min() - max_time = vp.groupby("trip_instance_key")[timestamp_col].max() - - # This is a pd.Series that calculates the trip time elapsed - # in vp df - trip_times = ((max_time - min_time) / np.timedelta64(1, "s")) - - # Subset it to trips that meet our minimum time cut-off - # index is the trip_instance_key - usable_trips = trip_times.loc[ - trip_times > (trip_time_min_cutoff * 60) - ].index.tolist() - - return usable_trips - - -def pare_down_to_valid_trips( - analysis_date: str, - dict_inputs: dict = {} -): - time0 = datetime.datetime.now() - - INPUT_FILE = dict_inputs.speeds_tables.raw_vp - TIMESTAMP_COL = dict_inputs.speeds_tables.timestamp_col - TIME_CUTOFF = dict_inputs.speeds_tables.time_min_cutoff - EXPORT_FILE = dict_inputs.speeds_tables.usable_vp - - vp = gpd.read_parquet( - f"{SEGMENT_GCS}{INPUT_FILE}_{analysis_date}.parquet", - ).to_crs(WGS84) - - usable_trips = find_valid_trips(vp, TIMESTAMP_COL, TIME_CUTOFF) - - vp = vp[vp.trip_instance_key.isin(usable_trips)].sort_values( - ["gtfs_dataset_key", "trip_id", - TIMESTAMP_COL] - ).drop_duplicates( - subset=["trip_instance_key", TIMESTAMP_COL] - ).reset_index(drop=True) - - - vp = vp.assign( - vp_idx = vp.index, - ) - - utils.geoparquet_gcs_export( - vp, - SEGMENT_GCS, - f"{EXPORT_FILE}_{analysis_date}_stage" - ) - - time1 = datetime.datetime.now() - logger.info(f"pare down vp: {time1 - time0}") - - # Add in direction of travel - get_vp_direction_column(vp) - - time2 = datetime.datetime.now() - logger.info(f"export vp direction: {time2 - time1}") - - return - - -def merge_in_vp_direction( - analysis_date: str, - dict_inputs: dict = {} -): - """ - Merge staged vp_usable with the vp direction results - and export. - """ - time0 = datetime.datetime.now() - - INPUT_FILE = dict_inputs.speeds_tables.usable_vp - - vp_direction = pd.read_parquet( - f"{SEGMENT_GCS}vp_direction_{analysis_date}.parquet" - ) - - # By the end of add_vp_direction, we return df, not gdf - # Let's convert to tabular now, make use of partitioning - vp = gpd.read_parquet( - f"{SEGMENT_GCS}{INPUT_FILE}_{analysis_date}_stage.parquet", - ).to_crs(WGS84).merge( - vp_direction, - on = "vp_idx", - how = "inner" - ) - - vp = vp.assign( - x = vp.geometry.x, - y = vp.geometry.y - ).drop(columns = "geometry") - - export_path = f"{SEGMENT_GCS}{INPUT_FILE}_{analysis_date}" - - publish_utils.if_exists_then_delete(export_path) - - vp.to_parquet( - export_path, - partition_cols = "gtfs_dataset_key", - # if we don't delete the entire folder of partitioned parquets, this - # can delete it if the partitions have the same name - #existing_data_behavior = "delete_matching" - ) - - time1 = datetime.datetime.now() - logger.info(f"{analysis_date}: export usable vp with direction: {time1 - time0}") - - return - - -def get_vp_direction_column( - vp_gdf: gpd.GeoDataFrame, -) -> pd.DataFrame: - """ - """ - vp_gdf = vp_gdf[ - ["trip_instance_key", "vp_idx", "geometry"] - ].to_crs(PROJECT_CRS) - - vp_condensed = vp_transform.condense_by_trip( +condensed = vp_transform.condense_point_geom_to_line( vp_gdf, group_cols = ["trip_instance_key"], sort_cols = ["trip_instance_key", "vp_idx"], From e670a9e12189128e5d53ac445c706f4a8e07c790 Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Tue, 21 Jan 2025 04:13:25 +0000 Subject: [PATCH 04/17] Revert "rename function call to match vp_tranform" This reverts commit a76a6f4c94726f68d54e9341db934897b101583a. --- gtfs_funnel/vp_keep_usable.py | 158 +++++++++++++++++++++++++++++++++- 1 file changed, 157 insertions(+), 1 deletion(-) diff --git a/gtfs_funnel/vp_keep_usable.py b/gtfs_funnel/vp_keep_usable.py index 870d1436c..c6f851e54 100644 --- a/gtfs_funnel/vp_keep_usable.py +++ b/gtfs_funnel/vp_keep_usable.py @@ -1,4 +1,160 @@ -condensed = vp_transform.condense_point_geom_to_line( +""" +Pre-processing vehicle positions. +Drop all RT trips with less than 10 min of data. +Add direction to vp. + +Doing this with geopandas gdfs will crash kernel (2 geom cols too much). +Doing this with dask_geopandas gddfs takes ~25 min. +Doing this with dask ddfs (x, y) coords takes ~7 min. +Doing this with dask ddfs + np arrays takes ~4 min. (but persisting takes another 4 min) +Doing this with pandas and numpy arrays takes ~8 min. +""" +import datetime +import geopandas as gpd +import numpy as np +import pandas as pd +import sys + +from loguru import logger + +from calitp_data_analysis import utils +from calitp_data_analysis.geography_utils import WGS84 +from segment_speed_utils.project_vars import PROJECT_CRS +from segment_speed_utils import vp_transform +from shared_utils import geo_utils, publish_utils, rt_utils +from update_vars import GTFS_DATA_DICT, SEGMENT_GCS + +def find_valid_trips( + vp: pd.DataFrame, + timestamp_col: str, + trip_time_min_cutoff: int +) -> list: + """ + Group by trip and calculate the time elapsed (max_time-min_time) + for RT vp observed. + """ + min_time = vp.groupby("trip_instance_key")[timestamp_col].min() + max_time = vp.groupby("trip_instance_key")[timestamp_col].max() + + # This is a pd.Series that calculates the trip time elapsed + # in vp df + trip_times = ((max_time - min_time) / np.timedelta64(1, "s")) + + # Subset it to trips that meet our minimum time cut-off + # index is the trip_instance_key + usable_trips = trip_times.loc[ + trip_times > (trip_time_min_cutoff * 60) + ].index.tolist() + + return usable_trips + + +def pare_down_to_valid_trips( + analysis_date: str, + dict_inputs: dict = {} +): + time0 = datetime.datetime.now() + + INPUT_FILE = dict_inputs.speeds_tables.raw_vp + TIMESTAMP_COL = dict_inputs.speeds_tables.timestamp_col + TIME_CUTOFF = dict_inputs.speeds_tables.time_min_cutoff + EXPORT_FILE = dict_inputs.speeds_tables.usable_vp + + vp = gpd.read_parquet( + f"{SEGMENT_GCS}{INPUT_FILE}_{analysis_date}.parquet", + ).to_crs(WGS84) + + usable_trips = find_valid_trips(vp, TIMESTAMP_COL, TIME_CUTOFF) + + vp = vp[vp.trip_instance_key.isin(usable_trips)].sort_values( + ["gtfs_dataset_key", "trip_id", + TIMESTAMP_COL] + ).drop_duplicates( + subset=["trip_instance_key", TIMESTAMP_COL] + ).reset_index(drop=True) + + + vp = vp.assign( + vp_idx = vp.index, + ) + + utils.geoparquet_gcs_export( + vp, + SEGMENT_GCS, + f"{EXPORT_FILE}_{analysis_date}_stage" + ) + + time1 = datetime.datetime.now() + logger.info(f"pare down vp: {time1 - time0}") + + # Add in direction of travel + get_vp_direction_column(vp) + + time2 = datetime.datetime.now() + logger.info(f"export vp direction: {time2 - time1}") + + return + + +def merge_in_vp_direction( + analysis_date: str, + dict_inputs: dict = {} +): + """ + Merge staged vp_usable with the vp direction results + and export. + """ + time0 = datetime.datetime.now() + + INPUT_FILE = dict_inputs.speeds_tables.usable_vp + + vp_direction = pd.read_parquet( + f"{SEGMENT_GCS}vp_direction_{analysis_date}.parquet" + ) + + # By the end of add_vp_direction, we return df, not gdf + # Let's convert to tabular now, make use of partitioning + vp = gpd.read_parquet( + f"{SEGMENT_GCS}{INPUT_FILE}_{analysis_date}_stage.parquet", + ).to_crs(WGS84).merge( + vp_direction, + on = "vp_idx", + how = "inner" + ) + + vp = vp.assign( + x = vp.geometry.x, + y = vp.geometry.y + ).drop(columns = "geometry") + + export_path = f"{SEGMENT_GCS}{INPUT_FILE}_{analysis_date}" + + publish_utils.if_exists_then_delete(export_path) + + vp.to_parquet( + export_path, + partition_cols = "gtfs_dataset_key", + # if we don't delete the entire folder of partitioned parquets, this + # can delete it if the partitions have the same name + #existing_data_behavior = "delete_matching" + ) + + time1 = datetime.datetime.now() + logger.info(f"{analysis_date}: export usable vp with direction: {time1 - time0}") + + return + + +def get_vp_direction_column( + vp_gdf: gpd.GeoDataFrame, +) -> pd.DataFrame: + """ + """ + vp_gdf = vp_gdf[ + ["trip_instance_key", "vp_idx", "geometry"] + ].to_crs(PROJECT_CRS) + + vp_condensed = vp_transform.condense_by_trip( vp_gdf, group_cols = ["trip_instance_key"], sort_cols = ["trip_instance_key", "vp_idx"], From 590b06c4ee88a27b2553fefc3e37ca7658793a4e Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Tue, 21 Jan 2025 04:15:15 +0000 Subject: [PATCH 05/17] rename function call to match vp_tranform --- gtfs_funnel/vp_keep_usable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs_funnel/vp_keep_usable.py b/gtfs_funnel/vp_keep_usable.py index c6f851e54..bf84f35c5 100644 --- a/gtfs_funnel/vp_keep_usable.py +++ b/gtfs_funnel/vp_keep_usable.py @@ -10,7 +10,7 @@ Doing this with pandas and numpy arrays takes ~8 min. """ import datetime -import geopandas as gpd +import geopandas as pd import numpy as np import pandas as pd import sys @@ -154,7 +154,7 @@ def get_vp_direction_column( ["trip_instance_key", "vp_idx", "geometry"] ].to_crs(PROJECT_CRS) - vp_condensed = vp_transform.condense_by_trip( + vp_condensed = vp_transform.condense_point_geom_to_line( vp_gdf, group_cols = ["trip_instance_key"], sort_cols = ["trip_instance_key", "vp_idx"], From f60b39545dffdd5206f640c7877451136608dbd7 Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Tue, 21 Jan 2025 04:37:05 +0000 Subject: [PATCH 06/17] fix geopandas import --- gtfs_funnel/vp_keep_usable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs_funnel/vp_keep_usable.py b/gtfs_funnel/vp_keep_usable.py index bf84f35c5..958a04778 100644 --- a/gtfs_funnel/vp_keep_usable.py +++ b/gtfs_funnel/vp_keep_usable.py @@ -10,7 +10,7 @@ Doing this with pandas and numpy arrays takes ~8 min. """ import datetime -import geopandas as pd +import geopandas as gpd import numpy as np import pandas as pd import sys From e3ba1af067270b27a1f370f0ec0ef73da995a709 Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Tue, 21 Jan 2025 04:55:02 +0000 Subject: [PATCH 07/17] comment out unused arg --- gtfs_funnel/logs/vp_preprocessing.log | 2 ++ gtfs_funnel/vp_keep_usable.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gtfs_funnel/logs/vp_preprocessing.log b/gtfs_funnel/logs/vp_preprocessing.log index 0966517e5..8a0fcae90 100644 --- a/gtfs_funnel/logs/vp_preprocessing.log +++ b/gtfs_funnel/logs/vp_preprocessing.log @@ -310,3 +310,5 @@ 2024-12-17 14:08:13.714 | INFO | __main__::236 - vp with dwell time 2024-12-11: 0:06:07.248833 2024-12-17 14:13:50.962 | INFO | __main__::78 - 2024-12-11: condense vp for trip 0:05:19.406518 2025-01-16 15:00:10.192 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:40.192578 +2025-01-20 20:40:27.661 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:57.913529 +2025-01-20 20:45:06.455 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:28.449333 diff --git a/gtfs_funnel/vp_keep_usable.py b/gtfs_funnel/vp_keep_usable.py index 958a04778..1775708d0 100644 --- a/gtfs_funnel/vp_keep_usable.py +++ b/gtfs_funnel/vp_keep_usable.py @@ -157,7 +157,7 @@ def get_vp_direction_column( vp_condensed = vp_transform.condense_point_geom_to_line( vp_gdf, group_cols = ["trip_instance_key"], - sort_cols = ["trip_instance_key", "vp_idx"], +# sort_cols = ["trip_instance_key", "vp_idx"], not used? array_cols = ["vp_idx", "geometry"] ) From d524ee494e21d98014c97e3c977110f46b2fe02c Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Tue, 21 Jan 2025 05:20:04 +0000 Subject: [PATCH 08/17] explode with pd method instead of pipe to missing function --- gtfs_funnel/logs/vp_preprocessing.log | 2 ++ gtfs_funnel/vp_keep_usable.py | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gtfs_funnel/logs/vp_preprocessing.log b/gtfs_funnel/logs/vp_preprocessing.log index 8a0fcae90..515355694 100644 --- a/gtfs_funnel/logs/vp_preprocessing.log +++ b/gtfs_funnel/logs/vp_preprocessing.log @@ -312,3 +312,5 @@ 2025-01-16 15:00:10.192 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:40.192578 2025-01-20 20:40:27.661 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:57.913529 2025-01-20 20:45:06.455 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:28.449333 +2025-01-20 20:58:21.900 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:27.450257 +2025-01-20 21:06:38.791 | INFO | __main__:pare_down_to_valid_trips:94 - export vp direction: 0:08:16.891594 diff --git a/gtfs_funnel/vp_keep_usable.py b/gtfs_funnel/vp_keep_usable.py index 1775708d0..35bba1116 100644 --- a/gtfs_funnel/vp_keep_usable.py +++ b/gtfs_funnel/vp_keep_usable.py @@ -179,10 +179,7 @@ def get_vp_direction_column( vp_condensed = vp_condensed.assign( vp_primary_direction = vp_direction_series - )[keep_cols].pipe( - vp_transform.explode_arrays, - array_cols = keep_cols - ) + )[keep_cols].explode(columns=keep_cols) vp_condensed.to_parquet( f"{SEGMENT_GCS}vp_direction_{analysis_date}.parquet" From bb2cbc265a5fc7b34e73c961593d5e8d2c1e8648 Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Tue, 21 Jan 2025 20:11:04 +0000 Subject: [PATCH 09/17] finish funnel, speedmaps show missing shapes --- .../shared_utils/gtfs_analytics_data.yml | 2 +- ca_transit_speed_maps/01_new_speedmaps.ipynb | 105 ++-- ca_transit_speed_maps/speedmap_utils.py | 43 +- gtfs_funnel/logs/vp_preprocessing.log | 9 + gtfs_funnel/published_operators.yml | 29 +- gtfs_funnel/vp_keep_usable.py | 2 +- rt_segment_speeds/44_excluded_shapes.ipynb | 462 ++++++------------ 7 files changed, 279 insertions(+), 373 deletions(-) diff --git a/_shared_utils/shared_utils/gtfs_analytics_data.yml b/_shared_utils/shared_utils/gtfs_analytics_data.yml index 377c04a6a..704b4b5c8 100644 --- a/_shared_utils/shared_utils/gtfs_analytics_data.yml +++ b/_shared_utils/shared_utils/gtfs_analytics_data.yml @@ -123,7 +123,7 @@ speedmap_segments: segments_file: "segment_options/speedmap_segments" shape_stop_single_segment: "rollup_singleday/speeds_shape_speedmap_segments" shape_stop_single_segment_detail: "rollup_singleday/speeds_shape_speedmap_segments_detail" - excluded_shapes_by_time_of_day: "rollup_singleday/excluded_shapes_by_time_of_day" + # excluded_shapes_by_time_of_day: "rollup_singleday/excluded_shapes_by_time_of_day" route_dir_single_segment: "rollup_singleday/speeds_route_dir_speedmap_segments" route_dir_multi_segment: "rollup_multiday/speeds_route_dir_speedmap_segments" min_trip_minutes: ${speed_vars.time_min_cutoff} diff --git a/ca_transit_speed_maps/01_new_speedmaps.ipynb b/ca_transit_speed_maps/01_new_speedmaps.ipynb index 6697ef01b..a8271b243 100644 --- a/ca_transit_speed_maps/01_new_speedmaps.ipynb +++ b/ca_transit_speed_maps/01_new_speedmaps.ipynb @@ -34,13 +34,14 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "23f682c8-187e-4586-a0b2-00dd7569e0c4", + "execution_count": 3, + "id": "82d7b8ac-3897-4604-9be4-37bd480577e7", "metadata": {}, "outputs": [], "source": [ "%%capture\n", - "speedmap_segs, this_shn = speedmap_utils.read_segments_shn(organization_source_record_id=organization_source_record_id)" + "speedmap_segs, this_shn = speedmap_utils.read_segments_shn(organization_source_record_id=organization_source_record_id)\n", + "org_shapes = speedmap_utils.read_shapes(speedmap_segs)" ] }, { @@ -70,7 +71,9 @@ { "cell_type": "markdown", "id": "d0b9c978-e6a6-4646-a2c0-e3a603f1dfc3", - "metadata": {}, + "metadata": { + "tags": [] + }, "source": [ "# {organization_name}" ] @@ -104,7 +107,7 @@ }, { "cell_type": "markdown", - "id": "6e2aa3d4-acef-4e64-9fa6-07a95ae5112b", + "id": "8b335f1d-5d61-4356-8258-68eb0b069989", "metadata": {}, "source": [ "### 20th Percentile Speeds by Segment" @@ -113,19 +116,19 @@ { "cell_type": "code", "execution_count": null, - "id": "0a6d0609-3517-46be-a08f-0d04129a62ff", + "id": "0003df13-f7d7-4d70-bd8a-91f0cc4e95c3", "metadata": {}, "outputs": [], "source": [ "%%capture\n", - "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, analysis_date=ANALYSIS_DATE,\n", - " time_of_day='AM Peak', map_type='new_speedmap')" + "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, org_shapes=org_shapes,\n", + " analysis_date=ANALYSIS_DATE, time_of_day='AM Peak', map_type='new_speedmap')" ] }, { "cell_type": "code", "execution_count": null, - "id": "22dea4bc-91c3-43b9-a540-d9b52237f51f", + "id": "364e6af4-da42-44d6-a252-9b4039e3f590", "metadata": {}, "outputs": [], "source": [ @@ -135,7 +138,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7019c47a-0620-458a-a45a-005f288ee805", + "id": "4b7d4db9-6c2c-4151-93d7-c92c512a221d", "metadata": {}, "outputs": [], "source": [ @@ -144,7 +147,7 @@ }, { "cell_type": "markdown", - "id": "02bafcad-7e1a-43f7-86ba-9b3c56135a62", + "id": "9dbefb68-c2fa-47b9-84ab-9c5e86315f56", "metadata": {}, "source": [ "### Variation in Speeds by Segment\n", @@ -156,19 +159,19 @@ { "cell_type": "code", "execution_count": null, - "id": "82a148cd-1561-4c88-bccf-f552307c2a3d", + "id": "f942bbf6-16f4-402b-a7e4-cec9b95e5243", "metadata": {}, "outputs": [], "source": [ "%%capture\n", - "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, analysis_date=ANALYSIS_DATE,\n", - " time_of_day='AM Peak', map_type='new_speed_variation')" + "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, org_shapes=org_shapes,\n", + " analysis_date=ANALYSIS_DATE, time_of_day='AM Peak', map_type='new_speed_variation')" ] }, { "cell_type": "code", "execution_count": null, - "id": "adf4b569-0029-4295-bc14-70017df6f28e", + "id": "4c80b3db-3800-41f0-b0f4-c589ffb2e08e", "metadata": {}, "outputs": [], "source": [ @@ -178,7 +181,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d497e0bc-a756-4f05-94d7-174fa45a458c", + "id": "187d8255-1332-4b6e-ac75-ed5710830a7b", "metadata": {}, "outputs": [], "source": [ @@ -187,7 +190,7 @@ }, { "cell_type": "markdown", - "id": "4f60fd2b-66e0-4257-a21c-bdeeece6e8c6", + "id": "68ed263d-326c-4f3f-bfb4-ffb963f8f02b", "metadata": { "tags": [] }, @@ -197,7 +200,7 @@ }, { "cell_type": "markdown", - "id": "9fdee73b-a79a-461b-9298-053e4523c41d", + "id": "f221d306-9438-4c1f-a59b-ae0b99b5aed5", "metadata": {}, "source": [ "### 20th Percentile Speeds by Segment" @@ -206,19 +209,19 @@ { "cell_type": "code", "execution_count": null, - "id": "876ffe14-cc3f-4257-be00-b06ef8363a16", + "id": "12082834-75ee-4715-8e7d-9150d2c8b129", "metadata": {}, "outputs": [], "source": [ "%%capture\n", - "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, analysis_date=ANALYSIS_DATE,\n", - " time_of_day='Midday', map_type='new_speedmap')" + "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, org_shapes=org_shapes,\n", + " analysis_date=ANALYSIS_DATE, time_of_day='Midday', map_type='new_speedmap')" ] }, { "cell_type": "code", "execution_count": null, - "id": "d6858d75-4d44-4ab2-8c44-7f5f91149083", + "id": "cb777a85-5704-4d66-badb-08756e9a317c", "metadata": {}, "outputs": [], "source": [ @@ -228,7 +231,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a1e92ff3-cbe6-45ca-b063-97807caf21c5", + "id": "5171f750-6013-4ca8-bc2f-2bd7678e554f", "metadata": {}, "outputs": [], "source": [ @@ -237,7 +240,7 @@ }, { "cell_type": "markdown", - "id": "296f23f8-026d-4a98-9ce1-43ec2c048b2e", + "id": "816af03a-c7c5-405c-bfbb-1314943d6121", "metadata": {}, "source": [ "### Variation in Speeds by Segment\n", @@ -249,19 +252,19 @@ { "cell_type": "code", "execution_count": null, - "id": "31d820ac-0242-47f0-9968-07f4b7122313", + "id": "300161cd-a92a-4260-8ccf-84c5797e6ec6", "metadata": {}, "outputs": [], "source": [ "%%capture\n", - "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, analysis_date=ANALYSIS_DATE,\n", - " time_of_day='Midday', map_type='new_speed_variation')" + "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, org_shapes=org_shapes,\n", + " analysis_date=ANALYSIS_DATE, time_of_day='Midday', map_type='new_speed_variation')" ] }, { "cell_type": "code", "execution_count": null, - "id": "ba8f1e35-3503-41d7-a5ad-60606267cdab", + "id": "71145071-573a-4c97-9d5d-ac19e43b5a97", "metadata": {}, "outputs": [], "source": [ @@ -271,7 +274,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2633b5c9-3510-4690-8b7b-9abbff45b8e0", + "id": "bd852a1e-0cc8-4e6d-acf0-e38b35609deb", "metadata": {}, "outputs": [], "source": [ @@ -280,7 +283,7 @@ }, { "cell_type": "markdown", - "id": "7f5c3087-8fe4-47fc-bccd-d1eb2f8e092e", + "id": "ac317854-05fe-4a96-84b3-664ebffe083d", "metadata": { "tags": [] }, @@ -290,7 +293,7 @@ }, { "cell_type": "markdown", - "id": "15ced50f-7135-4807-a01f-b9768256b27b", + "id": "bd10bcf2-e91f-475f-a7bb-ea29ed1b8eb6", "metadata": {}, "source": [ "### 20th Percentile Speeds by Segment" @@ -299,19 +302,19 @@ { "cell_type": "code", "execution_count": null, - "id": "b341b050-4fa9-4f25-a276-886b3c62a586", + "id": "11cf5818-f909-4d56-b358-b48f29ed256f", "metadata": {}, "outputs": [], "source": [ "%%capture\n", - "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, analysis_date=ANALYSIS_DATE,\n", - " time_of_day='PM Peak', map_type='new_speedmap')" + "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, org_shapes=org_shapes,\n", + " analysis_date=ANALYSIS_DATE, time_of_day='PM Peak', map_type='new_speedmap')" ] }, { "cell_type": "code", "execution_count": null, - "id": "d4cf9996-0239-4cb4-92c5-ed04d57a7b4c", + "id": "c86ef14d-0528-4cb4-a347-55607f547159", "metadata": {}, "outputs": [], "source": [ @@ -321,7 +324,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c6ea5f19-d416-4bf5-ab9b-3199af92ed90", + "id": "db6634b3-a794-47a4-a4e2-6a875aea1a0c", "metadata": {}, "outputs": [], "source": [ @@ -330,7 +333,7 @@ }, { "cell_type": "markdown", - "id": "19324dd0-38e2-44b6-9552-2c67f44ffa4a", + "id": "4ebb8a11-b214-4a0e-bd24-f29863d7832b", "metadata": {}, "source": [ "### Variation in Speeds by Segment\n", @@ -342,19 +345,19 @@ { "cell_type": "code", "execution_count": null, - "id": "eb50554c-cb63-464d-9d0f-ed722d24f422", + "id": "6e6f502e-7a81-4582-8a70-7c20c0f04bdf", "metadata": {}, "outputs": [], "source": [ "%%capture\n", - "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, analysis_date=ANALYSIS_DATE,\n", - " time_of_day='PM Peak', map_type='new_speed_variation')" + "link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, org_shapes=org_shapes,\n", + " analysis_date=ANALYSIS_DATE, time_of_day='PM Peak', map_type='new_speed_variation')" ] }, { "cell_type": "code", "execution_count": null, - "id": "b11b79c6-d87d-4563-9cd9-83a5a7294db6", + "id": "7ebde3a1-a6ab-4c23-9105-9b163c47fb0f", "metadata": {}, "outputs": [], "source": [ @@ -364,7 +367,7 @@ { "cell_type": "code", "execution_count": null, - "id": "37190c5b-5943-4172-9a91-892bf36c7a2b", + "id": "7ed2bb7c-dd0e-4aeb-8ebe-2ff9835f6fbb", "metadata": {}, "outputs": [], "source": [ @@ -373,7 +376,7 @@ }, { "cell_type": "markdown", - "id": "73f4bc99-f78f-4f37-b050-5f12cbe4ca7a", + "id": "749a63f1-35d5-4f5e-bc44-871943868e71", "metadata": { "tags": [] }, @@ -386,7 +389,7 @@ { "cell_type": "code", "execution_count": null, - "id": "40979f68-b80b-4879-8892-3271a74efc8b", + "id": "52ef19f8-4078-4cbd-8049-a01963eb4d06", "metadata": {}, "outputs": [], "source": [ @@ -395,7 +398,7 @@ }, { "cell_type": "markdown", - "id": "5dadca19-df7a-4fc8-8955-210b51f4b1c4", + "id": "70846ffd-28d6-4042-80bc-a79d3959a26e", "metadata": {}, "source": [ "## Additional Time Periods\n", @@ -410,16 +413,16 @@ { "cell_type": "code", "execution_count": null, - "id": "05570269-2c18-4d49-b879-b3466e735838", + "id": "6bea466f-f2fb-44b4-a26f-44bcf20abe7a", "metadata": {}, "outputs": [], "source": [ "for time_period in [period for period in speedmap_segs.time_of_day.unique() if period not in ['AM Peak', 'Midday', 'PM Peak']]:\n", - " link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, analysis_date=ANALYSIS_DATE,\n", - " time_of_day=time_period, map_type='new_speedmap')\n", + " link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, org_shapes=org_shapes,\n", + " analysis_date=ANALYSIS_DATE, time_of_day=time_period, map_type='new_speedmap')\n", " speedmap_utils.render_spa_link(link, text=f\"{time_period} Speeds\")\n", - " link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, analysis_date=ANALYSIS_DATE,\n", - " time_of_day=time_period, map_type='new_speed_variation')\n", + " link = speedmap_utils.map_time_period(district_gdf=this_shn, speedmap_segs=speedmap_segs, org_shapes=org_shapes,\n", + " analysis_date=ANALYSIS_DATE, time_of_day=time_period, map_type='new_speed_variation')\n", " speedmap_utils.render_spa_link(link, text=f\"{time_period} Speed Variation\")" ] } @@ -440,7 +443,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.6" + "version": "3.9.13" }, "widgets": { "application/vnd.jupyter.widget-state+json": { diff --git a/ca_transit_speed_maps/speedmap_utils.py b/ca_transit_speed_maps/speedmap_utils.py index 37a9dc20e..bcc63995f 100644 --- a/ca_transit_speed_maps/speedmap_utils.py +++ b/ca_transit_speed_maps/speedmap_utils.py @@ -4,6 +4,7 @@ import geopandas as gpd import update_vars_index from shared_utils import rt_utils, catalog_utils +from segment_speed_utils import helpers from calitp_data_analysis.geography_utils import CA_NAD83Albers import datetime as dt import altair as alt @@ -24,6 +25,16 @@ def read_segments_shn(organization_source_record_id: str) -> (gpd.GeoDataFrame, return (speedmap_segs, this_shn) +def read_shapes(speedmap_segs: gpd.GeoDataFrame): + + shapes = helpers.import_scheduled_shapes(update_vars_index.ANALYSIS_DATE, columns=['shape_array_key', 'geometry']) + trips = helpers.import_scheduled_trips(update_vars_index.ANALYSIS_DATE, columns=['shape_array_key', 'shape_id', 'route_id', + 'route_short_name', 'gtfs_dataset_key']).drop_duplicates() + shapes = shapes.merge(trips, on='shape_array_key') + org_shapes = shapes.merge(speedmap_segs[['schedule_gtfs_dataset_key']].drop_duplicates(), + on='schedule_gtfs_dataset_key') + return org_shapes + def prepare_segment_gdf(gdf: gpd.GeoDataFrame) -> gpd.GeoDataFrame: ''' Project segment speeds gdf and add column for rich speedmap display @@ -67,8 +78,31 @@ def map_shn(district_gdf: gpd.GeoDataFrame): spa_map_state = export_result['state_dict'] return spa_map_state -def map_time_period(district_gdf: gpd.GeoDataFrame, speedmap_segs: gpd.GeoDataFrame, analysis_date: dt.date, - time_of_day: str, map_type: str): +def map_excluded_shapes(existing_state: dict, speedmap_segs: gpd.GeoDataFrame, shapes_gdf: gpd.GeoDataFrame, + time_of_day: str, analysis_date: dt.date): + ''' + + ''' + display_date = analysis_date.strftime('%B %d %Y (%A)') + filename = f"{analysis_date}_{speedmap_segs.organization_source_record_id.iloc[0]}_excluded_shapes_{time_of_day}" + title = f"{speedmap_segs.organization_name.iloc[0]} {display_date} Excluded Shapes {time_of_day}" + + shapes_gdf = shapes_gdf[['shape_id', 'route_id', 'route_short_name', 'geometry']] + speedmap_segs = speedmap_segs.dissolve() + speedmap_segs.geometry = speedmap_segs.buffer(35) # slightly bigger than parallel_offset in rt_utils + excluded_shapes = shapes_gdf.overlay(speedmap_segs, how='difference') + excluded_shapes['color'] = [(50,50,50) for _ in excluded_shapes.iterrows()] # make it dark gray! + excluded_shapes['info'] = "No data in time period" + excluded_shapes.geometry = excluded_shapes.buffer(10) # for display + + export_result = rt_utils.set_state_export(excluded_shapes, subfolder = update_vars_index.GEOJSON_SUBFOLDER, filename = filename, + map_title = title, existing_state = existing_state) + + return export_result['state_dict'] + + +def map_time_period(district_gdf: gpd.GeoDataFrame, speedmap_segs: gpd.GeoDataFrame, org_shapes: gpd.GeoDataFrame, + analysis_date: dt.date, time_of_day: str, map_type: str): ''' Always add State Highway Network first. ''' @@ -78,6 +112,9 @@ def map_time_period(district_gdf: gpd.GeoDataFrame, speedmap_segs: gpd.GeoDataFr return None color_col = {'new_speedmap': 'p20_mph', 'new_speed_variation': 'fast_slow_ratio'}[map_type] shn_state = map_shn(district_gdf) + excluded_shapes_state = map_excluded_shapes(shn_state, speedmap_segs, org_shapes, + time_of_day, analysis_date) + display_date = analysis_date.strftime('%B %d %Y (%A)') filename = f"{analysis_date}_{speedmap_segs.organization_source_record_id.iloc[0]}_{map_type}_{time_of_day}" title = f"{speedmap_segs.organization_name.iloc[0]} {display_date} {time_of_day}" @@ -94,7 +131,7 @@ def map_time_period(district_gdf: gpd.GeoDataFrame, speedmap_segs: gpd.GeoDataFr map_type=map_type, color_col=color_col, cmap=cmap, legend_url=legend_url, map_title=title, - existing_state = shn_state) + existing_state = excluded_shapes_state) spa_link = export_result['spa_link'] return spa_link diff --git a/gtfs_funnel/logs/vp_preprocessing.log b/gtfs_funnel/logs/vp_preprocessing.log index 515355694..99b025e1f 100644 --- a/gtfs_funnel/logs/vp_preprocessing.log +++ b/gtfs_funnel/logs/vp_preprocessing.log @@ -314,3 +314,12 @@ 2025-01-20 20:45:06.455 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:28.449333 2025-01-20 20:58:21.900 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:27.450257 2025-01-20 21:06:38.791 | INFO | __main__:pare_down_to_valid_trips:94 - export vp direction: 0:08:16.891594 +2025-01-20 21:43:35.817 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:56.099553 +2025-01-20 22:19:14.276 | INFO | __main__:pare_down_to_valid_trips:88 - pare down vp: 0:02:55.161167 +2025-01-20 22:27:27.465 | INFO | __main__:pare_down_to_valid_trips:94 - export vp direction: 0:08:13.188856 +2025-01-20 22:29:11.131 | INFO | __main__:merge_in_vp_direction:143 - 2025-01-15: export usable vp with direction: 0:01:35.266091 +2025-01-20 22:29:11.360 | INFO | __main__::215 - 2025-01-15: pare down vp, add direction execution time: 0:12:52.244708 +2025-01-20 22:34:09.150 | INFO | __main__::216 - compute dwell df: 0:04:20.527838 +2025-01-20 22:35:38.339 | INFO | __main__::241 - merge with original and export: 0:01:29.188729 +2025-01-20 22:35:38.340 | INFO | __main__::242 - vp with dwell time 2025-01-15: 0:05:49.716567 +2025-01-20 22:42:17.477 | INFO | __main__::80 - 2025-01-15: condense vp for trip 0:06:20.345485 diff --git a/gtfs_funnel/published_operators.yml b/gtfs_funnel/published_operators.yml index 2e6df4267..dc02c2e34 100644 --- a/gtfs_funnel/published_operators.yml +++ b/gtfs_funnel/published_operators.yml @@ -1,17 +1,19 @@ -2024-10-16: +2024-12-11: - Alhambra Schedule - Amador Schedule + - Amtrak Schedule - Anaheim Resort Schedule - Antelope Valley Transit Authority Schedule - Arcadia Schedule + - Artesia Schedule - Arvin Schedule - Auburn Schedule - B-Line Schedule - Baldwin Park Schedule - Banning Pass Schedule + - Basin Transit GMV Schedule - Bay Area 511 AC Transit Schedule - Bay Area 511 ACE Schedule - - Bay Area 511 Angel Island-Tiburon Ferry Schedule - Bay Area 511 BART Schedule - Bay Area 511 Caltrain Schedule - Bay Area 511 Capitol Corridor Schedule @@ -25,8 +27,10 @@ - Bay Area 511 MVGO Schedule - Bay Area 511 Marin Schedule - Bay Area 511 Mission Bay Schedule + - Bay Area 511 Mountain View Community Shuttle Schedule - Bay Area 511 Muni Schedule - Bay Area 511 Petaluma Schedule + - Bay Area 511 PresidiGo Schedule - Bay Area 511 Rio Vista Delta Breeze Schedule - Bay Area 511 SFO AirTrain Schedule - Bay Area 511 SamTrans Schedule @@ -46,7 +50,7 @@ - Bay Area 511 WestCAT Schedule - Beach Cities GMV Schedule - Bear Schedule - - Beaumont Pass Schedule + - Beaumont Transit Schedule - Bell Gardens Schedule - Bellflower Bus Schedule - Big Blue Bus Schedule @@ -68,6 +72,7 @@ - Delano Schedule - Desert Roadrunner GMV Schedule - Desert Roadrunner Schedule + - DowneyLink Avail Schedule - Eastern Sierra Schedule - El Dorado Schedule - El Monte Schedule @@ -76,9 +81,10 @@ - Foothill Schedule - Fresno County Schedule - Fresno Schedule + - G Trans Schedule - GET Schedule - Get Around Town Express Schedule - - Glendora Schedule + - Glendale Schedule - Glenn Schedule - Go West Schedule - Grapeline Schedule @@ -111,7 +117,6 @@ - MV Shuttle Schedule - Madera County Connection Schedule - Madera Metro Schedule - - Mariposa Grove Shuttle Schedule - Maywood Schedule - Mendocino Schedule - Merced GMV Schedule @@ -134,7 +139,6 @@ - Pasadena Schedule - Placer Schedule - Plumas Schedule - - PresidiGo Schedule - Redding Schedule - Redwood Coast Schedule - Riverside Schedule @@ -147,7 +151,6 @@ - SLORTA Schedule - Sacramento Schedule - Sage Stage Schedule - - San Clemente Trolley Schedule - San Diego Schedule - San Fernando Schedule - San Joaquin Schedule @@ -186,11 +189,18 @@ - Yosemite Valley Shuttle Schedule - Yuba-Sutter Schedule - Yuma Schedule + - Yurok Schedule - eTrans Schedule +2024-11-13: + - Glendora Schedule + - Mariposa Grove Shuttle Schedule + - San Clemente Trolley Schedule +2024-10-16: + - Bay Area 511 Angel Island-Tiburon Ferry Schedule + - Beaumont Pass Schedule + - PresidiGo Schedule 2024-09-18: - DowneyLINK GMV Schedule - - G Trans Schedule - - Glendale Schedule 2024-06-12: - Anteater Express Schedule - Lynwood Schedule @@ -206,7 +216,6 @@ - DowneyLINK Schedule - Spirit Bus Schedule 2023-11-15: - - Amtrak Schedule - Mission Bay Schedule 2023-08-15: - Blossom Express Schedule diff --git a/gtfs_funnel/vp_keep_usable.py b/gtfs_funnel/vp_keep_usable.py index 35bba1116..e0036a9c1 100644 --- a/gtfs_funnel/vp_keep_usable.py +++ b/gtfs_funnel/vp_keep_usable.py @@ -179,7 +179,7 @@ def get_vp_direction_column( vp_condensed = vp_condensed.assign( vp_primary_direction = vp_direction_series - )[keep_cols].explode(columns=keep_cols) + )[keep_cols].explode(column=keep_cols) vp_condensed.to_parquet( f"{SEGMENT_GCS}vp_direction_{analysis_date}.parquet" diff --git a/rt_segment_speeds/44_excluded_shapes.ipynb b/rt_segment_speeds/44_excluded_shapes.ipynb index 4d82bcc15..079e6397f 100644 --- a/rt_segment_speeds/44_excluded_shapes.ipynb +++ b/rt_segment_speeds/44_excluded_shapes.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "d528f399-cf33-459e-b5dc-92e0b4ae389a", "metadata": {}, "outputs": [], @@ -12,14 +12,25 @@ "from siuba import *\n", "import shared_utils\n", "\n", - "from calitp_data_analysis import get_fs\n", + "from calitp_data_analysis import get_fs, geography_utils\n", "from segment_speed_utils import helpers, time_series_utils, gtfs_schedule_wrangling\n", "from segment_speed_utils.project_vars import SCHED_GCS, SEGMENT_GCS, GTFS_DATA_DICT, analysis_date" ] }, + { + "cell_type": "markdown", + "id": "83bf87cf-a9f5-4acd-afa6-d0d8920f4a73", + "metadata": {}, + "source": [ + "# Scratchpad for displaying excluded shapes on speedmaps\n", + "\n", + "* implemented via `ca_transit_speedmaps/speedmap_utils.py` for now\n", + "* TODO: more systematic/clarify cause as speed data gap or shape not running in time period" + ] + }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "6cd318e5-5c4e-4249-b158-232f4d940770", "metadata": {}, "outputs": [], @@ -29,323 +40,78 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "6e86c1a8-d3de-4fc6-9478-c03133b6745c", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'dir': '${gcs_paths.SEGMENT_GCS}', 'stage1': '${speeds_tables.vp_dwell}', 'proxy_stop_times': 'stop_time_expansion/speedmap_stop_times', 'stage2': 'nearest/nearest_vp_speedmap_proxy', 'stage3': 'speedmap/stop_arrivals_proxy', 'stage3b': 'speedmap/stop_arrivals', 'stage4': 'speedmap/speeds', 'trip_stop_cols': ['trip_instance_key', 'stop_sequence', 'stop_sequence1'], 'shape_stop_cols': ['shape_array_key', 'shape_id'], 'stop_pair_cols': ['stop_pair', 'stop_pair_name', 'segment_id'], 'route_dir_cols': ['route_id', 'direction_id'], 'segments_file': 'segment_options/speedmap_segments', 'shape_stop_single_segment': 'rollup_singleday/speeds_shape_speedmap_segments', 'shape_stop_single_segment_detail': 'rollup_singleday/speeds_shape_speedmap_segments_detail', 'excluded_shapes_by_time_of_day': 'rollup_singleday/excluded_shapes_by_time_of_day', 'route_dir_single_segment': 'rollup_singleday/speeds_route_dir_speedmap_segments', 'route_dir_multi_segment': 'rollup_multiday/speeds_route_dir_speedmap_segments', 'min_trip_minutes': '${speed_vars.time_min_cutoff}', 'max_trip_minutes': 180, 'max_speed': '${speed_vars.max_speed}', 'min_meters_elapsed': 1609, 'segment_meters': 1000}" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "catalog.speedmap_segments" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "f766b50a-c70d-4681-992c-d7f8979ada69", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'2024-12-11'" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "analysis_date" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "82598ccf-876a-4ab2-959c-7af1b120e1e5", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\u001b[0;31mSignature:\u001b[0m\n", - "\u001b[0mhelpers\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mimport_scheduled_shapes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0manalysis_date\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mfilters\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtuple\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mcolumns\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mlist\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'shape_array_key'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'geometry'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mget_pandas\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mbool\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mcrs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'EPSG:3310'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mUnion\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mgeopandas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgeodataframe\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mGeoDataFrame\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdask_geopandas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mGeoDataFrame\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mDocstring:\u001b[0m Import shapes.\n", - "\u001b[0;31mFile:\u001b[0m ~/data-analyses/rt_segment_speeds/segment_speed_utils/helpers.py\n", - "\u001b[0;31mType:\u001b[0m function" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "helpers.import_scheduled_shapes?" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "d2e5a320-d728-49c6-99e6-a1af00c7a37c", "metadata": {}, "outputs": [], "source": [ - "shapes = helpers.import_scheduled_shapes(analysis_date)" + "shapes = helpers.import_scheduled_shapes(analysis_date, columns=['shape_array_key', 'geometry'])" ] }, { "cell_type": "code", - "execution_count": 9, - "id": "756f4b22-e55f-40d8-ac5b-b4f493787ac2", + "execution_count": null, + "id": "2a652a6d-bf87-4f6c-a6ba-ab65d7bd029f", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\u001b[0;31mSignature:\u001b[0m\n", - "\u001b[0mhelpers\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mimport_scheduled_trips\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0manalysis_date\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mfilters\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtuple\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mcolumns\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mlist\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'gtfs_dataset_key'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'name'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'trip_id'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'shape_id'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'shape_array_key'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'route_id'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'route_key'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'direction_id'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'route_short_name'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mget_pandas\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mbool\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mUnion\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mpandas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mframe\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdask\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdataframe\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mDocstring:\u001b[0m\n", - "Get scheduled trips info (all operators) for single day, \n", - "and keep subset of columns.\n", - "\u001b[0;31mFile:\u001b[0m ~/data-analyses/rt_segment_speeds/segment_speed_utils/helpers.py\n", - "\u001b[0;31mType:\u001b[0m function" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ - "helpers.import_scheduled_trips?" + "trips = helpers.import_scheduled_trips(analysis_date, columns=['shape_array_key', 'shape_id', 'route_id',\n", + " 'route_short_name', 'gtfs_dataset_key']).drop_duplicates()" ] }, { "cell_type": "code", - "execution_count": 13, - "id": "2a652a6d-bf87-4f6c-a6ba-ab65d7bd029f", + "execution_count": null, + "id": "82e1e9ee-78b1-4c32-9adb-be8b8b9639f6", "metadata": {}, "outputs": [], "source": [ - "trips = helpers.import_scheduled_trips(analysis_date, columns=['shape_array_key', 'shape_id', 'route_id',\n", - " 'route_short_name', 'gtfs_dataset_key']).drop_duplicates()" + "shapes = shapes.merge(trips, on='shape_array_key')" ] }, { "cell_type": "code", - "execution_count": 14, - "id": "82e1e9ee-78b1-4c32-9adb-be8b8b9639f6", + "execution_count": null, + "id": "756f4b22-e55f-40d8-ac5b-b4f493787ac2", "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", - "
shape_array_keygeometryshape_idroute_idroute_short_nameschedule_gtfs_dataset_key
013cb51c5ed7990a71a227d7d096426b9LINESTRING (294120.912 -448955.567, 294061.160...p_14325253551ebc783bace70899492d6206c352547d6
1229051b21f5e16ec5841ecabf98a12c7LINESTRING (-78208.700 215570.571, -77955.213 ...p_1426803126None96a5b8c5bc22b3936ddee01cac7b5fb6
2f08b835c09fe1d9e38199ad09c9327d8LINESTRING (91775.849 -41429.921, 91784.599 -4...p_143592076755Nonecb8a465cffec67c8fd90f31b389ed4c3
36be599a186ee46f51fe77bb0bc0ffc50LINESTRING (-118608.801 41853.097, -118632.536...837734311363029a23cb0e73f2a5d98a345c5e2e40
43c2b4b3de0eef26767c626504e7a839eLINESTRING (-210809.438 -23394.433, -210787.18...1540061154154aea4108997c66a74fbdae27b34b69fde
.....................
7564f90c7ca85f79cec1cf718ffe3a5ea804LINESTRING (173733.400 -444977.431, 173388.307...8577_shp50None84d3c3507a4c8df851d935b63908bbd5
75654e41a760292c44d8c07b5e187903d3cbLINESTRING (169600.675 -449977.512, 169620.127...8582_shp30None84d3c3507a4c8df851d935b63908bbd5
75668bf6f14bb04f53e24929661cf9aee280LINESTRING (176938.852 -444188.785, 176853.905...8659_shp10None84d3c3507a4c8df851d935b63908bbd5
75677ed83def41f1f965236ca51c4e059d5bLINESTRING (168680.735 -437987.848, 168658.352...8656_shp10None84d3c3507a4c8df851d935b63908bbd5
7568565c495078a145e5e9e8aedf2d3c8a02LINESTRING (177015.581 -444190.563, 177062.596...8724_shp60None84d3c3507a4c8df851d935b63908bbd5
\n", - "

7569 rows × 6 columns

\n", - "
" - ], - "text/plain": [ - " shape_array_key \\\n", - "0 13cb51c5ed7990a71a227d7d096426b9 \n", - "1 229051b21f5e16ec5841ecabf98a12c7 \n", - "2 f08b835c09fe1d9e38199ad09c9327d8 \n", - "3 6be599a186ee46f51fe77bb0bc0ffc50 \n", - "4 3c2b4b3de0eef26767c626504e7a839e \n", - "... ... \n", - "7564 f90c7ca85f79cec1cf718ffe3a5ea804 \n", - "7565 4e41a760292c44d8c07b5e187903d3cb \n", - "7566 8bf6f14bb04f53e24929661cf9aee280 \n", - "7567 7ed83def41f1f965236ca51c4e059d5b \n", - "7568 565c495078a145e5e9e8aedf2d3c8a02 \n", - "\n", - " geometry shape_id route_id \\\n", - "0 LINESTRING (294120.912 -448955.567, 294061.160... p_1432525 355 \n", - "1 LINESTRING (-78208.700 215570.571, -77955.213 ... p_1426803 126 \n", - "2 LINESTRING (91775.849 -41429.921, 91784.599 -4... p_1435920 76755 \n", - "3 LINESTRING (-118608.801 41853.097, -118632.536... 8377 3431 \n", - "4 LINESTRING (-210809.438 -23394.433, -210787.18... 1540061 154 \n", - "... ... ... ... \n", - "7564 LINESTRING (173733.400 -444977.431, 173388.307... 8577_shp 50 \n", - "7565 LINESTRING (169600.675 -449977.512, 169620.127... 8582_shp 30 \n", - "7566 LINESTRING (176938.852 -444188.785, 176853.905... 8659_shp 10 \n", - "7567 LINESTRING (168680.735 -437987.848, 168658.352... 8656_shp 10 \n", - "7568 LINESTRING (177015.581 -444190.563, 177062.596... 8724_shp 60 \n", - "\n", - " route_short_name schedule_gtfs_dataset_key \n", - "0 1 ebc783bace70899492d6206c352547d6 \n", - "1 None 96a5b8c5bc22b3936ddee01cac7b5fb6 \n", - "2 None cb8a465cffec67c8fd90f31b389ed4c3 \n", - "3 13 63029a23cb0e73f2a5d98a345c5e2e40 \n", - "4 154 aea4108997c66a74fbdae27b34b69fde \n", - "... ... ... \n", - "7564 None 84d3c3507a4c8df851d935b63908bbd5 \n", - "7565 None 84d3c3507a4c8df851d935b63908bbd5 \n", - "7566 None 84d3c3507a4c8df851d935b63908bbd5 \n", - "7567 None 84d3c3507a4c8df851d935b63908bbd5 \n", - "7568 None 84d3c3507a4c8df851d935b63908bbd5 \n", - "\n", - "[7569 rows x 6 columns]" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "shapes.merge(trips, on='shape_array_key')" + "helpers.import_scheduled_trips?" ] }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "id": "baa0be3a-5171-4915-92a9-b83f6bd1485e", "metadata": {}, "outputs": [], @@ -355,28 +121,17 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "id": "e340a558-84ca-4d23-8758-983169f58ad3", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'gs://calitp-analytics-data/data-analyses/rt_segment_speeds/rollup_singleday/speeds_shape_speedmap_segments_detail_2024-12-11.parquet'" - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "path" ] }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "id": "98022a2b-46c2-46ab-b4f0-774235b81663", "metadata": {}, "outputs": [], @@ -386,46 +141,139 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": null, "id": "2f572c39-8380-460a-a013-f23129d3c3bb", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Index(['schedule_gtfs_dataset_key', 'shape_array_key', 'shape_id', 'route_id',\n", - " 'direction_id', 'stop_pair', 'stop_pair_name', 'segment_id',\n", - " 'time_of_day', 'p50_mph', 'n_trips', 'p20_mph', 'p80_mph', 'name',\n", - " 'caltrans_district', 'organization_source_record_id',\n", - " 'organization_name', 'base64_url', 'geometry', 'n_trips_sch',\n", - " 'trips_hr_sch', 'route_short_name'],\n", - " dtype='object')" - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "gdf.columns" ] }, { - "cell_type": "markdown", - "id": "68892471-46c0-4142-9e4f-ae6fdda2ad34", + "cell_type": "code", + "execution_count": null, + "id": "598ce854-dbfa-4a75-9002-ff284f1b6bdf", + "metadata": {}, + "outputs": [], + "source": [ + "pd.read_parquet('../ca_transit_speed_maps/_rt_progress_2024-12-11.parquet').query('name.str.contains(\"Muni\")')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "765c2082-8362-4719-b8f7-2760564426aa", + "metadata": {}, + "outputs": [], + "source": [ + "sf_speeds = gdf.query('organization_source_record_id == \"rechaapWbeffO33OX\"')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f4e3cb12-fc35-45a1-819c-c8edd7c147da", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "sf_speeds" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "65df0527-dff2-4170-84e2-33f57d6b6ac2", + "metadata": {}, + "outputs": [], + "source": [ + "sf_shapes = shapes.query('schedule_gtfs_dataset_key == \"7cc0cb1871dfd558f11a2885c145d144\"')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c6710343-3567-4e68-8f5d-df221cf30d23", + "metadata": {}, + "outputs": [], + "source": [ + "sf_shapes" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f4365b44-c3ae-4cfc-959c-6e6d03a1e11f", + "metadata": {}, + "outputs": [], + "source": [ + "sf_am = sf_speeds.query('time_of_day == \"AM Peak\"')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "71d26c00-ead6-4fbe-a159-b21ddecf35a9", "metadata": {}, + "outputs": [], "source": [ - "could presumably iterate over `schedule_gtfs_dataset_key` and append to one gdf to have one file..." + "sf_am = sf_am.to_crs(geography_utils.CA_NAD83Albers)" ] }, { "cell_type": "code", "execution_count": null, - "id": "d89e67be-79df-4b0b-b316-641dd34d7154", + "id": "4a23deac-7ce0-4703-86c4-b7008a91dc9a", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "## shift to right side of road to display direction\n", + "sf_am.geometry = sf_am.geometry.apply(shared_utils.rt_utils.try_parallel)\n", + "sf_am = sf_am.apply(shared_utils.rt_utils.arrowize_by_frequency, axis=1, frequency_col='trips_hr_sch')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7fdf4b78-f5e9-4bdf-a9eb-f33696b03aff", + "metadata": {}, + "outputs": [], + "source": [ + "sf_am = sf_am.dissolve()\n", + "\n", + "sf_am.geometry = sf_am.buffer(35)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7d68511b-1eb0-494c-ba12-bc9d8f187e78", + "metadata": {}, + "outputs": [], + "source": [ + "sf_am.explore()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d53eaf2e-7cdb-483c-9f40-c9d0304f4d7d", + "metadata": {}, + "outputs": [], + "source": [ + "gdf = sf_shapes.overlay(sf_am, how='difference')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ec1bbcee-b29b-431b-9552-1c9d97207053", + "metadata": {}, + "outputs": [], + "source": [ + "gdf.explore()" + ] } ], "metadata": { From 7376280ddf5b8bac373c78c09d2ec34f546aa7e7 Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Tue, 21 Jan 2025 20:14:18 +0000 Subject: [PATCH 10/17] clarify speedmaps change --- ca_transit_speed_maps/01_new_speedmaps.ipynb | 3 ++- ca_transit_speed_maps/README.md | 2 ++ ca_transit_speed_maps/speedmap_utils.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ca_transit_speed_maps/01_new_speedmaps.ipynb b/ca_transit_speed_maps/01_new_speedmaps.ipynb index a8271b243..1445e2c51 100644 --- a/ca_transit_speed_maps/01_new_speedmaps.ipynb +++ b/ca_transit_speed_maps/01_new_speedmaps.ipynb @@ -92,7 +92,8 @@ "* Route segments are arrow-shaped to indicate direction of travel. Thicker segments indicate more frequent transit routes.\n", "* State Highway Network routes are outlined in gray.\n", "* Hover over, a segment with your mouse to see the exact speed, route name, and transit service frequency in that segment. \n", - " * Higher-frequency routes (3+ trips per hour) are especially important, since those slowdowns correspond to more vehicles, and riders, delayed in traffic." + " * Higher-frequency routes (3+ trips per hour) are especially important, since those slowdowns correspond to more vehicles, and riders, delayed in traffic.\n", + "* Route segments with no data are now shown as thin, dark gray or black segments. These may be due to the route not running at that time of day, or a data availability or processing issue." ] }, { diff --git a/ca_transit_speed_maps/README.md b/ca_transit_speed_maps/README.md index dbca276c6..20e7626c2 100644 --- a/ca_transit_speed_maps/README.md +++ b/ca_transit_speed_maps/README.md @@ -45,6 +45,8 @@ We're aligining with segment speeds published via the [open data portal!](https: While the datasets don't fully match just yet, this site is now based on the same underlying data. This should help us update it more often, enhance accuracy for complex route shapes, and include as many transit operators as possible. The site also includes a more informative speed and variation by time of day chart at the bottom of the page. + +Route segments with no data are now shown as thin, dark gray or black segments on the maps. These may be due to the route not running at that time of day, or a data availability or processing issue. ## Data Sources Archived GTFS-Realtime Vehicle Positions data, plus corresponding GTFS Schedule data. diff --git a/ca_transit_speed_maps/speedmap_utils.py b/ca_transit_speed_maps/speedmap_utils.py index bcc63995f..6a3ecaf87 100644 --- a/ca_transit_speed_maps/speedmap_utils.py +++ b/ca_transit_speed_maps/speedmap_utils.py @@ -93,7 +93,7 @@ def map_excluded_shapes(existing_state: dict, speedmap_segs: gpd.GeoDataFrame, s excluded_shapes = shapes_gdf.overlay(speedmap_segs, how='difference') excluded_shapes['color'] = [(50,50,50) for _ in excluded_shapes.iterrows()] # make it dark gray! excluded_shapes['info'] = "No data in time period" - excluded_shapes.geometry = excluded_shapes.buffer(10) # for display + excluded_shapes.geometry = excluded_shapes.buffer(8) # for display export_result = rt_utils.set_state_export(excluded_shapes, subfolder = update_vars_index.GEOJSON_SUBFOLDER, filename = filename, map_title = title, existing_state = existing_state) From 9cb4a39bf574301721b659005e0b72e1e58a130c Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Wed, 22 Jan 2025 01:21:00 +0000 Subject: [PATCH 11/17] re-add stop_meters to export for stage2 --- rt_segment_speeds/scripts/nearest_vp_to_stop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rt_segment_speeds/scripts/nearest_vp_to_stop.py b/rt_segment_speeds/scripts/nearest_vp_to_stop.py index 6e64d0a3f..f3ae2a8c0 100644 --- a/rt_segment_speeds/scripts/nearest_vp_to_stop.py +++ b/rt_segment_speeds/scripts/nearest_vp_to_stop.py @@ -171,7 +171,7 @@ def nearest_neighbor_for_stop( gdf.stop_meters ) - gdf = gdf[trip_stop_cols + ["shape_array_key"]] + gdf = gdf[trip_stop_cols + ["shape_array_key", "stop_meters"]] gdf = gdf.assign( prior_vp_idx = vp_before, From fcf7a13e4bd2ee460c5bc91de562a8a365a3f259 Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Wed, 22 Jan 2025 17:44:19 +0000 Subject: [PATCH 12/17] finish running pipeline with fixes, reset makefiles --- gtfs_funnel/Makefile | 6 +++--- high_quality_transit_areas/Makefile | 8 ++++---- .../logs/hqta_processing.log | 12 +++++++++++ high_quality_transit_areas/update_vars.py | 2 +- .../logs/rt_v_scheduled_route_metrics.log | 1 + .../logs/rt_v_scheduled_trip_metrics.log | 3 +++ rt_scheduled_v_ran/scripts/update_vars.py | 4 ++-- rt_segment_speeds/logs/avg_speeds.log | 6 ++++++ rt_segment_speeds/logs/cut_stop_segments.log | 2 ++ .../logs/interpolate_stop_arrival.log | 3 +++ rt_segment_speeds/logs/nearest_vp.log | 4 ++++ .../logs/speeds_by_segment_trip.log | 3 +++ .../scripts/average_segment_speeds.py | 20 ++++--------------- .../segment_speed_utils/project_vars.py | 6 +++--- 14 files changed, 51 insertions(+), 29 deletions(-) diff --git a/gtfs_funnel/Makefile b/gtfs_funnel/Makefile index ef48ef920..a46d17b70 100644 --- a/gtfs_funnel/Makefile +++ b/gtfs_funnel/Makefile @@ -38,8 +38,8 @@ monthly_scheduled_data: python concatenate_monthly_scheduled_service.py funnel_gtfs_single_day: -# make download_gtfs_data -# make preprocess_schedule_vp_dependency + make download_gtfs_data + make preprocess_schedule_vp_dependency make preprocess_vp make preprocess_schedule_only make timeseries_preprocessing @@ -48,7 +48,7 @@ funnel_gtfs_single_day: all: make funnel_gtfs_single_day # update open_data/update_vars.py - cd ../open_data/ && make create_gtfs_schedule_geospatial_open_data -f Makefile +# cd ../open_data/ && make create_gtfs_schedule_geospatial_open_data -f Makefile # update high_quality_transit_areas/update_vars.py cd ../high_quality_transit_areas/ && make hqta_data -f Makefile # update rt_segment_speeds/segment_speed_utils/project_vars.py diff --git a/high_quality_transit_areas/Makefile b/high_quality_transit_areas/Makefile index 40355558d..d373f296b 100644 --- a/high_quality_transit_areas/Makefile +++ b/high_quality_transit_areas/Makefile @@ -1,8 +1,8 @@ hqta_data: -# python rail_ferry_brt_stops.py -# python create_hqta_segments.py -# python create_aggregate_stop_frequencies.py -# python sjoin_stops_to_segments.py + python rail_ferry_brt_stops.py + python create_hqta_segments.py + python create_aggregate_stop_frequencies.py + python sjoin_stops_to_segments.py python prep_pairwise_intersections.py python get_intersections.py python create_bus_hqta_types.py diff --git a/high_quality_transit_areas/logs/hqta_processing.log b/high_quality_transit_areas/logs/hqta_processing.log index 3b3f77a3a..220e52eca 100644 --- a/high_quality_transit_areas/logs/hqta_processing.log +++ b/high_quality_transit_areas/logs/hqta_processing.log @@ -133,3 +133,15 @@ 2024-12-19 14:07:17.276 | INFO | __main__::175 - C3_create_bus_hqta_types 2024-12-11 execution time: 0:00:13.000987 2024-12-19 14:07:53.167 | INFO | __main__::219 - D1_assemble_hqta_points 2024-12-11 execution time: 0:00:18.462037 2024-12-19 14:08:28.603 | INFO | __main__::168 - D2_assemble_hqta_polygons 2024-12-11 execution time: 0:00:17.899141 +2025-01-21 12:29:45.420 | INFO | __main__::152 - C1_prep_pairwise_intersections 2025-01-15 execution time: 0:00:04.144644 +2025-01-21 12:30:11.312 | INFO | __main__::124 - C2_find_intersections 2025-01-15 execution time: 0:00:06.889220 +2025-01-21 12:30:42.507 | INFO | __main__::175 - C3_create_bus_hqta_types 2025-01-15 execution time: 0:00:11.787179 +2025-01-21 12:33:02.590 | INFO | __main__::277 - A1_rail_ferry_brt_stops 2025-01-15 execution time: 0:00:21.539013 +2025-01-21 12:39:24.599 | INFO | __main__::248 - B1_create_hqta_segments execution time: 0:06:02.040432 +2025-01-21 12:42:42.569 | INFO | __main__::333 - B2_create_aggregate_stop_frequencies 2025-01-15 execution time: 0:02:57.592371 +2025-01-21 12:43:15.328 | INFO | __main__::326 - B3_sjoin_stops_to_segments 2025-01-15 execution time: 0:00:13.240782 +2025-01-21 12:43:39.277 | INFO | __main__::152 - C1_prep_pairwise_intersections 2025-01-15 execution time: 0:00:04.280915 +2025-01-21 12:44:05.244 | INFO | __main__::124 - C2_find_intersections 2025-01-15 execution time: 0:00:07.267713 +2025-01-21 12:44:35.610 | INFO | __main__::175 - C3_create_bus_hqta_types 2025-01-15 execution time: 0:00:11.535686 +2025-01-21 12:45:13.065 | INFO | __main__::219 - D1_assemble_hqta_points 2025-01-15 execution time: 0:00:18.292937 +2025-01-21 12:45:46.666 | INFO | __main__::168 - D2_assemble_hqta_polygons 2025-01-15 execution time: 0:00:14.175687 diff --git a/high_quality_transit_areas/update_vars.py b/high_quality_transit_areas/update_vars.py index 2911e6499..372232de7 100644 --- a/high_quality_transit_areas/update_vars.py +++ b/high_quality_transit_areas/update_vars.py @@ -1,7 +1,7 @@ from shared_utils import rt_dates import datetime as dt -analysis_date = rt_dates.DATES["dec2024"] +analysis_date = rt_dates.DATES["jan2025"] GCS_FILE_PATH = ("gs://calitp-analytics-data/data-analyses/" "high_quality_transit_areas/") diff --git a/rt_scheduled_v_ran/logs/rt_v_scheduled_route_metrics.log b/rt_scheduled_v_ran/logs/rt_v_scheduled_route_metrics.log index 1352bee1b..46b1be994 100644 --- a/rt_scheduled_v_ran/logs/rt_v_scheduled_route_metrics.log +++ b/rt_scheduled_v_ran/logs/rt_v_scheduled_route_metrics.log @@ -103,3 +103,4 @@ 2025-01-16 15:49:56.361 | INFO | __main__:route_metrics:88 - route aggregation 2023-10-11: 0:00:01.825395 2025-01-16 15:49:58.178 | INFO | __main__:route_metrics:88 - route aggregation 2023-11-15: 0:00:01.812722 2025-01-16 15:50:00.055 | INFO | __main__:route_metrics:88 - route aggregation 2023-12-13: 0:00:01.873527 +2025-01-22 09:30:07.117 | INFO | __main__:route_metrics:85 - route aggregation 2025-01-15: 0:00:03.343220 diff --git a/rt_scheduled_v_ran/logs/rt_v_scheduled_trip_metrics.log b/rt_scheduled_v_ran/logs/rt_v_scheduled_trip_metrics.log index f999d3b8d..816309333 100644 --- a/rt_scheduled_v_ran/logs/rt_v_scheduled_trip_metrics.log +++ b/rt_scheduled_v_ran/logs/rt_v_scheduled_trip_metrics.log @@ -483,3 +483,6 @@ 2024-12-19 09:26:56.119 | INFO | __main__:rt_schedule_trip_metrics:280 - tabular trip metrics 2024-12-11: 0:03:23.206651 2024-12-19 09:51:46.617 | INFO | __main__:rt_schedule_trip_metrics:285 - spatial trip metrics 2024-12-11: 0:24:50.497597 2024-12-19 09:53:04.131 | INFO | __main__:rt_schedule_trip_metrics:333 - Total run time for metrics on 2024-12-11: 0:29:31.218478 +2025-01-22 09:01:53.774 | INFO | __main__:rt_schedule_trip_metrics:280 - tabular trip metrics 2025-01-15: 0:02:57.352651 +2025-01-22 09:27:32.424 | INFO | __main__:rt_schedule_trip_metrics:285 - spatial trip metrics 2025-01-15: 0:25:38.649928 +2025-01-22 09:29:00.238 | INFO | __main__:rt_schedule_trip_metrics:333 - Total run time for metrics on 2025-01-15: 0:30:03.817015 diff --git a/rt_scheduled_v_ran/scripts/update_vars.py b/rt_scheduled_v_ran/scripts/update_vars.py index c000ab20a..106c5a5e6 100644 --- a/rt_scheduled_v_ran/scripts/update_vars.py +++ b/rt_scheduled_v_ran/scripts/update_vars.py @@ -7,8 +7,8 @@ oct2024_week = rt_dates.get_week("oct2024", exclude_wed=True) -# analysis_date_list = [rt_dates.DATES["nov2024"]] -analysis_date_list = rt_dates.y2024_dates + rt_dates.y2023_dates +analysis_date_list = [rt_dates.DATES["jan2025"]] +# analysis_date_list = rt_dates.y2024_dates + rt_dates.y2023_dates GTFS_DATA_DICT = catalog_utils.get_catalog("gtfs_analytics_data") diff --git a/rt_segment_speeds/logs/avg_speeds.log b/rt_segment_speeds/logs/avg_speeds.log index 26dd87007..3e06fed45 100644 --- a/rt_segment_speeds/logs/avg_speeds.log +++ b/rt_segment_speeds/logs/avg_speeds.log @@ -678,3 +678,9 @@ 2025-01-16 16:28:31.739 | INFO | __main__:summary_average_speeds:154 - rt_stop_times summary speed averaging for ['2023-04-15'] execution time: 0:00:17.603240 2025-01-16 16:28:40.309 | INFO | __main__:summary_average_speeds:120 - trip avg 0:00:08.508140 2025-01-16 16:28:49.151 | INFO | __main__:summary_average_speeds:154 - rt_stop_times summary speed averaging for ['2023-04-16'] execution time: 0:00:17.350031 +2025-01-21 17:41:50.589 | INFO | __main__:segment_averages:187 - stop_segments segment averaging for ['2025-01-15'] execution time: 0:01:25.846519 +2025-01-21 18:38:00.086 | INFO | __main__:summary_average_speeds:120 - trip avg 0:00:16.108454 +2025-01-21 18:38:13.628 | INFO | __main__:summary_average_speeds:155 - rt_stop_times summary speed averaging for ['2025-01-15'] execution time: 0:00:29.651019 +2025-01-21 18:57:59.637 | INFO | average_segment_speeds:segment_averages_detail:251 - speedmap_segments detailed segment averaging for ['2025-01-15'] execution time: 0:06:11.080021 +2025-01-21 19:03:28.422 | INFO | average_segment_speeds:segment_averages:187 - speedmap_segments segment averaging for ['2025-01-15'] execution time: 0:05:28.685950 +2025-01-21 19:08:11.751 | INFO | average_segment_speeds:segment_averages:187 - speedmap_segments segment averaging for ['2025-01-15'] execution time: 0:04:43.240026 \ No newline at end of file diff --git a/rt_segment_speeds/logs/cut_stop_segments.log b/rt_segment_speeds/logs/cut_stop_segments.log index 325748b96..81df4c9a9 100644 --- a/rt_segment_speeds/logs/cut_stop_segments.log +++ b/rt_segment_speeds/logs/cut_stop_segments.log @@ -73,3 +73,5 @@ 2024-12-17 17:03:15.346 | INFO | __main__::244 - speedmap segments and proxy_stop_times 2024-12-11: 0:05:24.205473 2024-12-18 09:06:06.283 | INFO | __main__::168 - cut segments 2024-12-11: 0:25:27.680094 2024-12-18 09:13:13.266 | INFO | __main__::244 - speedmap segments and proxy_stop_times 2024-12-11: 0:04:55.428371 +2025-01-21 13:14:13.570 | INFO | __main__::168 - cut segments 2025-01-15: 0:28:00.641195 +2025-01-21 13:22:00.233 | INFO | __main__::244 - speedmap segments and proxy_stop_times 2025-01-15: 0:05:55.448966 diff --git a/rt_segment_speeds/logs/interpolate_stop_arrival.log b/rt_segment_speeds/logs/interpolate_stop_arrival.log index 41ff1addc..220b86456 100644 --- a/rt_segment_speeds/logs/interpolate_stop_arrival.log +++ b/rt_segment_speeds/logs/interpolate_stop_arrival.log @@ -137,3 +137,6 @@ 2024-12-18 10:52:54.623 | INFO | interpolate_stop_arrival:interpolate_stop_arrivals:236 - interpolate arrivals for stop_segments 2024-12-11: 2024-12-11: 0:10:20.061296 2024-12-18 14:42:51.535 | INFO | interpolate_stop_arrival:interpolate_stop_arrivals:236 - interpolate arrivals for rt_stop_times 2024-12-11: 2024-12-11: 0:10:33.922215 2024-12-18 14:56:54.836 | INFO | interpolate_stop_arrival:interpolate_stop_arrivals:236 - interpolate arrivals for speedmap_segments 2024-12-11: 2024-12-11: 0:02:36.918147 +2025-01-21 17:12:27.738 | INFO | interpolate_stop_arrival:interpolate_stop_arrivals:236 - interpolate arrivals for stop_segments 2025-01-15: 2025-01-15: 0:01:20.848747 +2025-01-21 18:35:30.275 | INFO | interpolate_stop_arrival:interpolate_stop_arrivals:236 - interpolate arrivals for rt_stop_times 2025-01-15: 2025-01-15: 0:13:06.847024 +2025-01-21 18:49:29.708 | INFO | interpolate_stop_arrival:interpolate_stop_arrivals:236 - interpolate arrivals for speedmap_segments 2025-01-15: 2025-01-15: 0:02:15.045884 diff --git a/rt_segment_speeds/logs/nearest_vp.log b/rt_segment_speeds/logs/nearest_vp.log index 8489eee65..640ebd401 100644 --- a/rt_segment_speeds/logs/nearest_vp.log +++ b/rt_segment_speeds/logs/nearest_vp.log @@ -276,3 +276,7 @@ 2024-12-18 10:42:34.461 | INFO | nearest_vp_to_stop:nearest_neighbor_for_stop:189 - nearest neighbor for stop_segments 2024-12-11: 0:36:50.316084 2024-12-18 14:32:17.520 | INFO | nearest_vp_to_stop:nearest_neighbor_for_stop:189 - nearest neighbor for rt_stop_times 2024-12-11: 0:40:52.717197 2024-12-18 14:54:17.879 | INFO | nearest_vp_to_stop:nearest_neighbor_for_stop:189 - nearest neighbor for speedmap_segments 2024-12-11: 0:08:09.784862 +2025-01-21 13:27:30.117 | INFO | nearest_vp_to_stop:nearest_neighbor_for_stop:188 - nearest neighbor for stop_segments 2025-01-15: 0:05:06.574214 +2025-01-21 17:11:06.855 | INFO | nearest_vp_to_stop:nearest_neighbor_for_stop:188 - nearest neighbor for stop_segments 2025-01-15: 0:04:14.577150 +2025-01-21 18:22:23.308 | INFO | nearest_vp_to_stop:nearest_neighbor_for_stop:188 - nearest neighbor for rt_stop_times 2025-01-15: 0:39:52.283432 +2025-01-21 18:47:14.614 | INFO | nearest_vp_to_stop:nearest_neighbor_for_stop:188 - nearest neighbor for speedmap_segments 2025-01-15: 0:08:43.206096 diff --git a/rt_segment_speeds/logs/speeds_by_segment_trip.log b/rt_segment_speeds/logs/speeds_by_segment_trip.log index fc97d8640..477daea35 100644 --- a/rt_segment_speeds/logs/speeds_by_segment_trip.log +++ b/rt_segment_speeds/logs/speeds_by_segment_trip.log @@ -149,3 +149,6 @@ 2024-12-18 10:54:39.517 | INFO | stop_arrivals_to_speed:calculate_speed_from_stop_arrivals:176 - speeds by segment for stop_segments 2024-12-11: 0:01:44.792095 2024-12-18 14:44:34.009 | INFO | stop_arrivals_to_speed:calculate_speed_from_stop_arrivals:176 - speeds by segment for rt_stop_times 2024-12-11: 0:01:42.393123 2024-12-18 14:58:57.031 | INFO | stop_arrivals_to_speed:calculate_speed_from_stop_arrivals:176 - speeds by segment for speedmap_segments 2024-12-11: 0:01:51.369378 +2025-01-21 17:13:56.681 | INFO | stop_arrivals_to_speed:calculate_speed_from_stop_arrivals:176 - speeds by segment for stop_segments 2025-01-15: 0:01:28.844221 +2025-01-21 18:37:14.368 | INFO | stop_arrivals_to_speed:calculate_speed_from_stop_arrivals:176 - speeds by segment for rt_stop_times 2025-01-15: 0:01:43.962507 +2025-01-21 18:51:30.158 | INFO | stop_arrivals_to_speed:calculate_speed_from_stop_arrivals:176 - speeds by segment for speedmap_segments 2025-01-15: 0:01:50.399658 diff --git a/rt_segment_speeds/scripts/average_segment_speeds.py b/rt_segment_speeds/scripts/average_segment_speeds.py index c0f89426d..9ab3b4d14 100644 --- a/rt_segment_speeds/scripts/average_segment_speeds.py +++ b/rt_segment_speeds/scripts/average_segment_speeds.py @@ -72,20 +72,14 @@ def concatenate_trip_segment_speeds( ).pipe( gtfs_schedule_wrangling.add_peak_offpeak_column ) - """ - Amanda: There's already a `service_date` column. - df = df.rename(columns={'arrival_time':'service_date'} + # df = df.rename(columns={'arrival_time':'service_date'} # will now cause errors by adding a second service_date col + # drop arrival time if not needed, no need to rename to service_date since that now comes via concatenate_datasets_across_dates + df = df.drop(columns=['arrival_time'] ).pipe( gtfs_schedule_wrangling.add_weekday_weekend_column - ) # drop service_date? + ) print("concatenated files") - """ - df = df.pipe( - gtfs_schedule_wrangling.add_weekday_weekend_column - ) # drop service_date? - df.direction_id = df.direction_id.fillna(0) - print("concatenated files") return df @@ -104,9 +98,6 @@ def merge_in_segment_geometry( f"{SEGMENT_GCS}{SEGMENT_FILE}_{analysis_date}.parquet", ).to_crs(WGS84) - # Amanda: go back to the script that creates segment_geom to fill in nans - segment_geom.direction_id = segment_geom.direction_id.fillna(0) - col_order = [c for c in speeds_by_segment.columns] # The merge columns list should be all the columns that are in common @@ -145,9 +136,6 @@ def segment_averages( get_pandas = False ) - # Amanda, temporarily filling in direction id here - df.direction_id = df.direction_id.fillna(0) - if weighted_averages: avg_speeds = delayed(metrics.concatenate_peak_offpeak_allday_averages)( df, diff --git a/rt_segment_speeds/segment_speed_utils/project_vars.py b/rt_segment_speeds/segment_speed_utils/project_vars.py index cae8f5759..35b4118f5 100644 --- a/rt_segment_speeds/segment_speed_utils/project_vars.py +++ b/rt_segment_speeds/segment_speed_utils/project_vars.py @@ -11,14 +11,13 @@ SHARED_GCS = GTFS_DATA_DICT.gcs_paths.SHARED_GCS PUBLIC_GCS = GTFS_DATA_DICT.gcs_paths.PUBLIC_GCS -# analysis_date = rt_dates.DATES["nov2024"] +analysis_date = rt_dates.DATES["jan2025"] oct2023_week = rt_dates.get_week("oct2023", exclude_wed=True) apr2023_week = rt_dates.get_week("apr2023", exclude_wed=True) apr2024_week = rt_dates.get_week("apr2024", exclude_wed=True) oct2024_week = rt_dates.get_week("oct2024", exclude_wed=True) -# One file wasn't found for October 21 2024 all_dates = ( rt_dates.y2024_dates + rt_dates.y2023_dates + oct2024_week + apr2024_week + oct2023_week + apr2023_week @@ -29,7 +28,8 @@ rt_dates.oct2023_week, rt_dates.apr2023_week, ] -analysis_date_list = apr2024_week + oct2023_week + apr2023_week + +analysis_date_list = [analysis_date] PROJECT_CRS = "EPSG:3310" From 88dbf11383c381e5c62b84601dd2869e5801fccb Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Wed, 22 Jan 2025 23:46:54 +0000 Subject: [PATCH 13/17] add nb comparing Dec Jan speed tables --- rt_segment_speeds/45_diff_tables.ipynb | 631 +++++++++++++++++++++++++ 1 file changed, 631 insertions(+) create mode 100644 rt_segment_speeds/45_diff_tables.ipynb diff --git a/rt_segment_speeds/45_diff_tables.ipynb b/rt_segment_speeds/45_diff_tables.ipynb new file mode 100644 index 000000000..b9e2fb559 --- /dev/null +++ b/rt_segment_speeds/45_diff_tables.ipynb @@ -0,0 +1,631 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 3, + "id": "d528f399-cf33-459e-b5dc-92e0b4ae389a", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import geopandas as gpd\n", + "from siuba import *\n", + "import shared_utils\n", + "\n", + "from calitp_data_analysis import get_fs, geography_utils\n", + "from segment_speed_utils import helpers, time_series_utils, gtfs_schedule_wrangling\n", + "from segment_speed_utils.project_vars import SCHED_GCS, SEGMENT_GCS, GTFS_DATA_DICT, analysis_date" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "42a16a99-113f-48e9-9f8e-f5cea66952ed", + "metadata": {}, + "outputs": [], + "source": [ + "import dask.dataframe as dd\n", + "import dask_geopandas as dg" + ] + }, + { + "cell_type": "markdown", + "id": "83bf87cf-a9f5-4acd-afa6-d0d8920f4a73", + "metadata": {}, + "source": [ + "# Scratchpad for displaying excluded shapes on speedmaps\n", + "\n", + "* implemented via `ca_transit_speedmaps/speedmap_utils.py` for now\n", + "* TODO: more systematic/clarify cause as speed data gap or shape not running in time period" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "6cd318e5-5c4e-4249-b158-232f4d940770", + "metadata": {}, + "outputs": [], + "source": [ + "catalog = shared_utils.catalog_utils.get_catalog('gtfs_analytics_data')" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "66ff6c3d-1386-47dd-b10e-7fff3f4ff470", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'gcs_paths': {'GCS': 'gs://calitp-analytics-data/data-analyses/', 'COMPILED_CACHED_VIEWS': '${.GCS}rt_delay/compiled_cached_views/', 'SEGMENT_GCS': '${.GCS}rt_segment_speeds/', 'SCHED_GCS': '${.GCS}gtfs_schedule/', 'RT_SCHED_GCS': '${.GCS}rt_vs_schedule/', 'SHARED_GCS': '${.GCS}shared_data/', 'PREDICTIONS_GCS': '${.GCS}rt_predictions/', 'PUBLIC_GCS': 'gs://calitp-publish-data-analysis/'}, 'speed_vars': {'timestamp_col': 'location_timestamp_local', 'max_speed': 80, 'time_min_cutoff': 10, 'timestamp_cols': ['location_timestamp_local', 'moving_timestamp_local']}, 'schedule_downloads': {'dir': '${gcs_paths.COMPILED_CACHED_VIEWS}', 'trips': 'trips', 'shapes': 'routelines', 'stops': 'stops', 'stop_times': 'st'}, 'speeds_tables': {'dir': '${gcs_paths.SEGMENT_GCS}', 'raw_vp': 'vp', 'usable_vp': 'vp_usable', 'vp_dwell': 'vp_usable_dwell', 'vp_condensed_line': 'condensed/vp_condensed', 'timestamp_col': '${speed_vars.timestamp_col}', 'time_min_cutoff': '${speed_vars.time_min_cutoff}'}, 'schedule_tables': {'dir': '${gcs_paths.SCHED_GCS}', 'gtfs_key_crosswalk': 'crosswalk/gtfs_key_organization', 'route_identification': 'standardized_route_ids', 'route_typologies': 'nacto_typologies/route_typologies', 'monthly_scheduled_service': 'scheduled_service_by_route', 'operator_scheduled_stats': 'operator_profiles/operator_scheduled_stats', 'operator_routes': 'operator_profiles/operator_routes'}, 'rt_vs_schedule_tables': {'dir': '${gcs_paths.RT_SCHED_GCS}', 'stop_times_direction': 'stop_times_direction', 'sched_trip_metrics': 'schedule_trip/schedule_trip_metrics', 'sched_route_direction_metrics': 'schedule_route_dir/schedule_route_direction_metrics', 'vp_trip_metrics': 'vp_trip/trip_metrics', 'vp_route_direction_metrics': 'vp_route_dir/route_direction_metrics', 'vp_operator_metrics': 'vp_operator/operator_metrics', 'sched_stop_metrics': 'schedule_stop/schedule_stop_metrics', 'schedule_rt_stop_times': 'schedule_rt_stop_times', 'early_trip_minutes': -5, 'late_trip_minutes': 5}, 'digest_tables': {'dir': '${gcs_paths.RT_SCHED_GCS}', 'route_schedule_vp': 'digest/schedule_vp_metrics', 'route_segment_speeds': 'digest/segment_speeds', 'route_segment_geometry': 'digest/segment_speeds_geom', 'operator_profiles': 'digest/operator_profiles', 'operator_routes_map': 'digest/operator_routes', 'operator_sched_rt': 'digest/operator_schedule_rt_category', 'scheduled_service_hours': 'digest/total_scheduled_service_hours'}, 'stop_segments': {'dir': '${gcs_paths.SEGMENT_GCS}', 'stage1': '${speeds_tables.vp_dwell}', 'stage2': 'nearest/nearest_vp_shape_segments', 'stage3': 'stop_arrivals', 'stage4': 'speeds_stop_segments', 'trip_stop_cols': ['trip_instance_key', 'stop_sequence'], 'shape_stop_cols': ['shape_array_key', 'shape_id', 'stop_sequence'], 'stop_pair_cols': ['stop_pair', 'stop_pair_name'], 'route_dir_cols': ['route_id', 'direction_id'], 'segment_cols': ['route_id', 'direction_id', 'stop_pair', 'geometry'], 'route_dir_single_segment': 'rollup_singleday/speeds_route_dir_segments', 'route_dir_single_segment_detail': 'rollup_singleday/speeds_route_dir_segments_detail', 'route_dir_multi_segment': 'rollup_multiday/speeds_route_dir_segments', 'segments_file': 'segment_options/shape_stop_segments', 'max_speed': '${speed_vars.max_speed}', 'route_dir_quarter_segment': 'rollup_multiday/quarter_speeds_route_dir_segments', 'route_dir_year_segment': 'rollup_multiday/year_speeds_route_dir_segments'}, 'rt_stop_times': {'dir': '${gcs_paths.SEGMENT_GCS}', 'stage1': '${speeds_tables.vp_dwell}', 'stage2': 'nearest/nearest_vp_rt_stop_times', 'stage3': 'rt_stop_times/stop_arrivals', 'stage4': 'rt_stop_times/speeds', 'trip_stop_cols': ['trip_instance_key', 'stop_sequence'], 'shape_stop_cols': ['shape_array_key', 'shape_id', 'stop_sequence'], 'stop_pair_cols': ['stop_pair', 'stop_pair_name'], 'route_dir_cols': ['route_id', 'direction_id'], 'segments_file': 'segment_options/stop_segments', 'trip_speeds_single_summary': 'rollup_singleday/speeds_trip', 'route_dir_single_summary': 'rollup_singleday/speeds_route_dir', 'route_dir_multi_summary': 'rollup_multiday/speeds_route_dir', 'min_trip_minutes': '${speed_vars.time_min_cutoff}', 'max_trip_minutes': 180, 'max_speed': '${speed_vars.max_speed}', 'min_meters_elapsed': 1609}, 'speedmap_segments': {'dir': '${gcs_paths.SEGMENT_GCS}', 'stage1': '${speeds_tables.vp_dwell}', 'proxy_stop_times': 'stop_time_expansion/speedmap_stop_times', 'stage2': 'nearest/nearest_vp_speedmap_proxy', 'stage3': 'speedmap/stop_arrivals_proxy', 'stage3b': 'speedmap/stop_arrivals', 'stage4': 'speedmap/speeds', 'trip_stop_cols': ['trip_instance_key', 'stop_sequence', 'stop_sequence1'], 'shape_stop_cols': ['shape_array_key', 'shape_id'], 'stop_pair_cols': ['stop_pair', 'stop_pair_name', 'segment_id'], 'route_dir_cols': ['route_id', 'direction_id'], 'segments_file': 'segment_options/speedmap_segments', 'shape_stop_single_segment': 'rollup_singleday/speeds_shape_speedmap_segments', 'shape_stop_single_segment_detail': 'rollup_singleday/speeds_shape_speedmap_segments_detail', 'route_dir_single_segment': 'rollup_singleday/speeds_route_dir_speedmap_segments', 'route_dir_multi_segment': 'rollup_multiday/speeds_route_dir_speedmap_segments', 'min_trip_minutes': '${speed_vars.time_min_cutoff}', 'max_trip_minutes': 180, 'max_speed': '${speed_vars.max_speed}', 'min_meters_elapsed': 1609, 'segment_meters': 1000}, 'road_segments': {'dir': '${gcs_paths.SEGMENT_GCS}', 'stage1': '${speeds_tables.vp_dwell}', 'proxy_stop_times': 'stop_time_expansion/roads_stop_times', 'stage2': 'nearest/nearest_vp_roads', 'stage3': 'road_segments/stop_arrivals', 'stage4': 'speeds_road_segments', 'road_cols': ['linearid', 'mtfcc'], 'road_segment_cols': ['linearid', 'mtfcc', 'segment_sequence'], 'trip_stop_cols': ['trip_instance_key', 'linaerid', 'mtfcc', 'segment_sequence'], 'timestamp_col': '${speed_vars.timestamp_col}'}, 'shared_data': {'dir': '${gcs_paths.SHARED_GCS}', 'road_segments_twomile': 'segmented_roads_twomile_2020', 'road_segments_onekm': 'segmented_roads_onekm_2020'}}" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "catalog" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "02f9dbd8-cc31-4a7e-bccc-f5241b9144bf", + "metadata": {}, + "outputs": [], + "source": [ + "vp_tables = [key for key in catalog.speeds_tables.keys() if 'vp' in key]" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "292a5d47-daaf-47bf-976f-0f1b8e28cc77", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['raw_vp', 'usable_vp', 'vp_dwell', 'vp_condensed_line']" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "vp_tables" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "f7d06216-4755-44e2-afd3-2a2b8ac2e1f5", + "metadata": {}, + "outputs": [], + "source": [ + "paths = [catalog.speeds_tables[key] for key in catalog.speeds_tables.keys() if 'vp' in key]" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "8d30e38f-a1af-4528-8f9c-e0cf367e1623", + "metadata": {}, + "outputs": [], + "source": [ + "def diff_vp_tables(paths: list, dates: tuple):\n", + " for table in paths:\n", + " for date in dates:\n", + " try:\n", + " path = f'{catalog.speeds_tables.dir}{table}_{date}.parquet'\n", + " df = pd.read_parquet(path)\n", + " print(path)\n", + " print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')\n", + " print(df.info())\n", + " print(f'unique trips: {len(df.trip_instance_key.unique())}')\n", + " except:\n", + " path = f'{catalog.speeds_tables.dir}{table}_{date}/'\n", + " ddf = dd.read_parquet(path)\n", + " print(path)\n", + " print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')\n", + " print(f'length: {ddf.shape[0].compute()}')\n", + " print(f'unique trips: {len(ddf.trip_instance_key.unique().compute())}')\n", + " print(ddf.info())" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "81a221c1-7797-48ff-ad26-55acf5f90eec", + "metadata": {}, + "outputs": [], + "source": [ + "dates = (shared_utils.rt_dates.DATES['dec2024'],\n", + " shared_utils.rt_dates.DATES['jan2025']\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "8cf736da-4380-49bf-bcd2-db845b81e6a4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['vp', 'vp_usable', 'vp_usable_dwell', 'condensed/vp_condensed']" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "paths" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "f722eb8a-6d6f-4b33-8b85-5d008f2f682a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/vp_2024-12-11.parquet\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "\n", + "RangeIndex: 15204207 entries, 0 to 15204206\n", + "Data columns (total 8 columns):\n", + " # Column Dtype \n", + "--- ------ ----- \n", + " 0 gtfs_dataset_name object \n", + " 1 schedule_gtfs_dataset_key object \n", + " 2 trip_id object \n", + " 3 trip_instance_key object \n", + " 4 location_timestamp datetime64[ns, UTC]\n", + " 5 location_timestamp_local datetime64[ns] \n", + " 6 gtfs_dataset_key category \n", + " 7 geometry object \n", + "dtypes: category(1), datetime64[ns, UTC](1), datetime64[ns](1), object(5)\n", + "memory usage: 826.5+ MB\n", + "None\n", + "unique trips: 93389\n", + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/vp_2025-01-15.parquet\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "\n", + "RangeIndex: 15516326 entries, 0 to 15516325\n", + "Data columns (total 8 columns):\n", + " # Column Dtype \n", + "--- ------ ----- \n", + " 0 gtfs_dataset_name object \n", + " 1 schedule_gtfs_dataset_key object \n", + " 2 trip_id object \n", + " 3 trip_instance_key object \n", + " 4 location_timestamp datetime64[ns, UTC]\n", + " 5 location_timestamp_local datetime64[ns] \n", + " 6 gtfs_dataset_key category \n", + " 7 geometry object \n", + "dtypes: category(1), datetime64[ns, UTC](1), datetime64[ns](1), object(5)\n", + "memory usage: 843.5+ MB\n", + "None\n", + "unique trips: 93802\n", + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/vp_usable_2024-12-11/\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "length: 15146974\n", + "unique trips: 90707\n", + "\n", + "Columns: 11 entries, gtfs_dataset_name to y\n", + "dtypes: category(1), datetime64[ns, UTC](1), datetime64[ns](1), object(5), float64(2), int64(1)None\n", + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/vp_usable_2025-01-15/\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "length: 15452403\n", + "unique trips: 90910\n", + "\n", + "Columns: 11 entries, gtfs_dataset_name to y\n", + "dtypes: category(1), datetime64[ns, UTC](1), datetime64[ns](1), object(5), float64(2), int64(1)None\n", + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/vp_usable_dwell_2024-12-11/\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "length: 12555541\n", + "unique trips: 90707\n", + "\n", + "Columns: 16 entries, gtfs_dataset_name to dwell_sec\n", + "dtypes: category(1), datetime64[ns, UTC](1), datetime64[ns](2), object(5), float64(2), int64(5)None\n", + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/vp_usable_dwell_2025-01-15/\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "length: 12641977\n", + "unique trips: 90910\n", + "\n", + "Columns: 16 entries, gtfs_dataset_name to dwell_sec\n", + "dtypes: category(1), datetime64[ns, UTC](1), datetime64[ns](2), object(5), float64(2), int64(5)None\n", + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/condensed/vp_condensed_2024-12-11.parquet\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "\n", + "RangeIndex: 90707 entries, 0 to 90706\n", + "Data columns (total 6 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 trip_instance_key 90707 non-null object\n", + " 1 geometry 90707 non-null object\n", + " 2 vp_idx 90707 non-null object\n", + " 3 location_timestamp_local 90707 non-null object\n", + " 4 moving_timestamp_local 90707 non-null object\n", + " 5 vp_primary_direction 90707 non-null object\n", + "dtypes: object(6)\n", + "memory usage: 4.2+ MB\n", + "None\n", + "unique trips: 90707\n", + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/condensed/vp_condensed_2025-01-15.parquet\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "\n", + "RangeIndex: 90910 entries, 0 to 90909\n", + "Data columns (total 6 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 trip_instance_key 90910 non-null object\n", + " 1 geometry 90910 non-null object\n", + " 2 vp_idx 90910 non-null object\n", + " 3 location_timestamp_local 90910 non-null object\n", + " 4 moving_timestamp_local 90910 non-null object\n", + " 5 vp_primary_direction 90910 non-null object\n", + "dtypes: object(6)\n", + "memory usage: 4.2+ MB\n", + "None\n", + "unique trips: 90910\n" + ] + } + ], + "source": [ + "diff_vp_tables(paths, dates)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "58e76e14-1e69-4b11-a87b-9c7c8572e82d", + "metadata": {}, + "outputs": [], + "source": [ + "cond1 = gpd.read_parquet('gs://calitp-analytics-data/data-analyses/rt_segment_speeds/condensed/vp_condensed_2024-12-11.parquet')" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "id": "a50beca0-f0f2-48b0-bc28-b07b51f9b4ef", + "metadata": {}, + "outputs": [], + "source": [ + "cond2 = gpd.read_parquet('gs://calitp-analytics-data/data-analyses/rt_segment_speeds/condensed/vp_condensed_2025-01-15.parquet')" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "94107516-838d-4234-9ae0-53fc64a68183", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Eastbound 2804652\n", + "Westbound 2771695\n", + "Southbound 2679640\n", + "Northbound 2672020\n", + "Unknown 1627534\n", + "Name: vp_primary_direction, dtype: int64" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cond1.vp_primary_direction.explode().value_counts()" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "bb986dd0-00aa-43c2-85c6-befed15277e9", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Eastbound 2825746\n", + "Westbound 2792007\n", + "Southbound 2703923\n", + "Northbound 2692053\n", + "Unknown 1628248\n", + "Name: vp_primary_direction, dtype: int64" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cond2.vp_primary_direction.explode().value_counts()" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "8d04dc9c-2b04-43d3-97e4-b1e09feb1320", + "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", + "
trip_instance_keygeometryvp_idxlocation_timestamp_localmoving_timestamp_localvp_primary_direction
000001f273308970887743ce0c3acf068LINESTRING (-117.06536 32.56955, -117.06539 32...[8622806, 8622807, 8622808, 8622809, 8622812, ...[2025-01-15T18:02:45.000000, 2025-01-15T18:03:...[2025-01-15T18:02:45.000000, 2025-01-15T18:03:...[Unknown, Westbound, Northbound, Unknown, East...
100005ffae19105cd3addbd6642d7873aLINESTRING (-122.21661 37.79909, -122.21661 37...[12821471, 12821472, 12821474, 12821475, 12821...[2025-01-15T18:16:54.000000, 2025-01-15T18:17:...[2025-01-15T18:16:54.000000, 2025-01-15T18:17:...[Unknown, Unknown, Southbound, Northbound, Unk...
20000b6cbbfc0fb65ecefcc495349015eLINESTRING (-122.52319 37.97165, -122.52321 37...[14157063, 14157064, 14157065, 14157066, 14157...[2025-01-15T07:47:56.000000, 2025-01-15T07:48:...[2025-01-15T07:47:56.000000, 2025-01-15T07:48:...[Unknown, Southbound, Southbound, Northbound, ...
300012e56c8260fd35926619339b4fe17LINESTRING (-122.46008 37.70635, -122.46008 37...[10710639, 10710640, 10710648, 10710649, 10710...[2025-01-15T13:26:18.000000, 2025-01-15T13:26:...[2025-01-15T13:26:18.000000, 2025-01-15T13:28:...[Unknown, Unknown, Eastbound, Unknown, Eastbou...
40002cdd1d51f33e7543289688c01c6e5LINESTRING (-117.88335 33.91635, -117.88369 33...[9327071, 9327072, 9327073, 9327076, 9327077, ...[2025-01-15T16:10:31.000000, 2025-01-15T16:10:...[2025-01-15T16:10:31.000000, 2025-01-15T16:10:...[Unknown, Southbound, Unknown, Southbound, Sou...
.....................
90905fffdd30816e4022838ee42dd45e59318LINESTRING (-122.29901 37.90289, -122.29901 37...[14686171, 14686172, 14686193, 14686194, 14686...[2025-01-15T12:49:16.000000, 2025-01-15T12:49:...[2025-01-15T12:49:16.000000, 2025-01-15T12:56:...[Unknown, Unknown, Westbound, Westbound, Westb...
90906fffe75702726c5c94333254be21e475fLINESTRING (-117.15356 32.71582, -117.15356 32...[8085607, 8085608, 8085611, 8085612, 8085614, ...[2025-01-15T07:57:40.000000, 2025-01-15T07:58:...[2025-01-15T07:57:40.000000, 2025-01-15T07:59:...[Unknown, Unknown, Eastbound, Unknown, Westbou...
90907fffed00f13282ae103eb572cd9cb9d6bLINESTRING (-117.10793 32.66203, -117.10793 32...[8197030, 8197031, 8197032, 8197033, 8197034, ...[2025-01-15T17:58:12.000000, 2025-01-15T17:58:...[2025-01-15T17:58:12.000000, 2025-01-15T17:58:...[Unknown, Unknown, Southbound, Northbound, Nor...
90908fffed04d5fcb59b478ff147c07f5e948LINESTRING (-122.50857 37.76033, -122.50857 37...[11921403, 11921404, 11921410, 11921411, 11921...[2025-01-15T21:07:00.000000, 2025-01-15T21:07:...[2025-01-15T21:07:00.000000, 2025-01-15T21:08:...[Unknown, Unknown, Eastbound, Unknown, Northbo...
90909fffedef7f35089715dc786c7398ce3acLINESTRING (-121.76472 38.65993, -121.76444 38...[6072838, 6072839, 6072840, 6072841, 6072844, ...[2025-01-15T14:59:35.000000, 2025-01-15T14:59:...[2025-01-15T14:59:35.000000, 2025-01-15T14:59:...[Unknown, Eastbound, Eastbound, Unknown, Eastb...
\n", + "

90910 rows × 6 columns

\n", + "
" + ], + "text/plain": [ + " trip_instance_key \\\n", + "0 00001f273308970887743ce0c3acf068 \n", + "1 00005ffae19105cd3addbd6642d7873a \n", + "2 0000b6cbbfc0fb65ecefcc495349015e \n", + "3 00012e56c8260fd35926619339b4fe17 \n", + "4 0002cdd1d51f33e7543289688c01c6e5 \n", + "... ... \n", + "90905 fffdd30816e4022838ee42dd45e59318 \n", + "90906 fffe75702726c5c94333254be21e475f \n", + "90907 fffed00f13282ae103eb572cd9cb9d6b \n", + "90908 fffed04d5fcb59b478ff147c07f5e948 \n", + "90909 fffedef7f35089715dc786c7398ce3ac \n", + "\n", + " geometry \\\n", + "0 LINESTRING (-117.06536 32.56955, -117.06539 32... \n", + "1 LINESTRING (-122.21661 37.79909, -122.21661 37... \n", + "2 LINESTRING (-122.52319 37.97165, -122.52321 37... \n", + "3 LINESTRING (-122.46008 37.70635, -122.46008 37... \n", + "4 LINESTRING (-117.88335 33.91635, -117.88369 33... \n", + "... ... \n", + "90905 LINESTRING (-122.29901 37.90289, -122.29901 37... \n", + "90906 LINESTRING (-117.15356 32.71582, -117.15356 32... \n", + "90907 LINESTRING (-117.10793 32.66203, -117.10793 32... \n", + "90908 LINESTRING (-122.50857 37.76033, -122.50857 37... \n", + "90909 LINESTRING (-121.76472 38.65993, -121.76444 38... \n", + "\n", + " vp_idx \\\n", + "0 [8622806, 8622807, 8622808, 8622809, 8622812, ... \n", + "1 [12821471, 12821472, 12821474, 12821475, 12821... \n", + "2 [14157063, 14157064, 14157065, 14157066, 14157... \n", + "3 [10710639, 10710640, 10710648, 10710649, 10710... \n", + "4 [9327071, 9327072, 9327073, 9327076, 9327077, ... \n", + "... ... \n", + "90905 [14686171, 14686172, 14686193, 14686194, 14686... \n", + "90906 [8085607, 8085608, 8085611, 8085612, 8085614, ... \n", + "90907 [8197030, 8197031, 8197032, 8197033, 8197034, ... \n", + "90908 [11921403, 11921404, 11921410, 11921411, 11921... \n", + "90909 [6072838, 6072839, 6072840, 6072841, 6072844, ... \n", + "\n", + " location_timestamp_local \\\n", + "0 [2025-01-15T18:02:45.000000, 2025-01-15T18:03:... \n", + "1 [2025-01-15T18:16:54.000000, 2025-01-15T18:17:... \n", + "2 [2025-01-15T07:47:56.000000, 2025-01-15T07:48:... \n", + "3 [2025-01-15T13:26:18.000000, 2025-01-15T13:26:... \n", + "4 [2025-01-15T16:10:31.000000, 2025-01-15T16:10:... \n", + "... ... \n", + "90905 [2025-01-15T12:49:16.000000, 2025-01-15T12:49:... \n", + "90906 [2025-01-15T07:57:40.000000, 2025-01-15T07:58:... \n", + "90907 [2025-01-15T17:58:12.000000, 2025-01-15T17:58:... \n", + "90908 [2025-01-15T21:07:00.000000, 2025-01-15T21:07:... \n", + "90909 [2025-01-15T14:59:35.000000, 2025-01-15T14:59:... \n", + "\n", + " moving_timestamp_local \\\n", + "0 [2025-01-15T18:02:45.000000, 2025-01-15T18:03:... \n", + "1 [2025-01-15T18:16:54.000000, 2025-01-15T18:17:... \n", + "2 [2025-01-15T07:47:56.000000, 2025-01-15T07:48:... \n", + "3 [2025-01-15T13:26:18.000000, 2025-01-15T13:28:... \n", + "4 [2025-01-15T16:10:31.000000, 2025-01-15T16:10:... \n", + "... ... \n", + "90905 [2025-01-15T12:49:16.000000, 2025-01-15T12:56:... \n", + "90906 [2025-01-15T07:57:40.000000, 2025-01-15T07:59:... \n", + "90907 [2025-01-15T17:58:12.000000, 2025-01-15T17:58:... \n", + "90908 [2025-01-15T21:07:00.000000, 2025-01-15T21:08:... \n", + "90909 [2025-01-15T14:59:35.000000, 2025-01-15T14:59:... \n", + "\n", + " vp_primary_direction \n", + "0 [Unknown, Westbound, Northbound, Unknown, East... \n", + "1 [Unknown, Unknown, Southbound, Northbound, Unk... \n", + "2 [Unknown, Southbound, Southbound, Northbound, ... \n", + "3 [Unknown, Unknown, Eastbound, Unknown, Eastbou... \n", + "4 [Unknown, Southbound, Unknown, Southbound, Sou... \n", + "... ... \n", + "90905 [Unknown, Unknown, Westbound, Westbound, Westb... \n", + "90906 [Unknown, Unknown, Eastbound, Unknown, Westbou... \n", + "90907 [Unknown, Unknown, Southbound, Northbound, Nor... \n", + "90908 [Unknown, Unknown, Eastbound, Unknown, Northbo... \n", + "90909 [Unknown, Eastbound, Eastbound, Unknown, Eastb... \n", + "\n", + "[90910 rows x 6 columns]" + ] + }, + "execution_count": 35, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cond2.geometry" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1d7ae3b1-b3c7-47ab-939f-24917678961d", + "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 +} From b4b2fb312327b330b948bf4a5cbc5ae96f4fe22c Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Wed, 22 Jan 2025 23:49:08 +0000 Subject: [PATCH 14/17] add nb comparing Dec Jan speed tables --- rt_segment_speeds/45_diff_tables.ipynb | 266 +------------------------ 1 file changed, 3 insertions(+), 263 deletions(-) diff --git a/rt_segment_speeds/45_diff_tables.ipynb b/rt_segment_speeds/45_diff_tables.ipynb index b9e2fb559..1954d64fa 100644 --- a/rt_segment_speeds/45_diff_tables.ipynb +++ b/rt_segment_speeds/45_diff_tables.ipynb @@ -33,10 +33,10 @@ "id": "83bf87cf-a9f5-4acd-afa6-d0d8920f4a73", "metadata": {}, "source": [ - "# Scratchpad for displaying excluded shapes on speedmaps\n", + "# What's up with January?\n", "\n", - "* implemented via `ca_transit_speedmaps/speedmap_utils.py` for now\n", - "* TODO: more systematic/clarify cause as speed data gap or shape not running in time period" + "* Follow Tiffany suggestion to look at speed tables...\n", + "* https://github.com/cal-itp/data-analyses/pull/1356" ] }, { @@ -49,27 +49,6 @@ "catalog = shared_utils.catalog_utils.get_catalog('gtfs_analytics_data')" ] }, - { - "cell_type": "code", - "execution_count": 6, - "id": "66ff6c3d-1386-47dd-b10e-7fff3f4ff470", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'gcs_paths': {'GCS': 'gs://calitp-analytics-data/data-analyses/', 'COMPILED_CACHED_VIEWS': '${.GCS}rt_delay/compiled_cached_views/', 'SEGMENT_GCS': '${.GCS}rt_segment_speeds/', 'SCHED_GCS': '${.GCS}gtfs_schedule/', 'RT_SCHED_GCS': '${.GCS}rt_vs_schedule/', 'SHARED_GCS': '${.GCS}shared_data/', 'PREDICTIONS_GCS': '${.GCS}rt_predictions/', 'PUBLIC_GCS': 'gs://calitp-publish-data-analysis/'}, 'speed_vars': {'timestamp_col': 'location_timestamp_local', 'max_speed': 80, 'time_min_cutoff': 10, 'timestamp_cols': ['location_timestamp_local', 'moving_timestamp_local']}, 'schedule_downloads': {'dir': '${gcs_paths.COMPILED_CACHED_VIEWS}', 'trips': 'trips', 'shapes': 'routelines', 'stops': 'stops', 'stop_times': 'st'}, 'speeds_tables': {'dir': '${gcs_paths.SEGMENT_GCS}', 'raw_vp': 'vp', 'usable_vp': 'vp_usable', 'vp_dwell': 'vp_usable_dwell', 'vp_condensed_line': 'condensed/vp_condensed', 'timestamp_col': '${speed_vars.timestamp_col}', 'time_min_cutoff': '${speed_vars.time_min_cutoff}'}, 'schedule_tables': {'dir': '${gcs_paths.SCHED_GCS}', 'gtfs_key_crosswalk': 'crosswalk/gtfs_key_organization', 'route_identification': 'standardized_route_ids', 'route_typologies': 'nacto_typologies/route_typologies', 'monthly_scheduled_service': 'scheduled_service_by_route', 'operator_scheduled_stats': 'operator_profiles/operator_scheduled_stats', 'operator_routes': 'operator_profiles/operator_routes'}, 'rt_vs_schedule_tables': {'dir': '${gcs_paths.RT_SCHED_GCS}', 'stop_times_direction': 'stop_times_direction', 'sched_trip_metrics': 'schedule_trip/schedule_trip_metrics', 'sched_route_direction_metrics': 'schedule_route_dir/schedule_route_direction_metrics', 'vp_trip_metrics': 'vp_trip/trip_metrics', 'vp_route_direction_metrics': 'vp_route_dir/route_direction_metrics', 'vp_operator_metrics': 'vp_operator/operator_metrics', 'sched_stop_metrics': 'schedule_stop/schedule_stop_metrics', 'schedule_rt_stop_times': 'schedule_rt_stop_times', 'early_trip_minutes': -5, 'late_trip_minutes': 5}, 'digest_tables': {'dir': '${gcs_paths.RT_SCHED_GCS}', 'route_schedule_vp': 'digest/schedule_vp_metrics', 'route_segment_speeds': 'digest/segment_speeds', 'route_segment_geometry': 'digest/segment_speeds_geom', 'operator_profiles': 'digest/operator_profiles', 'operator_routes_map': 'digest/operator_routes', 'operator_sched_rt': 'digest/operator_schedule_rt_category', 'scheduled_service_hours': 'digest/total_scheduled_service_hours'}, 'stop_segments': {'dir': '${gcs_paths.SEGMENT_GCS}', 'stage1': '${speeds_tables.vp_dwell}', 'stage2': 'nearest/nearest_vp_shape_segments', 'stage3': 'stop_arrivals', 'stage4': 'speeds_stop_segments', 'trip_stop_cols': ['trip_instance_key', 'stop_sequence'], 'shape_stop_cols': ['shape_array_key', 'shape_id', 'stop_sequence'], 'stop_pair_cols': ['stop_pair', 'stop_pair_name'], 'route_dir_cols': ['route_id', 'direction_id'], 'segment_cols': ['route_id', 'direction_id', 'stop_pair', 'geometry'], 'route_dir_single_segment': 'rollup_singleday/speeds_route_dir_segments', 'route_dir_single_segment_detail': 'rollup_singleday/speeds_route_dir_segments_detail', 'route_dir_multi_segment': 'rollup_multiday/speeds_route_dir_segments', 'segments_file': 'segment_options/shape_stop_segments', 'max_speed': '${speed_vars.max_speed}', 'route_dir_quarter_segment': 'rollup_multiday/quarter_speeds_route_dir_segments', 'route_dir_year_segment': 'rollup_multiday/year_speeds_route_dir_segments'}, 'rt_stop_times': {'dir': '${gcs_paths.SEGMENT_GCS}', 'stage1': '${speeds_tables.vp_dwell}', 'stage2': 'nearest/nearest_vp_rt_stop_times', 'stage3': 'rt_stop_times/stop_arrivals', 'stage4': 'rt_stop_times/speeds', 'trip_stop_cols': ['trip_instance_key', 'stop_sequence'], 'shape_stop_cols': ['shape_array_key', 'shape_id', 'stop_sequence'], 'stop_pair_cols': ['stop_pair', 'stop_pair_name'], 'route_dir_cols': ['route_id', 'direction_id'], 'segments_file': 'segment_options/stop_segments', 'trip_speeds_single_summary': 'rollup_singleday/speeds_trip', 'route_dir_single_summary': 'rollup_singleday/speeds_route_dir', 'route_dir_multi_summary': 'rollup_multiday/speeds_route_dir', 'min_trip_minutes': '${speed_vars.time_min_cutoff}', 'max_trip_minutes': 180, 'max_speed': '${speed_vars.max_speed}', 'min_meters_elapsed': 1609}, 'speedmap_segments': {'dir': '${gcs_paths.SEGMENT_GCS}', 'stage1': '${speeds_tables.vp_dwell}', 'proxy_stop_times': 'stop_time_expansion/speedmap_stop_times', 'stage2': 'nearest/nearest_vp_speedmap_proxy', 'stage3': 'speedmap/stop_arrivals_proxy', 'stage3b': 'speedmap/stop_arrivals', 'stage4': 'speedmap/speeds', 'trip_stop_cols': ['trip_instance_key', 'stop_sequence', 'stop_sequence1'], 'shape_stop_cols': ['shape_array_key', 'shape_id'], 'stop_pair_cols': ['stop_pair', 'stop_pair_name', 'segment_id'], 'route_dir_cols': ['route_id', 'direction_id'], 'segments_file': 'segment_options/speedmap_segments', 'shape_stop_single_segment': 'rollup_singleday/speeds_shape_speedmap_segments', 'shape_stop_single_segment_detail': 'rollup_singleday/speeds_shape_speedmap_segments_detail', 'route_dir_single_segment': 'rollup_singleday/speeds_route_dir_speedmap_segments', 'route_dir_multi_segment': 'rollup_multiday/speeds_route_dir_speedmap_segments', 'min_trip_minutes': '${speed_vars.time_min_cutoff}', 'max_trip_minutes': 180, 'max_speed': '${speed_vars.max_speed}', 'min_meters_elapsed': 1609, 'segment_meters': 1000}, 'road_segments': {'dir': '${gcs_paths.SEGMENT_GCS}', 'stage1': '${speeds_tables.vp_dwell}', 'proxy_stop_times': 'stop_time_expansion/roads_stop_times', 'stage2': 'nearest/nearest_vp_roads', 'stage3': 'road_segments/stop_arrivals', 'stage4': 'speeds_road_segments', 'road_cols': ['linearid', 'mtfcc'], 'road_segment_cols': ['linearid', 'mtfcc', 'segment_sequence'], 'trip_stop_cols': ['trip_instance_key', 'linaerid', 'mtfcc', 'segment_sequence'], 'timestamp_col': '${speed_vars.timestamp_col}'}, 'shared_data': {'dir': '${gcs_paths.SHARED_GCS}', 'road_segments_twomile': 'segmented_roads_twomile_2020', 'road_segments_onekm': 'segmented_roads_onekm_2020'}}" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "catalog" - ] - }, { "cell_type": "code", "execution_count": 7, @@ -359,245 +338,6 @@ "source": [ "cond2.vp_primary_direction.explode().value_counts()" ] - }, - { - "cell_type": "code", - "execution_count": 35, - "id": "8d04dc9c-2b04-43d3-97e4-b1e09feb1320", - "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", - "
trip_instance_keygeometryvp_idxlocation_timestamp_localmoving_timestamp_localvp_primary_direction
000001f273308970887743ce0c3acf068LINESTRING (-117.06536 32.56955, -117.06539 32...[8622806, 8622807, 8622808, 8622809, 8622812, ...[2025-01-15T18:02:45.000000, 2025-01-15T18:03:...[2025-01-15T18:02:45.000000, 2025-01-15T18:03:...[Unknown, Westbound, Northbound, Unknown, East...
100005ffae19105cd3addbd6642d7873aLINESTRING (-122.21661 37.79909, -122.21661 37...[12821471, 12821472, 12821474, 12821475, 12821...[2025-01-15T18:16:54.000000, 2025-01-15T18:17:...[2025-01-15T18:16:54.000000, 2025-01-15T18:17:...[Unknown, Unknown, Southbound, Northbound, Unk...
20000b6cbbfc0fb65ecefcc495349015eLINESTRING (-122.52319 37.97165, -122.52321 37...[14157063, 14157064, 14157065, 14157066, 14157...[2025-01-15T07:47:56.000000, 2025-01-15T07:48:...[2025-01-15T07:47:56.000000, 2025-01-15T07:48:...[Unknown, Southbound, Southbound, Northbound, ...
300012e56c8260fd35926619339b4fe17LINESTRING (-122.46008 37.70635, -122.46008 37...[10710639, 10710640, 10710648, 10710649, 10710...[2025-01-15T13:26:18.000000, 2025-01-15T13:26:...[2025-01-15T13:26:18.000000, 2025-01-15T13:28:...[Unknown, Unknown, Eastbound, Unknown, Eastbou...
40002cdd1d51f33e7543289688c01c6e5LINESTRING (-117.88335 33.91635, -117.88369 33...[9327071, 9327072, 9327073, 9327076, 9327077, ...[2025-01-15T16:10:31.000000, 2025-01-15T16:10:...[2025-01-15T16:10:31.000000, 2025-01-15T16:10:...[Unknown, Southbound, Unknown, Southbound, Sou...
.....................
90905fffdd30816e4022838ee42dd45e59318LINESTRING (-122.29901 37.90289, -122.29901 37...[14686171, 14686172, 14686193, 14686194, 14686...[2025-01-15T12:49:16.000000, 2025-01-15T12:49:...[2025-01-15T12:49:16.000000, 2025-01-15T12:56:...[Unknown, Unknown, Westbound, Westbound, Westb...
90906fffe75702726c5c94333254be21e475fLINESTRING (-117.15356 32.71582, -117.15356 32...[8085607, 8085608, 8085611, 8085612, 8085614, ...[2025-01-15T07:57:40.000000, 2025-01-15T07:58:...[2025-01-15T07:57:40.000000, 2025-01-15T07:59:...[Unknown, Unknown, Eastbound, Unknown, Westbou...
90907fffed00f13282ae103eb572cd9cb9d6bLINESTRING (-117.10793 32.66203, -117.10793 32...[8197030, 8197031, 8197032, 8197033, 8197034, ...[2025-01-15T17:58:12.000000, 2025-01-15T17:58:...[2025-01-15T17:58:12.000000, 2025-01-15T17:58:...[Unknown, Unknown, Southbound, Northbound, Nor...
90908fffed04d5fcb59b478ff147c07f5e948LINESTRING (-122.50857 37.76033, -122.50857 37...[11921403, 11921404, 11921410, 11921411, 11921...[2025-01-15T21:07:00.000000, 2025-01-15T21:07:...[2025-01-15T21:07:00.000000, 2025-01-15T21:08:...[Unknown, Unknown, Eastbound, Unknown, Northbo...
90909fffedef7f35089715dc786c7398ce3acLINESTRING (-121.76472 38.65993, -121.76444 38...[6072838, 6072839, 6072840, 6072841, 6072844, ...[2025-01-15T14:59:35.000000, 2025-01-15T14:59:...[2025-01-15T14:59:35.000000, 2025-01-15T14:59:...[Unknown, Eastbound, Eastbound, Unknown, Eastb...
\n", - "

90910 rows × 6 columns

\n", - "
" - ], - "text/plain": [ - " trip_instance_key \\\n", - "0 00001f273308970887743ce0c3acf068 \n", - "1 00005ffae19105cd3addbd6642d7873a \n", - "2 0000b6cbbfc0fb65ecefcc495349015e \n", - "3 00012e56c8260fd35926619339b4fe17 \n", - "4 0002cdd1d51f33e7543289688c01c6e5 \n", - "... ... \n", - "90905 fffdd30816e4022838ee42dd45e59318 \n", - "90906 fffe75702726c5c94333254be21e475f \n", - "90907 fffed00f13282ae103eb572cd9cb9d6b \n", - "90908 fffed04d5fcb59b478ff147c07f5e948 \n", - "90909 fffedef7f35089715dc786c7398ce3ac \n", - "\n", - " geometry \\\n", - "0 LINESTRING (-117.06536 32.56955, -117.06539 32... \n", - "1 LINESTRING (-122.21661 37.79909, -122.21661 37... \n", - "2 LINESTRING (-122.52319 37.97165, -122.52321 37... \n", - "3 LINESTRING (-122.46008 37.70635, -122.46008 37... \n", - "4 LINESTRING (-117.88335 33.91635, -117.88369 33... \n", - "... ... \n", - "90905 LINESTRING (-122.29901 37.90289, -122.29901 37... \n", - "90906 LINESTRING (-117.15356 32.71582, -117.15356 32... \n", - "90907 LINESTRING (-117.10793 32.66203, -117.10793 32... \n", - "90908 LINESTRING (-122.50857 37.76033, -122.50857 37... \n", - "90909 LINESTRING (-121.76472 38.65993, -121.76444 38... \n", - "\n", - " vp_idx \\\n", - "0 [8622806, 8622807, 8622808, 8622809, 8622812, ... \n", - "1 [12821471, 12821472, 12821474, 12821475, 12821... \n", - "2 [14157063, 14157064, 14157065, 14157066, 14157... \n", - "3 [10710639, 10710640, 10710648, 10710649, 10710... \n", - "4 [9327071, 9327072, 9327073, 9327076, 9327077, ... \n", - "... ... \n", - "90905 [14686171, 14686172, 14686193, 14686194, 14686... \n", - "90906 [8085607, 8085608, 8085611, 8085612, 8085614, ... \n", - "90907 [8197030, 8197031, 8197032, 8197033, 8197034, ... \n", - "90908 [11921403, 11921404, 11921410, 11921411, 11921... \n", - "90909 [6072838, 6072839, 6072840, 6072841, 6072844, ... \n", - "\n", - " location_timestamp_local \\\n", - "0 [2025-01-15T18:02:45.000000, 2025-01-15T18:03:... \n", - "1 [2025-01-15T18:16:54.000000, 2025-01-15T18:17:... \n", - "2 [2025-01-15T07:47:56.000000, 2025-01-15T07:48:... \n", - "3 [2025-01-15T13:26:18.000000, 2025-01-15T13:26:... \n", - "4 [2025-01-15T16:10:31.000000, 2025-01-15T16:10:... \n", - "... ... \n", - "90905 [2025-01-15T12:49:16.000000, 2025-01-15T12:49:... \n", - "90906 [2025-01-15T07:57:40.000000, 2025-01-15T07:58:... \n", - "90907 [2025-01-15T17:58:12.000000, 2025-01-15T17:58:... \n", - "90908 [2025-01-15T21:07:00.000000, 2025-01-15T21:07:... \n", - "90909 [2025-01-15T14:59:35.000000, 2025-01-15T14:59:... \n", - "\n", - " moving_timestamp_local \\\n", - "0 [2025-01-15T18:02:45.000000, 2025-01-15T18:03:... \n", - "1 [2025-01-15T18:16:54.000000, 2025-01-15T18:17:... \n", - "2 [2025-01-15T07:47:56.000000, 2025-01-15T07:48:... \n", - "3 [2025-01-15T13:26:18.000000, 2025-01-15T13:28:... \n", - "4 [2025-01-15T16:10:31.000000, 2025-01-15T16:10:... \n", - "... ... \n", - "90905 [2025-01-15T12:49:16.000000, 2025-01-15T12:56:... \n", - "90906 [2025-01-15T07:57:40.000000, 2025-01-15T07:59:... \n", - "90907 [2025-01-15T17:58:12.000000, 2025-01-15T17:58:... \n", - "90908 [2025-01-15T21:07:00.000000, 2025-01-15T21:08:... \n", - "90909 [2025-01-15T14:59:35.000000, 2025-01-15T14:59:... \n", - "\n", - " vp_primary_direction \n", - "0 [Unknown, Westbound, Northbound, Unknown, East... \n", - "1 [Unknown, Unknown, Southbound, Northbound, Unk... \n", - "2 [Unknown, Southbound, Southbound, Northbound, ... \n", - "3 [Unknown, Unknown, Eastbound, Unknown, Eastbou... \n", - "4 [Unknown, Southbound, Unknown, Southbound, Sou... \n", - "... ... \n", - "90905 [Unknown, Unknown, Westbound, Westbound, Westb... \n", - "90906 [Unknown, Unknown, Eastbound, Unknown, Westbou... \n", - "90907 [Unknown, Unknown, Southbound, Northbound, Nor... \n", - "90908 [Unknown, Unknown, Eastbound, Unknown, Northbo... \n", - "90909 [Unknown, Eastbound, Eastbound, Unknown, Eastb... \n", - "\n", - "[90910 rows x 6 columns]" - ] - }, - "execution_count": 35, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cond2.geometry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "1d7ae3b1-b3c7-47ab-939f-24917678961d", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { From 521af62d64559e043de1a161720bfd3adb6caebe Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Thu, 23 Jan 2025 15:58:01 +0000 Subject: [PATCH 15/17] revert speedmaps --- ca_transit_speed_maps/speedmap_utils.py | 2 + portfolio/rt/README.md | 2 + portfolio/rt/_toc.yml | 4 +- ...n_source_record_id_recaaoqedvwhcmivt.ipynb | 4 +- ...n_source_record_id_recynxkqeoo9djevw.ipynb | 4 +- ...n_source_record_id_recaa3naonr4a5rsj.ipynb | 4 +- ...n_source_record_id_recpwxkbgll4aiqxv.ipynb | 4 +- ...n_source_record_id_recpwbejxzlhqcjhe.ipynb | 4 +- ...n_source_record_id_reconkhqf25crjt4q.ipynb | 4 +- ...n_source_record_id_reci1funpr306h0hw.ipynb | 4 +- ...n_source_record_id_recx4zg2lvzb7kgal.ipynb | 4 +- ...n_source_record_id_reckn0q28coqdsy5l.ipynb | 4 +- ...n_source_record_id_recetov4xtjzdjtuj.ipynb | 4 +- ...n_source_record_id_recf7l9tozkxomqqz.ipynb | 4 +- ...n_source_record_id_recajnarpfek5qooe.ipynb | 4 +- ...n_source_record_id_rec43oyrfhtpddrhj.ipynb | 4 +- ...n_source_record_id_reczucqgqgtmpkpkc.ipynb | 4 +- ...n_source_record_id_recx9lccse1jmjsmg.ipynb | 4 +- ...n_source_record_id_rec3u4amplqobcotr.ipynb | 4 +- ...n_source_record_id_recs1jkez73hev8pj.ipynb | 4 +- ...n_source_record_id_rech2fdhvrl7nipha.ipynb | 4 +- ...n_source_record_id_recozgevyf7jimm9l.ipynb | 4 +- ...n_source_record_id_recvebksbc7uxlarc.ipynb | 4 +- ...n_source_record_id_recjnakvdegulsko3.ipynb | 4 +- ...n_source_record_id_rechaapwbeffo33ox.ipynb | 4 +- ...n_source_record_id_reczluqlw1y5oqqf8.ipynb | 4 +- ...n_source_record_id_recot6qbamloolcrm.ipynb | 4 +- ...n_source_record_id_recubgdxhpdx3494b.ipynb | 4 +- ...n_source_record_id_recsnvwvlqwgsoxle.ipynb | 4 +- ...n_source_record_id_recmb4uxrvlrxyf3l.ipynb | 4 +- ...n_source_record_id_recrm3c9zfaft4v2b.ipynb | 4 +- ...n_source_record_id_recn8ztmgbyzv1qxv.ipynb | 4 +- ...n_source_record_id_receejvegrhgotwgj.ipynb | 4 +- ...n_source_record_id_rec75nesvrqpwnilv.ipynb | 4 +- ...n_source_record_id_recox7qmhlprgfuz3.ipynb | 4 +- ...n_source_record_id_recans4m9ydhvdyob.ipynb | 4 +- ...n_source_record_id_recnob7pqbrlqvg5e.ipynb | 4 +- ...n_source_record_id_reciep8muucosbvbz.ipynb | 4 +- ...n_source_record_id_rec9rgrya9sjwyp2p.ipynb | 4 +- ...n_source_record_id_recsbfxgev9icdcy1.ipynb | 4 +- ...n_source_record_id_recmatcuqaurncs8j.ipynb | 4 +- ...n_source_record_id_recw3mrsmkdtnnvlt.ipynb | 4 +- ...n_source_record_id_recc5ct95eufmqcxr.ipynb | 4 +- ...n_source_record_id_recllbvvke1v4zszg.ipynb | 4 +- ...n_source_record_id_rec7shjfgrplu0yjy.ipynb | 4 +- ...n_source_record_id_recdupuxinmugxeiz.ipynb | 4 +- ...n_source_record_id_recumm4gcnxaqrwpn.ipynb | 4 +- ...n_source_record_id_recd9x7ghprn46v6m.ipynb | 4 +- ...n_source_record_id_reciknsntdkq0vsiv.ipynb | 4 +- ...n_source_record_id_recmm99msxjmc6ppv.ipynb | 4 +- ...n_source_record_id_rec9zgmjgnnes75k1.ipynb | 4 +- ...n_source_record_id_reckp33bhauzlmo1m.ipynb | 4 +- ...n_source_record_id_recezj9senp9vy3g0.ipynb | 4 +- ...n_source_record_id_reciakgbn1dp9dk9n.ipynb | 4 +- ...n_source_record_id_recswcrw6a6htmxj4.ipynb | 4 +- ...n_source_record_id_recdfxyxawqpiy4mw.ipynb | 4 +- ...n_source_record_id_rec0bkuhhaajtnilf.ipynb | 4 +- ...n_source_record_id_rec6gnibvkjdvy4ax.ipynb | 4 +- ...n_source_record_id_recih3vq8jwuujlvl.ipynb | 4 +- ...n_source_record_id_recziifqdl5axtpm1.ipynb | 4 +- ...n_source_record_id_rec5mljkragem8f6h.ipynb | 4 +- ...n_source_record_id_recwlwvtjxhivwjkt.ipynb | 4 +- portfolio/rt/district_07-los-angeles.md | 1 - ...n_source_record_id_recxswr0krrqtdjmg.ipynb | 3 - ...n_source_record_id_rec6z2ivjtxc8sag3.ipynb | 3 - ...n_source_record_id_recd4vzt0edc3vy7i.ipynb | 3 - ...n_source_record_id_recd0hxcumvmausdu.ipynb | 3 - ...n_source_record_id_rec5ome04bba9uf4y.ipynb | 3 - ...n_source_record_id_reczm8pd8widcdl0m.ipynb | 3 - ...n_source_record_id_recx4nqfuprqf3xgd.ipynb | 3 - ...n_source_record_id_recj8lxdesurpsrnu.ipynb | 3 - ...n_source_record_id_rec4pgjrmdhch4z01.ipynb | 3 - ...n_source_record_id_recojkzqsbze1hjvu.ipynb | 3 - ...n_source_record_id_recpkuzgzjcjk5grv.ipynb | 3 - ...n_source_record_id_reckqmudxuzhfmlvf.ipynb | 3 - ...n_source_record_id_reczf5y8r9cujmfsy.ipynb | 3 - ...n_source_record_id_rec8zhncpetu6qeih.ipynb | 3 - ...n_source_record_id_recimm5smw2zq9rmt.ipynb | 3 - ...n_source_record_id_recjhfdlpgrmifgnl.ipynb | 3 - ...n_source_record_id_rec1erin9gg1isk5w.ipynb | 3 - ...n_source_record_id_recpjulrjk1yn824n.ipynb | 3 - ...n_source_record_id_recvze9nxggmmqcth.ipynb | 3 - ...n_source_record_id_rec2lbe0ibkbakvqr.ipynb | 3 - ...n_source_record_id_recsqgaa8qiq8crjl.ipynb | 3 - ...n_source_record_id_recs7gnktcqvx20he.ipynb | 3 - ...n_source_record_id_rec00qszzl8kqixao.ipynb | 3 - ...n_source_record_id_recpngkwdpnr8jmhb.ipynb | 3 - ...n_source_record_id_recbw9vkdywikpiu4.ipynb | 3 - ...n_source_record_id_rec7en71rszxdfxzd.ipynb | 3 - ...n_source_record_id_recniasbsxcrslswe.ipynb | 4 +- ...n_source_record_id_recugkfhn2wxgk67h.ipynb | 4 +- ...n_source_record_id_reciwrbgysaim9ekk.ipynb | 4 +- ...n_source_record_id_rechbquam1bwewc3p.ipynb | 4 +- ...n_source_record_id_recg5axxdpi645s86.ipynb | 4 +- ...n_source_record_id_recgcv4niddjwvsin.ipynb | 4 +- ...n_source_record_id_recygajd92vlqio1p.ipynb | 4 +- ...n_source_record_id_recjcxmnc5mum2ude.ipynb | 4 +- ...n_source_record_id_recrajlnji206nnar.ipynb | 4 +- ...n_source_record_id_recnevoewwutye8xm.ipynb | 4 +- ...n_source_record_id_recmqvspdg6sltd6j.ipynb | 4 +- ...n_source_record_id_recpgyveu3vepmewx.ipynb | 4 +- ...n_source_record_id_reczgwvxkpix390of.ipynb | 4 +- ...n_source_record_id_recsiaammbxw7fuzs.ipynb | 4 +- ...n_source_record_id_reclbzt9triigwjbb.ipynb | 4 +- ...n_source_record_id_rech5ytfjpqvvibaf.ipynb | 4 +- ...n_source_record_id_recrbcrx4zvtyvsnm.ipynb | 4 +- ...n_source_record_id_recfblfddncxgifab.ipynb | 4 +- ...n_source_record_id_reczalk4vysuotvjf.ipynb | 4 +- ...n_source_record_id_recfma7gnr5lqtttg.ipynb | 4 +- portfolio/sites/rt.yml | 4 +- rt_segment_speeds/44_excluded_shapes.ipynb | 210 +++++++++++++++++- 111 files changed, 373 insertions(+), 244 deletions(-) delete mode 100644 portfolio/rt/district_07-los-angeles.md delete mode 100644 portfolio/rt/district_07-los-angeles/00__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recxswr0krrqtdjmg.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/01__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec6z2ivjtxc8sag3.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/02__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recd4vzt0edc3vy7i.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/03__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recd0hxcumvmausdu.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/04__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec5ome04bba9uf4y.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/05__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reczm8pd8widcdl0m.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/06__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recx4nqfuprqf3xgd.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/07__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recj8lxdesurpsrnu.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/08__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec4pgjrmdhch4z01.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/09__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recojkzqsbze1hjvu.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/10__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpkuzgzjcjk5grv.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/11__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reckqmudxuzhfmlvf.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/12__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reczf5y8r9cujmfsy.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/13__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec8zhncpetu6qeih.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/14__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recimm5smw2zq9rmt.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/15__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recjhfdlpgrmifgnl.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/16__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec1erin9gg1isk5w.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/17__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpjulrjk1yn824n.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/18__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recvze9nxggmmqcth.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/19__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec2lbe0ibkbakvqr.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/20__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recsqgaa8qiq8crjl.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/21__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recs7gnktcqvx20he.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/22__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec00qszzl8kqixao.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/23__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpngkwdpnr8jmhb.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/24__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recbw9vkdywikpiu4.ipynb delete mode 100644 portfolio/rt/district_07-los-angeles/25__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec7en71rszxdfxzd.ipynb diff --git a/ca_transit_speed_maps/speedmap_utils.py b/ca_transit_speed_maps/speedmap_utils.py index 6a3ecaf87..626e7b934 100644 --- a/ca_transit_speed_maps/speedmap_utils.py +++ b/ca_transit_speed_maps/speedmap_utils.py @@ -95,6 +95,8 @@ def map_excluded_shapes(existing_state: dict, speedmap_segs: gpd.GeoDataFrame, s excluded_shapes['info'] = "No data in time period" excluded_shapes.geometry = excluded_shapes.buffer(8) # for display + if excluded_shapes.empty: + return {} export_result = rt_utils.set_state_export(excluded_shapes, subfolder = update_vars_index.GEOJSON_SUBFOLDER, filename = filename, map_title = title, existing_state = existing_state) diff --git a/portfolio/rt/README.md b/portfolio/rt/README.md index dbca276c6..20e7626c2 100644 --- a/portfolio/rt/README.md +++ b/portfolio/rt/README.md @@ -45,6 +45,8 @@ We're aligining with segment speeds published via the [open data portal!](https: While the datasets don't fully match just yet, this site is now based on the same underlying data. This should help us update it more often, enhance accuracy for complex route shapes, and include as many transit operators as possible. The site also includes a more informative speed and variation by time of day chart at the bottom of the page. + +Route segments with no data are now shown as thin, dark gray or black segments on the maps. These may be due to the route not running at that time of day, or a data availability or processing issue. ## Data Sources Archived GTFS-Realtime Vehicle Positions data, plus corresponding GTFS Schedule data. diff --git a/portfolio/rt/_toc.yml b/portfolio/rt/_toc.yml index 704e6f5ef..0ea9e24bb 100644 --- a/portfolio/rt/_toc.yml +++ b/portfolio/rt/_toc.yml @@ -20,9 +20,9 @@ parts: - file: district_06-fresno.md sections: - glob: district_06-fresno/* - - file: district_07-los-angeles.md + - file: district_07-los-angeles-ventura.md sections: - - glob: district_07-los-angeles/* + - glob: district_07-los-angeles-ventura/* - file: district_08-san-bernardino.md sections: - glob: district_08-san-bernardino/* diff --git a/portfolio/rt/district_01-eureka/00__01_new_speedmaps__district_01-eureka__organization_source_record_id_recaaoqedvwhcmivt.ipynb b/portfolio/rt/district_01-eureka/00__01_new_speedmaps__district_01-eureka__organization_source_record_id_recaaoqedvwhcmivt.ipynb index 62e6c8695..f79b98391 100644 --- a/portfolio/rt/district_01-eureka/00__01_new_speedmaps__district_01-eureka__organization_source_record_id_recaaoqedvwhcmivt.ipynb +++ b/portfolio/rt/district_01-eureka/00__01_new_speedmaps__district_01-eureka__organization_source_record_id_recaaoqedvwhcmivt.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55e39163c6aa336b7952fb412a4d8ead9cb15d4d1ffa182c544af8d43fe1b76e -size 60288 +oid sha256:daeb7409e98a7ad8a7a457337026f02ff185bc4a52c6881ef0263a3dc0a1f60c +size 67267 diff --git a/portfolio/rt/district_01-eureka/01__01_new_speedmaps__district_01-eureka__organization_source_record_id_recynxkqeoo9djevw.ipynb b/portfolio/rt/district_01-eureka/01__01_new_speedmaps__district_01-eureka__organization_source_record_id_recynxkqeoo9djevw.ipynb index 6ddad9ed9..47dbdac61 100644 --- a/portfolio/rt/district_01-eureka/01__01_new_speedmaps__district_01-eureka__organization_source_record_id_recynxkqeoo9djevw.ipynb +++ b/portfolio/rt/district_01-eureka/01__01_new_speedmaps__district_01-eureka__organization_source_record_id_recynxkqeoo9djevw.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32a3f53856254b384aca0e92613d043c8a3b2be057c168d855c8e5fcf8a33ae4 -size 60293 +oid sha256:2c28d11e38c7a2c90db9e9ca2a32db159c79c352628cc96c89d36e9f90ab285a +size 67268 diff --git a/portfolio/rt/district_01-eureka/02__01_new_speedmaps__district_01-eureka__organization_source_record_id_recaa3naonr4a5rsj.ipynb b/portfolio/rt/district_01-eureka/02__01_new_speedmaps__district_01-eureka__organization_source_record_id_recaa3naonr4a5rsj.ipynb index 7fdd26b9c..69b7e5016 100644 --- a/portfolio/rt/district_01-eureka/02__01_new_speedmaps__district_01-eureka__organization_source_record_id_recaa3naonr4a5rsj.ipynb +++ b/portfolio/rt/district_01-eureka/02__01_new_speedmaps__district_01-eureka__organization_source_record_id_recaa3naonr4a5rsj.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:349cab697520c2f12fb5dc2c62fe850ed2149f2c4394cca0d1dcb02efd4e2e5f -size 60567 +oid sha256:6e115399aeda7fd27f49aaf5ce2070460210eaf3cf69ad132d811860b0d7ae44 +size 67807 diff --git a/portfolio/rt/district_01-eureka/03__01_new_speedmaps__district_01-eureka__organization_source_record_id_recpwxkbgll4aiqxv.ipynb b/portfolio/rt/district_01-eureka/03__01_new_speedmaps__district_01-eureka__organization_source_record_id_recpwxkbgll4aiqxv.ipynb index 3ed9548e6..38f004b91 100644 --- a/portfolio/rt/district_01-eureka/03__01_new_speedmaps__district_01-eureka__organization_source_record_id_recpwxkbgll4aiqxv.ipynb +++ b/portfolio/rt/district_01-eureka/03__01_new_speedmaps__district_01-eureka__organization_source_record_id_recpwxkbgll4aiqxv.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c71a5d6bd08d3e680c3fd90986516505f282f90688c8cdc5cd097cd73cd57d5 -size 57643 +oid sha256:ee49a08b945af85ac03a356d879fab43412491aed641cbfa6040bad8c19fda7d +size 63953 diff --git a/portfolio/rt/district_01-eureka/04__01_new_speedmaps__district_01-eureka__organization_source_record_id_recpwbejxzlhqcjhe.ipynb b/portfolio/rt/district_01-eureka/04__01_new_speedmaps__district_01-eureka__organization_source_record_id_recpwbejxzlhqcjhe.ipynb index d57dda2a7..d90773da5 100644 --- a/portfolio/rt/district_01-eureka/04__01_new_speedmaps__district_01-eureka__organization_source_record_id_recpwbejxzlhqcjhe.ipynb +++ b/portfolio/rt/district_01-eureka/04__01_new_speedmaps__district_01-eureka__organization_source_record_id_recpwbejxzlhqcjhe.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:503fcc585761fa54ef37fdcb1af8d467ff8f1e95f8f641207177aa944b6df3a2 -size 60489 +oid sha256:e20ce2ab98fabfdefc19c05f4e678866505fa6a995a98fa6c78a09e9d7c7cc51 +size 67757 diff --git a/portfolio/rt/district_01-eureka/05__01_new_speedmaps__district_01-eureka__organization_source_record_id_reconkhqf25crjt4q.ipynb b/portfolio/rt/district_01-eureka/05__01_new_speedmaps__district_01-eureka__organization_source_record_id_reconkhqf25crjt4q.ipynb index dc92926ad..446a11316 100644 --- a/portfolio/rt/district_01-eureka/05__01_new_speedmaps__district_01-eureka__organization_source_record_id_reconkhqf25crjt4q.ipynb +++ b/portfolio/rt/district_01-eureka/05__01_new_speedmaps__district_01-eureka__organization_source_record_id_reconkhqf25crjt4q.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ff73c506d1135dd8dc36a49bc3e84a733388f2c610656327c923fbd244675e6e -size 57768 +oid sha256:398f6389acd2bf1d22a9396cffcf0f8a23c23a859a7e7344a0268e27b31558cd +size 64262 diff --git a/portfolio/rt/district_02-redding/00__01_new_speedmaps__district_02-redding__organization_source_record_id_reci1funpr306h0hw.ipynb b/portfolio/rt/district_02-redding/00__01_new_speedmaps__district_02-redding__organization_source_record_id_reci1funpr306h0hw.ipynb index 72efa7fe0..198869244 100644 --- a/portfolio/rt/district_02-redding/00__01_new_speedmaps__district_02-redding__organization_source_record_id_reci1funpr306h0hw.ipynb +++ b/portfolio/rt/district_02-redding/00__01_new_speedmaps__district_02-redding__organization_source_record_id_reci1funpr306h0hw.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:994686c673ec47d79de4cd226dfad7ffe9a0580fc6001610731bf897e9248b6f -size 57712 +oid sha256:ebe4b596798722290ebffdd0487d70e97c26c0e87c10045c1115d984a386ed1f +size 64112 diff --git a/portfolio/rt/district_02-redding/01__01_new_speedmaps__district_02-redding__organization_source_record_id_recx4zg2lvzb7kgal.ipynb b/portfolio/rt/district_02-redding/01__01_new_speedmaps__district_02-redding__organization_source_record_id_recx4zg2lvzb7kgal.ipynb index 8edf43243..9722d57d1 100644 --- a/portfolio/rt/district_02-redding/01__01_new_speedmaps__district_02-redding__organization_source_record_id_recx4zg2lvzb7kgal.ipynb +++ b/portfolio/rt/district_02-redding/01__01_new_speedmaps__district_02-redding__organization_source_record_id_recx4zg2lvzb7kgal.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac5005273027579a30c2c71b7bc4dcc3bf10939af836eedb5bbc647eeefe6513 -size 57455 +oid sha256:8934b87f94be17c3ab540a2e65781d6807a324e26d6d97dcfca9f23f31604134 +size 63601 diff --git a/portfolio/rt/district_02-redding/02__01_new_speedmaps__district_02-redding__organization_source_record_id_reckn0q28coqdsy5l.ipynb b/portfolio/rt/district_02-redding/02__01_new_speedmaps__district_02-redding__organization_source_record_id_reckn0q28coqdsy5l.ipynb index bb4ee15f9..6f2b39c3b 100644 --- a/portfolio/rt/district_02-redding/02__01_new_speedmaps__district_02-redding__organization_source_record_id_reckn0q28coqdsy5l.ipynb +++ b/portfolio/rt/district_02-redding/02__01_new_speedmaps__district_02-redding__organization_source_record_id_reckn0q28coqdsy5l.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:27989461f47d3321ca4ad48b7fa49137c4252e42ba2762bcf6a521642dfee494 -size 57757 +oid sha256:899e21c3b2e87afbf8e8f3c62acc0ac7ffccaa4ec5fdbe92ea8714c49223e5ad +size 64169 diff --git a/portfolio/rt/district_02-redding/03__01_new_speedmaps__district_02-redding__organization_source_record_id_recetov4xtjzdjtuj.ipynb b/portfolio/rt/district_02-redding/03__01_new_speedmaps__district_02-redding__organization_source_record_id_recetov4xtjzdjtuj.ipynb index 3e74f4149..b2c780a21 100644 --- a/portfolio/rt/district_02-redding/03__01_new_speedmaps__district_02-redding__organization_source_record_id_recetov4xtjzdjtuj.ipynb +++ b/portfolio/rt/district_02-redding/03__01_new_speedmaps__district_02-redding__organization_source_record_id_recetov4xtjzdjtuj.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:048b35d5e637805545b59fbd25ce5af34ecf856bd66b46b8cc62e3371fbc868c -size 57467 +oid sha256:396fd9c04c2777b6ebdec37e09e227ef2e3b33f56421ed22f765921955bd8233 +size 63608 diff --git a/portfolio/rt/district_03-marysville/00__01_new_speedmaps__district_03-marysville__organization_source_record_id_recf7l9tozkxomqqz.ipynb b/portfolio/rt/district_03-marysville/00__01_new_speedmaps__district_03-marysville__organization_source_record_id_recf7l9tozkxomqqz.ipynb index fc5ec440f..7b3ad74f5 100644 --- a/portfolio/rt/district_03-marysville/00__01_new_speedmaps__district_03-marysville__organization_source_record_id_recf7l9tozkxomqqz.ipynb +++ b/portfolio/rt/district_03-marysville/00__01_new_speedmaps__district_03-marysville__organization_source_record_id_recf7l9tozkxomqqz.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be48a34aba910b0832fe69dbb7fe70411c9dde922c3f36fb7c8d3582648bc1d8 -size 60900 +oid sha256:2faf2964bf04754c8383473048f375b78ea26db1b4900acdbf13c144ccc868e2 +size 68399 diff --git a/portfolio/rt/district_03-marysville/01__01_new_speedmaps__district_03-marysville__organization_source_record_id_recajnarpfek5qooe.ipynb b/portfolio/rt/district_03-marysville/01__01_new_speedmaps__district_03-marysville__organization_source_record_id_recajnarpfek5qooe.ipynb index a7a7d39bd..174b36e99 100644 --- a/portfolio/rt/district_03-marysville/01__01_new_speedmaps__district_03-marysville__organization_source_record_id_recajnarpfek5qooe.ipynb +++ b/portfolio/rt/district_03-marysville/01__01_new_speedmaps__district_03-marysville__organization_source_record_id_recajnarpfek5qooe.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5dbd640e6821e548f8b844e0f35065a681cfe59ff81f894055f1ff09fd79d9a3 -size 45521 +oid sha256:dd51b26e38eadfa5dd1f446b44b09251beb23f23e6f24c1a3c3f15516157b230 +size 48493 diff --git a/portfolio/rt/district_03-marysville/02__01_new_speedmaps__district_03-marysville__organization_source_record_id_rec43oyrfhtpddrhj.ipynb b/portfolio/rt/district_03-marysville/02__01_new_speedmaps__district_03-marysville__organization_source_record_id_rec43oyrfhtpddrhj.ipynb index 3f28e0796..e15bf61d2 100644 --- a/portfolio/rt/district_03-marysville/02__01_new_speedmaps__district_03-marysville__organization_source_record_id_rec43oyrfhtpddrhj.ipynb +++ b/portfolio/rt/district_03-marysville/02__01_new_speedmaps__district_03-marysville__organization_source_record_id_rec43oyrfhtpddrhj.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:588dca0694301ee8e17d4ee2ffb9a0929ce8c8734ad18169493d751cffa95933 -size 60496 +oid sha256:0ca6277c7bdc3fc07911c2c645aa072a47bec098cd8ac8e4726e4a33d3d174d9 +size 67637 diff --git a/portfolio/rt/district_03-marysville/03__01_new_speedmaps__district_03-marysville__organization_source_record_id_reczucqgqgtmpkpkc.ipynb b/portfolio/rt/district_03-marysville/03__01_new_speedmaps__district_03-marysville__organization_source_record_id_reczucqgqgtmpkpkc.ipynb index a2fccdaf6..48847bc7c 100644 --- a/portfolio/rt/district_03-marysville/03__01_new_speedmaps__district_03-marysville__organization_source_record_id_reczucqgqgtmpkpkc.ipynb +++ b/portfolio/rt/district_03-marysville/03__01_new_speedmaps__district_03-marysville__organization_source_record_id_reczucqgqgtmpkpkc.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62cf0d6cf9b0ee0b1c59616b854a84b593a4077adefb4e6a53c1bc7613e36132 -size 57465 +oid sha256:8d13311ea57b646841ce92b97bef90e43a3c30885ad455d710b0ca27258e3ab0 +size 63609 diff --git a/portfolio/rt/district_03-marysville/04__01_new_speedmaps__district_03-marysville__organization_source_record_id_recx9lccse1jmjsmg.ipynb b/portfolio/rt/district_03-marysville/04__01_new_speedmaps__district_03-marysville__organization_source_record_id_recx9lccse1jmjsmg.ipynb index 5de217d60..41a495e94 100644 --- a/portfolio/rt/district_03-marysville/04__01_new_speedmaps__district_03-marysville__organization_source_record_id_recx9lccse1jmjsmg.ipynb +++ b/portfolio/rt/district_03-marysville/04__01_new_speedmaps__district_03-marysville__organization_source_record_id_recx9lccse1jmjsmg.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6b6b41339022139e92ff16693181a5666b9484d20e780fee653e3103be43f3e3 -size 60817 +oid sha256:da07ece87fbac96dadea405f31e839245ffe14e670a2d0120373558ea9376944 +size 68267 diff --git a/portfolio/rt/district_03-marysville/05__01_new_speedmaps__district_03-marysville__organization_source_record_id_rec3u4amplqobcotr.ipynb b/portfolio/rt/district_03-marysville/05__01_new_speedmaps__district_03-marysville__organization_source_record_id_rec3u4amplqobcotr.ipynb index 5154cf704..ae6bf3594 100644 --- a/portfolio/rt/district_03-marysville/05__01_new_speedmaps__district_03-marysville__organization_source_record_id_rec3u4amplqobcotr.ipynb +++ b/portfolio/rt/district_03-marysville/05__01_new_speedmaps__district_03-marysville__organization_source_record_id_rec3u4amplqobcotr.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97b2d24cc971022902fa407ebdac789c558f88fabe2b88b747b76b9d752db4b3 -size 60668 +oid sha256:292707664d41ed07a6c940b799de2fab473877a01c9f0d682ac652c603c0dd20 +size 67965 diff --git a/portfolio/rt/district_03-marysville/06__01_new_speedmaps__district_03-marysville__organization_source_record_id_recs1jkez73hev8pj.ipynb b/portfolio/rt/district_03-marysville/06__01_new_speedmaps__district_03-marysville__organization_source_record_id_recs1jkez73hev8pj.ipynb index a05b9e44e..2e53ddcc7 100644 --- a/portfolio/rt/district_03-marysville/06__01_new_speedmaps__district_03-marysville__organization_source_record_id_recs1jkez73hev8pj.ipynb +++ b/portfolio/rt/district_03-marysville/06__01_new_speedmaps__district_03-marysville__organization_source_record_id_recs1jkez73hev8pj.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7c591ac824e3bd6ff300d15e643d754a57e4951a631430818e64f8ce33379f0 -size 60711 +oid sha256:498f2fd66b2ad05875a87e58c1c6b89c9ab0c2966d6b0f11f6ff133de909e691 +size 68041 diff --git a/portfolio/rt/district_03-marysville/07__01_new_speedmaps__district_03-marysville__organization_source_record_id_rech2fdhvrl7nipha.ipynb b/portfolio/rt/district_03-marysville/07__01_new_speedmaps__district_03-marysville__organization_source_record_id_rech2fdhvrl7nipha.ipynb index dca4998d9..7d33a45be 100644 --- a/portfolio/rt/district_03-marysville/07__01_new_speedmaps__district_03-marysville__organization_source_record_id_rech2fdhvrl7nipha.ipynb +++ b/portfolio/rt/district_03-marysville/07__01_new_speedmaps__district_03-marysville__organization_source_record_id_rech2fdhvrl7nipha.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44d2218f9fc265e0ffecabe811a0ee745bfbc9c1a8e5f6136a6046fc690371c5 -size 63643 +oid sha256:1f4af442f6e3a5d440ad23c2a962e8ae546e2208a83a15aeb28a555a5c217d37 +size 71912 diff --git a/portfolio/rt/district_04-oakland/00__01_new_speedmaps__district_04-oakland__organization_source_record_id_recozgevyf7jimm9l.ipynb b/portfolio/rt/district_04-oakland/00__01_new_speedmaps__district_04-oakland__organization_source_record_id_recozgevyf7jimm9l.ipynb index bb1c957ff..f4f22684d 100644 --- a/portfolio/rt/district_04-oakland/00__01_new_speedmaps__district_04-oakland__organization_source_record_id_recozgevyf7jimm9l.ipynb +++ b/portfolio/rt/district_04-oakland/00__01_new_speedmaps__district_04-oakland__organization_source_record_id_recozgevyf7jimm9l.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f7641c66d6cfeb32a58054a010d6f8f6990b4f5751a71adfed767100cfcef92 -size 63694 +oid sha256:e563173cb90f28fee0c8dc3a765220d67e2b1985e3c41cee75d2b4e35740160a +size 72013 diff --git a/portfolio/rt/district_04-oakland/01__01_new_speedmaps__district_04-oakland__organization_source_record_id_recvebksbc7uxlarc.ipynb b/portfolio/rt/district_04-oakland/01__01_new_speedmaps__district_04-oakland__organization_source_record_id_recvebksbc7uxlarc.ipynb index 0da9b99ee..f073ffd2e 100644 --- a/portfolio/rt/district_04-oakland/01__01_new_speedmaps__district_04-oakland__organization_source_record_id_recvebksbc7uxlarc.ipynb +++ b/portfolio/rt/district_04-oakland/01__01_new_speedmaps__district_04-oakland__organization_source_record_id_recvebksbc7uxlarc.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9240736752214e96348e970c1dd2addc138625b913ed6a15c2175fb98050f601 -size 51796 +oid sha256:ccf17daefe6fda8f8aef4604dbb1b4566499a083fb51d26338782e653750e3fd +size 56687 diff --git a/portfolio/rt/district_04-oakland/02__01_new_speedmaps__district_04-oakland__organization_source_record_id_recjnakvdegulsko3.ipynb b/portfolio/rt/district_04-oakland/02__01_new_speedmaps__district_04-oakland__organization_source_record_id_recjnakvdegulsko3.ipynb index 8b435f26e..ba4215819 100644 --- a/portfolio/rt/district_04-oakland/02__01_new_speedmaps__district_04-oakland__organization_source_record_id_recjnakvdegulsko3.ipynb +++ b/portfolio/rt/district_04-oakland/02__01_new_speedmaps__district_04-oakland__organization_source_record_id_recjnakvdegulsko3.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bebb9ff633fefd5e9c5c6694982e920775b422d529dcafaf2444789bac083afc -size 60843 +oid sha256:5bfcc8462687099777d3f46042757fbd6eaff1b0de84bad8aac0cd7a18c188dd +size 68330 diff --git a/portfolio/rt/district_04-oakland/03__01_new_speedmaps__district_04-oakland__organization_source_record_id_rechaapwbeffo33ox.ipynb b/portfolio/rt/district_04-oakland/03__01_new_speedmaps__district_04-oakland__organization_source_record_id_rechaapwbeffo33ox.ipynb index fc3779d74..a5a850ce1 100644 --- a/portfolio/rt/district_04-oakland/03__01_new_speedmaps__district_04-oakland__organization_source_record_id_rechaapwbeffo33ox.ipynb +++ b/portfolio/rt/district_04-oakland/03__01_new_speedmaps__district_04-oakland__organization_source_record_id_rechaapwbeffo33ox.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e547c00a24c6722bbfa3313a827cb1bd607e36ed6094fc49ee617f2386b1ca7e -size 63526 +oid sha256:7a2bf1103bfffc2d7d281c35f67077abe2144ce72d85a9ba68d4b8bee87c338c +size 71729 diff --git a/portfolio/rt/district_04-oakland/04__01_new_speedmaps__district_04-oakland__organization_source_record_id_reczluqlw1y5oqqf8.ipynb b/portfolio/rt/district_04-oakland/04__01_new_speedmaps__district_04-oakland__organization_source_record_id_reczluqlw1y5oqqf8.ipynb index 51383f4f0..e8d1b8c36 100644 --- a/portfolio/rt/district_04-oakland/04__01_new_speedmaps__district_04-oakland__organization_source_record_id_reczluqlw1y5oqqf8.ipynb +++ b/portfolio/rt/district_04-oakland/04__01_new_speedmaps__district_04-oakland__organization_source_record_id_reczluqlw1y5oqqf8.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2984e4f7ad78a8c9bfdfaaa420adddcaecd5d3b4bde8476c30091f26d996e682 -size 60287 +oid sha256:9e5c86c7ebb0e3a4042da48ca1089c932db35c5ee52b675b121cf5c6305bedf5 +size 67292 diff --git a/portfolio/rt/district_04-oakland/05__01_new_speedmaps__district_04-oakland__organization_source_record_id_recot6qbamloolcrm.ipynb b/portfolio/rt/district_04-oakland/05__01_new_speedmaps__district_04-oakland__organization_source_record_id_recot6qbamloolcrm.ipynb index 7333709bc..d4e34794f 100644 --- a/portfolio/rt/district_04-oakland/05__01_new_speedmaps__district_04-oakland__organization_source_record_id_recot6qbamloolcrm.ipynb +++ b/portfolio/rt/district_04-oakland/05__01_new_speedmaps__district_04-oakland__organization_source_record_id_recot6qbamloolcrm.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:058ca3807c69b3d07212ae49248d2b4a0130719f15edd53f00af9159c67b312d -size 57510 +oid sha256:8c0013e359689c1e5db56004afb980e551d001cc70b45be8d4dd65165096b250 +size 63731 diff --git a/portfolio/rt/district_04-oakland/06__01_new_speedmaps__district_04-oakland__organization_source_record_id_recubgdxhpdx3494b.ipynb b/portfolio/rt/district_04-oakland/06__01_new_speedmaps__district_04-oakland__organization_source_record_id_recubgdxhpdx3494b.ipynb index 72ccffaf4..f20d8fcbb 100644 --- a/portfolio/rt/district_04-oakland/06__01_new_speedmaps__district_04-oakland__organization_source_record_id_recubgdxhpdx3494b.ipynb +++ b/portfolio/rt/district_04-oakland/06__01_new_speedmaps__district_04-oakland__organization_source_record_id_recubgdxhpdx3494b.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6da5d7a0af042561d142f008c3ee6ab8ae053f069b028966c9e0bf8011e16df -size 57500 +oid sha256:2b7d869860a3fec4be5e73f40d3421c70a8961567c27e9899d84c30dc7bd2c1f +size 63722 diff --git a/portfolio/rt/district_04-oakland/07__01_new_speedmaps__district_04-oakland__organization_source_record_id_recsnvwvlqwgsoxle.ipynb b/portfolio/rt/district_04-oakland/07__01_new_speedmaps__district_04-oakland__organization_source_record_id_recsnvwvlqwgsoxle.ipynb index 82b49188b..a1aee957e 100644 --- a/portfolio/rt/district_04-oakland/07__01_new_speedmaps__district_04-oakland__organization_source_record_id_recsnvwvlqwgsoxle.ipynb +++ b/portfolio/rt/district_04-oakland/07__01_new_speedmaps__district_04-oakland__organization_source_record_id_recsnvwvlqwgsoxle.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61c5ce14672f3a78cfb000012f8948abaa27a100ba6e1f0c3729d39806085e63 -size 60362 +oid sha256:09bb4d000ee8cc0499868ae61d52185677d414dda1641af8ce56e56c2f49714d +size 67423 diff --git a/portfolio/rt/district_04-oakland/08__01_new_speedmaps__district_04-oakland__organization_source_record_id_recmb4uxrvlrxyf3l.ipynb b/portfolio/rt/district_04-oakland/08__01_new_speedmaps__district_04-oakland__organization_source_record_id_recmb4uxrvlrxyf3l.ipynb index b08c2d91a..f93056e98 100644 --- a/portfolio/rt/district_04-oakland/08__01_new_speedmaps__district_04-oakland__organization_source_record_id_recmb4uxrvlrxyf3l.ipynb +++ b/portfolio/rt/district_04-oakland/08__01_new_speedmaps__district_04-oakland__organization_source_record_id_recmb4uxrvlrxyf3l.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a33840e94979b3694b1da52a30bab701584d58e5e688a535af112d81a755c60e -size 60367 +oid sha256:932aec9500ef97452d39edd4fff73dabeaafea906646d2c5e973c569493ed7fd +size 67434 diff --git a/portfolio/rt/district_04-oakland/09__01_new_speedmaps__district_04-oakland__organization_source_record_id_recrm3c9zfaft4v2b.ipynb b/portfolio/rt/district_04-oakland/09__01_new_speedmaps__district_04-oakland__organization_source_record_id_recrm3c9zfaft4v2b.ipynb index b08fec289..2862aba25 100644 --- a/portfolio/rt/district_04-oakland/09__01_new_speedmaps__district_04-oakland__organization_source_record_id_recrm3c9zfaft4v2b.ipynb +++ b/portfolio/rt/district_04-oakland/09__01_new_speedmaps__district_04-oakland__organization_source_record_id_recrm3c9zfaft4v2b.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ea57acdc1fad2c51168efd22f6fb1cad400bf06fa881e736806a62dfbb4b736 -size 60359 +oid sha256:b22559ad114f7d0cc1e2d23e1d4f1e9428de14d1cfc5bde80e0a03f98db5c306 +size 67438 diff --git a/portfolio/rt/district_04-oakland/10__01_new_speedmaps__district_04-oakland__organization_source_record_id_recn8ztmgbyzv1qxv.ipynb b/portfolio/rt/district_04-oakland/10__01_new_speedmaps__district_04-oakland__organization_source_record_id_recn8ztmgbyzv1qxv.ipynb index ccf114910..eac9e9947 100644 --- a/portfolio/rt/district_04-oakland/10__01_new_speedmaps__district_04-oakland__organization_source_record_id_recn8ztmgbyzv1qxv.ipynb +++ b/portfolio/rt/district_04-oakland/10__01_new_speedmaps__district_04-oakland__organization_source_record_id_recn8ztmgbyzv1qxv.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8248feb3d3ba9b71bffc67ce3f178685e75962566ce8629f2ebc218f5b25c753 -size 58207 +oid sha256:2e76e64791b125583fab14be43d55d1c212a6482ae15d5403fe5a618d78ad10a +size 64999 diff --git a/portfolio/rt/district_04-oakland/11__01_new_speedmaps__district_04-oakland__organization_source_record_id_receejvegrhgotwgj.ipynb b/portfolio/rt/district_04-oakland/11__01_new_speedmaps__district_04-oakland__organization_source_record_id_receejvegrhgotwgj.ipynb index ec2896707..2f40989bf 100644 --- a/portfolio/rt/district_04-oakland/11__01_new_speedmaps__district_04-oakland__organization_source_record_id_receejvegrhgotwgj.ipynb +++ b/portfolio/rt/district_04-oakland/11__01_new_speedmaps__district_04-oakland__organization_source_record_id_receejvegrhgotwgj.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db9f54d57430434c828db03f579129990a1ab7e7d6ed093ff208541c914578c6 -size 63697 +oid sha256:c83d0d8087a151d57f375b96f560dab411fd1fc24f43f05c2a43218affd21e7c +size 72034 diff --git a/portfolio/rt/district_04-oakland/12__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec75nesvrqpwnilv.ipynb b/portfolio/rt/district_04-oakland/12__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec75nesvrqpwnilv.ipynb index 1c9e1fa15..046b4a243 100644 --- a/portfolio/rt/district_04-oakland/12__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec75nesvrqpwnilv.ipynb +++ b/portfolio/rt/district_04-oakland/12__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec75nesvrqpwnilv.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:480cb8280cfff0d48f8efba0f47db9c2ce78bff98731b420556db824b77fb878 -size 60975 +oid sha256:57ebb2e981f04ac4232978a0b35d909535c5cb13677e810c56a6523057a273fc +size 68569 diff --git a/portfolio/rt/district_04-oakland/13__01_new_speedmaps__district_04-oakland__organization_source_record_id_recox7qmhlprgfuz3.ipynb b/portfolio/rt/district_04-oakland/13__01_new_speedmaps__district_04-oakland__organization_source_record_id_recox7qmhlprgfuz3.ipynb index f03f94ea3..f330a9767 100644 --- a/portfolio/rt/district_04-oakland/13__01_new_speedmaps__district_04-oakland__organization_source_record_id_recox7qmhlprgfuz3.ipynb +++ b/portfolio/rt/district_04-oakland/13__01_new_speedmaps__district_04-oakland__organization_source_record_id_recox7qmhlprgfuz3.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e38d02577b95a2d52c76133ab43e9f8129ec4346d01b3f41e75282d953a172d1 -size 64159 +oid sha256:746ac0414d1aa08e2e29660e52a99bf9a163bd1ed9a09604e780d84bfae5e336 +size 72900 diff --git a/portfolio/rt/district_04-oakland/14__01_new_speedmaps__district_04-oakland__organization_source_record_id_recans4m9ydhvdyob.ipynb b/portfolio/rt/district_04-oakland/14__01_new_speedmaps__district_04-oakland__organization_source_record_id_recans4m9ydhvdyob.ipynb index beaac786e..fb5b023b3 100644 --- a/portfolio/rt/district_04-oakland/14__01_new_speedmaps__district_04-oakland__organization_source_record_id_recans4m9ydhvdyob.ipynb +++ b/portfolio/rt/district_04-oakland/14__01_new_speedmaps__district_04-oakland__organization_source_record_id_recans4m9ydhvdyob.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bd41007a862b6d5addcb1fc19250e6dbb7d498deaaf0eebb67a7756bcc06dcba -size 60911 +oid sha256:61e067eeb404d4466dd6c16f5c628bf74b7946b2609eb54e558bc677a23f37f4 +size 68464 diff --git a/portfolio/rt/district_04-oakland/15__01_new_speedmaps__district_04-oakland__organization_source_record_id_recnob7pqbrlqvg5e.ipynb b/portfolio/rt/district_04-oakland/15__01_new_speedmaps__district_04-oakland__organization_source_record_id_recnob7pqbrlqvg5e.ipynb index b5350775e..ebfed1718 100644 --- a/portfolio/rt/district_04-oakland/15__01_new_speedmaps__district_04-oakland__organization_source_record_id_recnob7pqbrlqvg5e.ipynb +++ b/portfolio/rt/district_04-oakland/15__01_new_speedmaps__district_04-oakland__organization_source_record_id_recnob7pqbrlqvg5e.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e34b264dc8cb644fe82f8609b85d71187a40887e5724e574eb8b3f475ec47f35 -size 63453 +oid sha256:5920a2031099a4fac81c2d67710b0170cd51b4cf9b5226eb215263ae68bb9e59 +size 71572 diff --git a/portfolio/rt/district_04-oakland/16__01_new_speedmaps__district_04-oakland__organization_source_record_id_reciep8muucosbvbz.ipynb b/portfolio/rt/district_04-oakland/16__01_new_speedmaps__district_04-oakland__organization_source_record_id_reciep8muucosbvbz.ipynb index 5ac6051bf..74571ded4 100644 --- a/portfolio/rt/district_04-oakland/16__01_new_speedmaps__district_04-oakland__organization_source_record_id_reciep8muucosbvbz.ipynb +++ b/portfolio/rt/district_04-oakland/16__01_new_speedmaps__district_04-oakland__organization_source_record_id_reciep8muucosbvbz.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a5ebea4848b93d05ec89c8479183549ffd351029edbd9e22ff0018b7fadeaaf -size 58174 +oid sha256:6f05379fe91cc4af54ffb64b1ad8bb7a4373e3587cc85590f554356220079620 +size 61913 diff --git a/portfolio/rt/district_04-oakland/17__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec9rgrya9sjwyp2p.ipynb b/portfolio/rt/district_04-oakland/17__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec9rgrya9sjwyp2p.ipynb index 003e580bc..02b791134 100644 --- a/portfolio/rt/district_04-oakland/17__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec9rgrya9sjwyp2p.ipynb +++ b/portfolio/rt/district_04-oakland/17__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec9rgrya9sjwyp2p.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a72b1b6b7576c1f9a7aa4508473a72957cbb2b07a81ea20764313c528606719 -size 57901 +oid sha256:3246f5312387e4f8e98479c19768d6a43ea9decc2c6a320e585fa2ca20a3876d +size 64489 diff --git a/portfolio/rt/district_04-oakland/18__01_new_speedmaps__district_04-oakland__organization_source_record_id_recsbfxgev9icdcy1.ipynb b/portfolio/rt/district_04-oakland/18__01_new_speedmaps__district_04-oakland__organization_source_record_id_recsbfxgev9icdcy1.ipynb index 659768282..4c45de911 100644 --- a/portfolio/rt/district_04-oakland/18__01_new_speedmaps__district_04-oakland__organization_source_record_id_recsbfxgev9icdcy1.ipynb +++ b/portfolio/rt/district_04-oakland/18__01_new_speedmaps__district_04-oakland__organization_source_record_id_recsbfxgev9icdcy1.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:208fc1e78047fcab912d4b30d00140d783ace55007f338d8a1580e2352d77839 -size 45453 +oid sha256:7d34477134865613cfe46759d39a99725032100a2854327db5a355cb031f395f +size 48407 diff --git a/portfolio/rt/district_04-oakland/19__01_new_speedmaps__district_04-oakland__organization_source_record_id_recmatcuqaurncs8j.ipynb b/portfolio/rt/district_04-oakland/19__01_new_speedmaps__district_04-oakland__organization_source_record_id_recmatcuqaurncs8j.ipynb index ee533ad90..90ab62f28 100644 --- a/portfolio/rt/district_04-oakland/19__01_new_speedmaps__district_04-oakland__organization_source_record_id_recmatcuqaurncs8j.ipynb +++ b/portfolio/rt/district_04-oakland/19__01_new_speedmaps__district_04-oakland__organization_source_record_id_recmatcuqaurncs8j.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:10ddce7af947a21cd3a82dad5f5c9b43ada618de74281f71f7bd0b9500ade12b -size 61250 +oid sha256:8d8f05852d752d69c3df42d8e6f97b838b0d915a815fbfbaeed177671b7e00c3 +size 69118 diff --git a/portfolio/rt/district_04-oakland/20__01_new_speedmaps__district_04-oakland__organization_source_record_id_recw3mrsmkdtnnvlt.ipynb b/portfolio/rt/district_04-oakland/20__01_new_speedmaps__district_04-oakland__organization_source_record_id_recw3mrsmkdtnnvlt.ipynb index aee4eef16..57838c56e 100644 --- a/portfolio/rt/district_04-oakland/20__01_new_speedmaps__district_04-oakland__organization_source_record_id_recw3mrsmkdtnnvlt.ipynb +++ b/portfolio/rt/district_04-oakland/20__01_new_speedmaps__district_04-oakland__organization_source_record_id_recw3mrsmkdtnnvlt.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:00ddd28390cb9b621286e2824a6a03594df20a94827a9a259b96f41dd9b9c379 -size 63581 +oid sha256:68c07a6b55b352118e33a81d1cb52bea03d0023c39eb6b47087736338dd8b542 +size 71811 diff --git a/portfolio/rt/district_04-oakland/21__01_new_speedmaps__district_04-oakland__organization_source_record_id_recc5ct95eufmqcxr.ipynb b/portfolio/rt/district_04-oakland/21__01_new_speedmaps__district_04-oakland__organization_source_record_id_recc5ct95eufmqcxr.ipynb index 8fbffbc77..df10c1740 100644 --- a/portfolio/rt/district_04-oakland/21__01_new_speedmaps__district_04-oakland__organization_source_record_id_recc5ct95eufmqcxr.ipynb +++ b/portfolio/rt/district_04-oakland/21__01_new_speedmaps__district_04-oakland__organization_source_record_id_recc5ct95eufmqcxr.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9974929bb97996e344783c06e1c0c08b72eab6a313cb79f6f067381850bf7c73 -size 63865 +oid sha256:0e60a81239c5435df8e404ccf6fcfff08065ff1bfa90165522ab2b8b92f858d3 +size 72322 diff --git a/portfolio/rt/district_04-oakland/22__01_new_speedmaps__district_04-oakland__organization_source_record_id_recllbvvke1v4zszg.ipynb b/portfolio/rt/district_04-oakland/22__01_new_speedmaps__district_04-oakland__organization_source_record_id_recllbvvke1v4zszg.ipynb index f229f174d..873ef2698 100644 --- a/portfolio/rt/district_04-oakland/22__01_new_speedmaps__district_04-oakland__organization_source_record_id_recllbvvke1v4zszg.ipynb +++ b/portfolio/rt/district_04-oakland/22__01_new_speedmaps__district_04-oakland__organization_source_record_id_recllbvvke1v4zszg.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8731635c20481a66c61e6bcf7bd6ffdb4ebaa134be477f6eb178b6e730d3da61 -size 63209 +oid sha256:ce95bd80ab4f32ce92740b07d5b01d220aec2a6270127b6a60be51ecd831169e +size 71145 diff --git a/portfolio/rt/district_04-oakland/23__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec7shjfgrplu0yjy.ipynb b/portfolio/rt/district_04-oakland/23__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec7shjfgrplu0yjy.ipynb index ee8c39433..c17df4201 100644 --- a/portfolio/rt/district_04-oakland/23__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec7shjfgrplu0yjy.ipynb +++ b/portfolio/rt/district_04-oakland/23__01_new_speedmaps__district_04-oakland__organization_source_record_id_rec7shjfgrplu0yjy.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b120ab9314875d98e95a22768f3991aa824b14a97f6b3487afce1dba9468c376 -size 63479 +oid sha256:b5f9678ca6e52ad4500f4e43a4190ef8e8d83227333fcd2905926ef6028bce5e +size 71644 diff --git a/portfolio/rt/district_04-oakland/24__01_new_speedmaps__district_04-oakland__organization_source_record_id_recdupuxinmugxeiz.ipynb b/portfolio/rt/district_04-oakland/24__01_new_speedmaps__district_04-oakland__organization_source_record_id_recdupuxinmugxeiz.ipynb index 7613ca39a..e4d9df8b4 100644 --- a/portfolio/rt/district_04-oakland/24__01_new_speedmaps__district_04-oakland__organization_source_record_id_recdupuxinmugxeiz.ipynb +++ b/portfolio/rt/district_04-oakland/24__01_new_speedmaps__district_04-oakland__organization_source_record_id_recdupuxinmugxeiz.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:818bd61dd259fda189fc80138711672477c9e83dbd1d1529d552bfbd57ece88e -size 60249 +oid sha256:ecf38b65bbca967787ad8071c6e3faacf2a23b8edca8cc1c7a9ba399fb13d550 +size 67203 diff --git a/portfolio/rt/district_04-oakland/25__01_new_speedmaps__district_04-oakland__organization_source_record_id_recumm4gcnxaqrwpn.ipynb b/portfolio/rt/district_04-oakland/25__01_new_speedmaps__district_04-oakland__organization_source_record_id_recumm4gcnxaqrwpn.ipynb index fe96bf961..d6e3edfcc 100644 --- a/portfolio/rt/district_04-oakland/25__01_new_speedmaps__district_04-oakland__organization_source_record_id_recumm4gcnxaqrwpn.ipynb +++ b/portfolio/rt/district_04-oakland/25__01_new_speedmaps__district_04-oakland__organization_source_record_id_recumm4gcnxaqrwpn.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a204d739332e83a5d44df84e367259b5198d6e39207f76b1f1fe088f3fc3baad -size 60854 +oid sha256:5e2c805213c4f6fb9be2d170b8a7cae986dd099bb10eb8fbc4f2d4b824f0a424 +size 65303 diff --git a/portfolio/rt/district_04-oakland/26__01_new_speedmaps__district_04-oakland__organization_source_record_id_recd9x7ghprn46v6m.ipynb b/portfolio/rt/district_04-oakland/26__01_new_speedmaps__district_04-oakland__organization_source_record_id_recd9x7ghprn46v6m.ipynb index feb90b20e..eb6255199 100644 --- a/portfolio/rt/district_04-oakland/26__01_new_speedmaps__district_04-oakland__organization_source_record_id_recd9x7ghprn46v6m.ipynb +++ b/portfolio/rt/district_04-oakland/26__01_new_speedmaps__district_04-oakland__organization_source_record_id_recd9x7ghprn46v6m.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3772c87d05cc31e2cab4632a2afdb82a24261b85256738a7f7e6f9a0f19a79d2 -size 60709 +oid sha256:ec410dc6a65dc3a08d6dcbc062cb01ffe46d003e8db32d1e940e8c47efa39973 +size 68078 diff --git a/portfolio/rt/district_04-oakland/27__01_new_speedmaps__district_04-oakland__organization_source_record_id_reciknsntdkq0vsiv.ipynb b/portfolio/rt/district_04-oakland/27__01_new_speedmaps__district_04-oakland__organization_source_record_id_reciknsntdkq0vsiv.ipynb index 2a4a925f2..f213c643a 100644 --- a/portfolio/rt/district_04-oakland/27__01_new_speedmaps__district_04-oakland__organization_source_record_id_reciknsntdkq0vsiv.ipynb +++ b/portfolio/rt/district_04-oakland/27__01_new_speedmaps__district_04-oakland__organization_source_record_id_reciknsntdkq0vsiv.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c6078d48f4533eaee32d638523474d77582a245371c428615538276517f0577 -size 60806 +oid sha256:83cfddc0a60c43604dcd55d3a8379e379e96d97c1b035f953d2634d40fcc3320 +size 68299 diff --git a/portfolio/rt/district_05-san-luis-obispo/00__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recmm99msxjmc6ppv.ipynb b/portfolio/rt/district_05-san-luis-obispo/00__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recmm99msxjmc6ppv.ipynb index 5b74611e1..65890913b 100644 --- a/portfolio/rt/district_05-san-luis-obispo/00__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recmm99msxjmc6ppv.ipynb +++ b/portfolio/rt/district_05-san-luis-obispo/00__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recmm99msxjmc6ppv.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:779fc2dc8712c5b54179a5415e4a92cbe650c83bce2f5c5cd8e31b91b935af13 -size 60565 +oid sha256:1132137086f2d8bcb17eb03fa9ab8e6223f836e420499bc8c052924c250fe145 +size 67744 diff --git a/portfolio/rt/district_05-san-luis-obispo/01__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_rec9zgmjgnnes75k1.ipynb b/portfolio/rt/district_05-san-luis-obispo/01__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_rec9zgmjgnnes75k1.ipynb index f2d178324..b5bb7bebd 100644 --- a/portfolio/rt/district_05-san-luis-obispo/01__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_rec9zgmjgnnes75k1.ipynb +++ b/portfolio/rt/district_05-san-luis-obispo/01__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_rec9zgmjgnnes75k1.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e3a61a353867192af4535f68ee0512fb5f74acdb9a14fb48d5adc502af6b6141 -size 57565 +oid sha256:00a4773144016b3f430fc190d4fd7a2551beb4ffd3218735e9127c3bf60d843d +size 63827 diff --git a/portfolio/rt/district_05-san-luis-obispo/02__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_reckp33bhauzlmo1m.ipynb b/portfolio/rt/district_05-san-luis-obispo/02__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_reckp33bhauzlmo1m.ipynb index 2ebbad335..451a6230a 100644 --- a/portfolio/rt/district_05-san-luis-obispo/02__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_reckp33bhauzlmo1m.ipynb +++ b/portfolio/rt/district_05-san-luis-obispo/02__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_reckp33bhauzlmo1m.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7cf5251a6af2f0e6c16fceeec807bd1fc43c8087344b598d63e069192a1f326a -size 57460 +oid sha256:8b4074888f23fed55d873950bcc7f0683b2899f41e7493a6bb1680633163b093 +size 63650 diff --git a/portfolio/rt/district_05-san-luis-obispo/03__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recezj9senp9vy3g0.ipynb b/portfolio/rt/district_05-san-luis-obispo/03__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recezj9senp9vy3g0.ipynb index c993eebf0..40edb5e35 100644 --- a/portfolio/rt/district_05-san-luis-obispo/03__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recezj9senp9vy3g0.ipynb +++ b/portfolio/rt/district_05-san-luis-obispo/03__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recezj9senp9vy3g0.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ebb5f7e0526067484cbc3d25835c6b7251ae60f88611454078d8a82b6bf276f9 -size 60543 +oid sha256:ba7fc8a79d00a8b2cd07c4f2946cdad10c5ca3cbbd1cbffbbe39c0bb0d030b35 +size 67733 diff --git a/portfolio/rt/district_05-san-luis-obispo/04__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_reciakgbn1dp9dk9n.ipynb b/portfolio/rt/district_05-san-luis-obispo/04__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_reciakgbn1dp9dk9n.ipynb index 79f53c014..2ef5b5353 100644 --- a/portfolio/rt/district_05-san-luis-obispo/04__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_reciakgbn1dp9dk9n.ipynb +++ b/portfolio/rt/district_05-san-luis-obispo/04__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_reciakgbn1dp9dk9n.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e2434bb33928b83054be683f80901ec0d1ac19b3436fcab7db3dfd9d2f5dd4a4 -size 61039 +oid sha256:0f062eb3fdee8dc432605073ed26ad52770ba3cd86d62b09f34dcd05eb9f381a +size 68616 diff --git a/portfolio/rt/district_05-san-luis-obispo/05__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recswcrw6a6htmxj4.ipynb b/portfolio/rt/district_05-san-luis-obispo/05__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recswcrw6a6htmxj4.ipynb index 7a83cefff..554e3a757 100644 --- a/portfolio/rt/district_05-san-luis-obispo/05__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recswcrw6a6htmxj4.ipynb +++ b/portfolio/rt/district_05-san-luis-obispo/05__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recswcrw6a6htmxj4.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c2f34a27543831cbc7d2cb7712d29ada9ed13be6abbde7259edbc2b1b3e281e -size 60971 +oid sha256:e4cda0e33a04c5206e624a9f2ec5e7b170ad1440a484d1e63b30fa6b4215d062 +size 68564 diff --git a/portfolio/rt/district_05-san-luis-obispo/06__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recdfxyxawqpiy4mw.ipynb b/portfolio/rt/district_05-san-luis-obispo/06__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recdfxyxawqpiy4mw.ipynb index 160d559f2..149b25141 100644 --- a/portfolio/rt/district_05-san-luis-obispo/06__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recdfxyxawqpiy4mw.ipynb +++ b/portfolio/rt/district_05-san-luis-obispo/06__01_new_speedmaps__district_05-san-luis-obispo__organization_source_record_id_recdfxyxawqpiy4mw.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7b41851aac73d701f73c77f910938b957a820bf8cc73904be1c0245f847fd84 -size 60933 +oid sha256:21d27e0ee5b292e400df527d0241e90573b61014c435193cdad8a6dd37bc3ccc +size 68463 diff --git a/portfolio/rt/district_06-fresno/00__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec0bkuhhaajtnilf.ipynb b/portfolio/rt/district_06-fresno/00__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec0bkuhhaajtnilf.ipynb index 7fb177e9f..3910dfc7c 100644 --- a/portfolio/rt/district_06-fresno/00__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec0bkuhhaajtnilf.ipynb +++ b/portfolio/rt/district_06-fresno/00__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec0bkuhhaajtnilf.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3b0b0fa9ff8b82dccf07c5fdc014b98fc740e3a15cfd6b50d7f3dd0ea3764776 -size 60282 +oid sha256:fd23f577959f282122af8002bcd94457fcefe98d26f036ce6daeff7a6f97baee +size 67262 diff --git a/portfolio/rt/district_06-fresno/01__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec6gnibvkjdvy4ax.ipynb b/portfolio/rt/district_06-fresno/01__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec6gnibvkjdvy4ax.ipynb index d4a6ff2d8..b67785c39 100644 --- a/portfolio/rt/district_06-fresno/01__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec6gnibvkjdvy4ax.ipynb +++ b/portfolio/rt/district_06-fresno/01__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec6gnibvkjdvy4ax.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac79057c54e0714d62dcea1783a8f15d77c57981e9b24caef33db4b6aca951f7 -size 60318 +oid sha256:d97e1298f43c673760ed63656b0cd937fc6d9929498f9240b1352bfe5f298c3d +size 67316 diff --git a/portfolio/rt/district_06-fresno/02__01_new_speedmaps__district_06-fresno__organization_source_record_id_recih3vq8jwuujlvl.ipynb b/portfolio/rt/district_06-fresno/02__01_new_speedmaps__district_06-fresno__organization_source_record_id_recih3vq8jwuujlvl.ipynb index 1f4a89631..706629e48 100644 --- a/portfolio/rt/district_06-fresno/02__01_new_speedmaps__district_06-fresno__organization_source_record_id_recih3vq8jwuujlvl.ipynb +++ b/portfolio/rt/district_06-fresno/02__01_new_speedmaps__district_06-fresno__organization_source_record_id_recih3vq8jwuujlvl.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e3134c4ecea7e3475a73309be849c7ef927b8bdb404d6f5433a8790bd1a9664e -size 60659 +oid sha256:959b7d04f9d121ce1d79fc74e64d18fc9c9af37cf5164829fb5074b56ab68fc8 +size 67976 diff --git a/portfolio/rt/district_06-fresno/03__01_new_speedmaps__district_06-fresno__organization_source_record_id_recziifqdl5axtpm1.ipynb b/portfolio/rt/district_06-fresno/03__01_new_speedmaps__district_06-fresno__organization_source_record_id_recziifqdl5axtpm1.ipynb index 16d6233cb..f630212e2 100644 --- a/portfolio/rt/district_06-fresno/03__01_new_speedmaps__district_06-fresno__organization_source_record_id_recziifqdl5axtpm1.ipynb +++ b/portfolio/rt/district_06-fresno/03__01_new_speedmaps__district_06-fresno__organization_source_record_id_recziifqdl5axtpm1.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:783d1dfa639582a4d68bb6d12eade4f989d229b93b433dbfb65e2149b6c4f79c -size 62887 +oid sha256:4769f03558a1ad0091ede71252842d92c3028667bd64637897acfc975ad87676 +size 70577 diff --git a/portfolio/rt/district_06-fresno/04__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec5mljkragem8f6h.ipynb b/portfolio/rt/district_06-fresno/04__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec5mljkragem8f6h.ipynb index 1dca60471..e14fe31be 100644 --- a/portfolio/rt/district_06-fresno/04__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec5mljkragem8f6h.ipynb +++ b/portfolio/rt/district_06-fresno/04__01_new_speedmaps__district_06-fresno__organization_source_record_id_rec5mljkragem8f6h.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f6d2a2a9a67b5224e305aedfa2023fabf99ebc14d81d62fe0e46611d6631663 -size 57970 +oid sha256:1b9043ceab3eae25ed4b627de5f854a06b37b67b3bc7cd86967aac4dfda6a7be +size 64610 diff --git a/portfolio/rt/district_06-fresno/05__01_new_speedmaps__district_06-fresno__organization_source_record_id_recwlwvtjxhivwjkt.ipynb b/portfolio/rt/district_06-fresno/05__01_new_speedmaps__district_06-fresno__organization_source_record_id_recwlwvtjxhivwjkt.ipynb index c044aa82a..c606a0532 100644 --- a/portfolio/rt/district_06-fresno/05__01_new_speedmaps__district_06-fresno__organization_source_record_id_recwlwvtjxhivwjkt.ipynb +++ b/portfolio/rt/district_06-fresno/05__01_new_speedmaps__district_06-fresno__organization_source_record_id_recwlwvtjxhivwjkt.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0df90694495de3cda444bb03ea30a1e91b9d4cb6874e841bdc0472d9e4d72052 -size 57352 +oid sha256:06b70c3f833e3c5e27b74cab41a6944c0086508f5c454a832d4c4f5d18235329 +size 63499 diff --git a/portfolio/rt/district_07-los-angeles.md b/portfolio/rt/district_07-los-angeles.md deleted file mode 100644 index 79901aa5a..000000000 --- a/portfolio/rt/district_07-los-angeles.md +++ /dev/null @@ -1 +0,0 @@ -# District 07 - Los Angeles \ No newline at end of file diff --git a/portfolio/rt/district_07-los-angeles/00__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recxswr0krrqtdjmg.ipynb b/portfolio/rt/district_07-los-angeles/00__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recxswr0krrqtdjmg.ipynb deleted file mode 100644 index dfce6c4f7..000000000 --- a/portfolio/rt/district_07-los-angeles/00__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recxswr0krrqtdjmg.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:463d2154df4c615ee39618f398fccd4e59413ac1e29ac436f50e2319f6a4d0b6 -size 63569 diff --git a/portfolio/rt/district_07-los-angeles/01__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec6z2ivjtxc8sag3.ipynb b/portfolio/rt/district_07-los-angeles/01__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec6z2ivjtxc8sag3.ipynb deleted file mode 100644 index 2123672eb..000000000 --- a/portfolio/rt/district_07-los-angeles/01__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec6z2ivjtxc8sag3.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a6a1a60442de39ca0ea7b04b66000b12941b210f901a3de0ec034e6a6b7b4bdf -size 60366 diff --git a/portfolio/rt/district_07-los-angeles/02__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recd4vzt0edc3vy7i.ipynb b/portfolio/rt/district_07-los-angeles/02__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recd4vzt0edc3vy7i.ipynb deleted file mode 100644 index 9f7f1a424..000000000 --- a/portfolio/rt/district_07-los-angeles/02__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recd4vzt0edc3vy7i.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15048bf7b5076a7d4b5e39917cf20ccd05ae76ee85382e0423b62a8719b295ee -size 60352 diff --git a/portfolio/rt/district_07-los-angeles/03__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recd0hxcumvmausdu.ipynb b/portfolio/rt/district_07-los-angeles/03__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recd0hxcumvmausdu.ipynb deleted file mode 100644 index b11c178d4..000000000 --- a/portfolio/rt/district_07-los-angeles/03__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recd0hxcumvmausdu.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a5146ace70389fea2a7020ff93002c44f280baaf1eca9e294a7d662b6f14fee -size 60360 diff --git a/portfolio/rt/district_07-los-angeles/04__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec5ome04bba9uf4y.ipynb b/portfolio/rt/district_07-los-angeles/04__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec5ome04bba9uf4y.ipynb deleted file mode 100644 index 6ffc94461..000000000 --- a/portfolio/rt/district_07-los-angeles/04__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec5ome04bba9uf4y.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:085f17f903a9732ad2248aabdb3dc432b03f1df48987d7997cf0d5c73386128c -size 60474 diff --git a/portfolio/rt/district_07-los-angeles/05__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reczm8pd8widcdl0m.ipynb b/portfolio/rt/district_07-los-angeles/05__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reczm8pd8widcdl0m.ipynb deleted file mode 100644 index 88bff8fb7..000000000 --- a/portfolio/rt/district_07-los-angeles/05__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reczm8pd8widcdl0m.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bf38eabac4b7ade454711363547b3480ae68f51123366b23bb964d5815b7e798 -size 63102 diff --git a/portfolio/rt/district_07-los-angeles/06__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recx4nqfuprqf3xgd.ipynb b/portfolio/rt/district_07-los-angeles/06__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recx4nqfuprqf3xgd.ipynb deleted file mode 100644 index 303d7a680..000000000 --- a/portfolio/rt/district_07-los-angeles/06__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recx4nqfuprqf3xgd.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:429d436abdc3b4f02aa3375e8c4b7163e5798e12fa688ffbb422978387d62414 -size 60292 diff --git a/portfolio/rt/district_07-los-angeles/07__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recj8lxdesurpsrnu.ipynb b/portfolio/rt/district_07-los-angeles/07__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recj8lxdesurpsrnu.ipynb deleted file mode 100644 index 0c11ec31b..000000000 --- a/portfolio/rt/district_07-los-angeles/07__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recj8lxdesurpsrnu.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:05725a673a754c415d5a9378ae9d24cc0d7e74d19a5a3325c4d750b25dbe7cdf -size 54597 diff --git a/portfolio/rt/district_07-los-angeles/08__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec4pgjrmdhch4z01.ipynb b/portfolio/rt/district_07-los-angeles/08__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec4pgjrmdhch4z01.ipynb deleted file mode 100644 index a4ec67cac..000000000 --- a/portfolio/rt/district_07-los-angeles/08__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec4pgjrmdhch4z01.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c61752fd45c09274c57bfc09baaafecb7b840934718707324869b884259eefb -size 60365 diff --git a/portfolio/rt/district_07-los-angeles/09__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recojkzqsbze1hjvu.ipynb b/portfolio/rt/district_07-los-angeles/09__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recojkzqsbze1hjvu.ipynb deleted file mode 100644 index c0d10158c..000000000 --- a/portfolio/rt/district_07-los-angeles/09__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recojkzqsbze1hjvu.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e206788a8dca0da8c2262aea34ce0a66296d3d0d66f2ad451eb4da4910cc6ee -size 60342 diff --git a/portfolio/rt/district_07-los-angeles/10__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpkuzgzjcjk5grv.ipynb b/portfolio/rt/district_07-los-angeles/10__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpkuzgzjcjk5grv.ipynb deleted file mode 100644 index cadd0811c..000000000 --- a/portfolio/rt/district_07-los-angeles/10__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpkuzgzjcjk5grv.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ac83913ed2a60b7ad2337238aa29cbcb51ddd1e2f1d1da6d0aaa3e7c02ab223 -size 63109 diff --git a/portfolio/rt/district_07-los-angeles/11__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reckqmudxuzhfmlvf.ipynb b/portfolio/rt/district_07-los-angeles/11__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reckqmudxuzhfmlvf.ipynb deleted file mode 100644 index 46d0f0516..000000000 --- a/portfolio/rt/district_07-los-angeles/11__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reckqmudxuzhfmlvf.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5f13246a45acfd4049cefed449ae79dfc5d8b901c36097f7399e9087090c1846 -size 60247 diff --git a/portfolio/rt/district_07-los-angeles/12__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reczf5y8r9cujmfsy.ipynb b/portfolio/rt/district_07-los-angeles/12__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reczf5y8r9cujmfsy.ipynb deleted file mode 100644 index 9e8e825f8..000000000 --- a/portfolio/rt/district_07-los-angeles/12__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_reczf5y8r9cujmfsy.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9531580a512d91ee36b88577a75010bb2f245b13e6cc82aeac43690a5e98ce5d -size 57511 diff --git a/portfolio/rt/district_07-los-angeles/13__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec8zhncpetu6qeih.ipynb b/portfolio/rt/district_07-los-angeles/13__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec8zhncpetu6qeih.ipynb deleted file mode 100644 index c61e6de0a..000000000 --- a/portfolio/rt/district_07-los-angeles/13__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec8zhncpetu6qeih.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1efd84af8666eced86df5fa4362472c4457e1551078e823dbbdb579b7cb2d63 -size 60467 diff --git a/portfolio/rt/district_07-los-angeles/14__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recimm5smw2zq9rmt.ipynb b/portfolio/rt/district_07-los-angeles/14__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recimm5smw2zq9rmt.ipynb deleted file mode 100644 index 942f32b24..000000000 --- a/portfolio/rt/district_07-los-angeles/14__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recimm5smw2zq9rmt.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14d50826b31f9a8520a42a2171691b24009e00bcbf11f10100562be503f85c3b -size 60425 diff --git a/portfolio/rt/district_07-los-angeles/15__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recjhfdlpgrmifgnl.ipynb b/portfolio/rt/district_07-los-angeles/15__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recjhfdlpgrmifgnl.ipynb deleted file mode 100644 index e67ac3bf3..000000000 --- a/portfolio/rt/district_07-los-angeles/15__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recjhfdlpgrmifgnl.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8f87d49dff8eafe109bbf415454c4255a33992226ea55f7059836ab24c6826c6 -size 60440 diff --git a/portfolio/rt/district_07-los-angeles/16__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec1erin9gg1isk5w.ipynb b/portfolio/rt/district_07-los-angeles/16__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec1erin9gg1isk5w.ipynb deleted file mode 100644 index 2a4ea0ab3..000000000 --- a/portfolio/rt/district_07-los-angeles/16__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec1erin9gg1isk5w.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67d3c3c2eac34d4ad6ef755c9af66b46a93a038232be258d0d6023146308d0af -size 60411 diff --git a/portfolio/rt/district_07-los-angeles/17__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpjulrjk1yn824n.ipynb b/portfolio/rt/district_07-los-angeles/17__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpjulrjk1yn824n.ipynb deleted file mode 100644 index 893c7d956..000000000 --- a/portfolio/rt/district_07-los-angeles/17__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpjulrjk1yn824n.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e4fe77ad2b3b6e78c6edfdf12fb480d93a6942c94d35a4c13c43e5895ceca131 -size 60453 diff --git a/portfolio/rt/district_07-los-angeles/18__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recvze9nxggmmqcth.ipynb b/portfolio/rt/district_07-los-angeles/18__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recvze9nxggmmqcth.ipynb deleted file mode 100644 index 9a8ee72d9..000000000 --- a/portfolio/rt/district_07-los-angeles/18__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recvze9nxggmmqcth.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a2c1416f68a14256862065001439bc683cacef4165174ee7a1900957b427061 -size 60354 diff --git a/portfolio/rt/district_07-los-angeles/19__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec2lbe0ibkbakvqr.ipynb b/portfolio/rt/district_07-los-angeles/19__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec2lbe0ibkbakvqr.ipynb deleted file mode 100644 index be8f72891..000000000 --- a/portfolio/rt/district_07-los-angeles/19__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec2lbe0ibkbakvqr.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1f3bc39303a03737a9bd2b25a38e70549d2ab805336396d4eb098924a22a9a75 -size 54712 diff --git a/portfolio/rt/district_07-los-angeles/20__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recsqgaa8qiq8crjl.ipynb b/portfolio/rt/district_07-los-angeles/20__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recsqgaa8qiq8crjl.ipynb deleted file mode 100644 index 84c55e904..000000000 --- a/portfolio/rt/district_07-los-angeles/20__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recsqgaa8qiq8crjl.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f58792b86a4e4600395eeeae2922b0175ebab6ca92ad3423c06c5deace42b074 -size 63148 diff --git a/portfolio/rt/district_07-los-angeles/21__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recs7gnktcqvx20he.ipynb b/portfolio/rt/district_07-los-angeles/21__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recs7gnktcqvx20he.ipynb deleted file mode 100644 index b05bcd087..000000000 --- a/portfolio/rt/district_07-los-angeles/21__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recs7gnktcqvx20he.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:21f613490602abdac677f520203598ae44493d76181c96da7284cb07704d081e -size 60596 diff --git a/portfolio/rt/district_07-los-angeles/22__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec00qszzl8kqixao.ipynb b/portfolio/rt/district_07-los-angeles/22__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec00qszzl8kqixao.ipynb deleted file mode 100644 index 60883242b..000000000 --- a/portfolio/rt/district_07-los-angeles/22__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec00qszzl8kqixao.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7559b604df55607960646a9377e19598fd7814fa8624e35845477cb238db1c8a -size 60361 diff --git a/portfolio/rt/district_07-los-angeles/23__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpngkwdpnr8jmhb.ipynb b/portfolio/rt/district_07-los-angeles/23__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpngkwdpnr8jmhb.ipynb deleted file mode 100644 index acfdff483..000000000 --- a/portfolio/rt/district_07-los-angeles/23__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recpngkwdpnr8jmhb.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:01f3a2a4677019c5d990056407ce07da74195e1ab18dc0688293c040301590b7 -size 64186 diff --git a/portfolio/rt/district_07-los-angeles/24__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recbw9vkdywikpiu4.ipynb b/portfolio/rt/district_07-los-angeles/24__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recbw9vkdywikpiu4.ipynb deleted file mode 100644 index 31a216ee3..000000000 --- a/portfolio/rt/district_07-los-angeles/24__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_recbw9vkdywikpiu4.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27a3ce960050b19be447c54bad62f5a883776b618c2ee861683385df36432839 -size 48949 diff --git a/portfolio/rt/district_07-los-angeles/25__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec7en71rszxdfxzd.ipynb b/portfolio/rt/district_07-los-angeles/25__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec7en71rszxdfxzd.ipynb deleted file mode 100644 index 8076054df..000000000 --- a/portfolio/rt/district_07-los-angeles/25__01_new_speedmaps__district_07-los-angeles__organization_source_record_id_rec7en71rszxdfxzd.ipynb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:393741f195e40bf7227004c65ba6ce583a791570427ebac4086b77c1fb06c0de -size 60898 diff --git a/portfolio/rt/district_08-san-bernardino/00__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recniasbsxcrslswe.ipynb b/portfolio/rt/district_08-san-bernardino/00__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recniasbsxcrslswe.ipynb index be24b730d..6afda2a9d 100644 --- a/portfolio/rt/district_08-san-bernardino/00__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recniasbsxcrslswe.ipynb +++ b/portfolio/rt/district_08-san-bernardino/00__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recniasbsxcrslswe.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6269fe7a39578b92514fadd631b68343bff60eaf7df4e89901b6d579d92810ad -size 60304 +oid sha256:54287a03aff802708a30d965a12362a8342146a0b461736d8cb8c49a7ea991e7 +size 67261 diff --git a/portfolio/rt/district_08-san-bernardino/01__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recugkfhn2wxgk67h.ipynb b/portfolio/rt/district_08-san-bernardino/01__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recugkfhn2wxgk67h.ipynb index a5d8b266d..7956df80d 100644 --- a/portfolio/rt/district_08-san-bernardino/01__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recugkfhn2wxgk67h.ipynb +++ b/portfolio/rt/district_08-san-bernardino/01__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recugkfhn2wxgk67h.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b9f814c476b7bf4f792af1dc4f68579847afdc0db07f43e24fdf9c86edf8cca6 -size 60316 +oid sha256:cae585aca191fad1789daf5fa390e3d00eab23c4054de736247c264d86794365 +size 67319 diff --git a/portfolio/rt/district_08-san-bernardino/02__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_reciwrbgysaim9ekk.ipynb b/portfolio/rt/district_08-san-bernardino/02__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_reciwrbgysaim9ekk.ipynb index 9124fbe6d..f97156b1d 100644 --- a/portfolio/rt/district_08-san-bernardino/02__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_reciwrbgysaim9ekk.ipynb +++ b/portfolio/rt/district_08-san-bernardino/02__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_reciwrbgysaim9ekk.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34130c055286a2584a768d1217caa5bb095d9215a17f36eba65989ca8880bfbb -size 57547 +oid sha256:87a8c6679757e931b2579e06fe0567aa22c14d467659193ecc9d5e531606c928 +size 63748 diff --git a/portfolio/rt/district_08-san-bernardino/03__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_rechbquam1bwewc3p.ipynb b/portfolio/rt/district_08-san-bernardino/03__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_rechbquam1bwewc3p.ipynb index 45a6b1752..fbb84e521 100644 --- a/portfolio/rt/district_08-san-bernardino/03__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_rechbquam1bwewc3p.ipynb +++ b/portfolio/rt/district_08-san-bernardino/03__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_rechbquam1bwewc3p.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e47dfff8d0252988243f5148f35cc9133ba993602dd7bb4962fbfa88ec97e83b -size 60962 +oid sha256:36e6c0b1d29e7c66147beea9c9e54ce96efb52ea824e0d6f6a88674e56752ba4 +size 68492 diff --git a/portfolio/rt/district_08-san-bernardino/04__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recg5axxdpi645s86.ipynb b/portfolio/rt/district_08-san-bernardino/04__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recg5axxdpi645s86.ipynb index b3dc44615..66d3e8a85 100644 --- a/portfolio/rt/district_08-san-bernardino/04__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recg5axxdpi645s86.ipynb +++ b/portfolio/rt/district_08-san-bernardino/04__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recg5axxdpi645s86.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:37999e8c9ec2748d665cdcf2749573a134effc6a3131ee967bc8d26e431d5510 -size 62985 +oid sha256:cc12f981454c80f5babfcfc8fc1fd7b9e3e4b753521d18e5de3fbefe2f147663 +size 70629 diff --git a/portfolio/rt/district_08-san-bernardino/05__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recgcv4niddjwvsin.ipynb b/portfolio/rt/district_08-san-bernardino/05__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recgcv4niddjwvsin.ipynb index 2ef719092..059dcdbfd 100644 --- a/portfolio/rt/district_08-san-bernardino/05__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recgcv4niddjwvsin.ipynb +++ b/portfolio/rt/district_08-san-bernardino/05__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recgcv4niddjwvsin.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7012ce96f2b08c21f117ef6218ab23b9b7d033bebb3d2c8199e9177c432fd22 -size 57874 +oid sha256:9cf8a66012739023118613e1487d019c625ca6586a36e096de0ca6b83b520509 +size 64379 diff --git a/portfolio/rt/district_08-san-bernardino/06__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recygajd92vlqio1p.ipynb b/portfolio/rt/district_08-san-bernardino/06__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recygajd92vlqio1p.ipynb index 76c109a3a..e612c07bd 100644 --- a/portfolio/rt/district_08-san-bernardino/06__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recygajd92vlqio1p.ipynb +++ b/portfolio/rt/district_08-san-bernardino/06__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recygajd92vlqio1p.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f0d6aa2f41ae0eb0d59c20a799786f7ad196f526270f6c9d4be7e6c35ff7fd2 -size 63366 +oid sha256:97d5be14add6cd2facd16abfb4528b09d7979e2a98f4c629f64870fdec9ed357 +size 71376 diff --git a/portfolio/rt/district_08-san-bernardino/07__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recjcxmnc5mum2ude.ipynb b/portfolio/rt/district_08-san-bernardino/07__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recjcxmnc5mum2ude.ipynb index c4471a281..415d4a879 100644 --- a/portfolio/rt/district_08-san-bernardino/07__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recjcxmnc5mum2ude.ipynb +++ b/portfolio/rt/district_08-san-bernardino/07__01_new_speedmaps__district_08-san-bernardino__organization_source_record_id_recjcxmnc5mum2ude.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b3d53e79a33201007547b7605527b650c5c1279ef75dfd9f6dae226c76dded9 -size 60713 +oid sha256:88d943c67829ad865a870dfe48e8d84b5ba1016c41fdc1edad2b76f1ddef9efb +size 68055 diff --git a/portfolio/rt/district_09-bishop/00__01_new_speedmaps__district_09-bishop__organization_source_record_id_recrajlnji206nnar.ipynb b/portfolio/rt/district_09-bishop/00__01_new_speedmaps__district_09-bishop__organization_source_record_id_recrajlnji206nnar.ipynb index 6e40014d4..70a550019 100644 --- a/portfolio/rt/district_09-bishop/00__01_new_speedmaps__district_09-bishop__organization_source_record_id_recrajlnji206nnar.ipynb +++ b/portfolio/rt/district_09-bishop/00__01_new_speedmaps__district_09-bishop__organization_source_record_id_recrajlnji206nnar.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c76ddfdba335b19b12167edced7bdfdd0efc4fad353b3623fee34224070cd246 -size 63477 +oid sha256:0da9d5734d94e2564e31983e84463323ded4735f1f370391462b3d56f45f6026 +size 71677 diff --git a/portfolio/rt/district_10-stockton/00__01_new_speedmaps__district_10-stockton__organization_source_record_id_recnevoewwutye8xm.ipynb b/portfolio/rt/district_10-stockton/00__01_new_speedmaps__district_10-stockton__organization_source_record_id_recnevoewwutye8xm.ipynb index a05483cdc..6f90c1fcf 100644 --- a/portfolio/rt/district_10-stockton/00__01_new_speedmaps__district_10-stockton__organization_source_record_id_recnevoewwutye8xm.ipynb +++ b/portfolio/rt/district_10-stockton/00__01_new_speedmaps__district_10-stockton__organization_source_record_id_recnevoewwutye8xm.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a88d32397f93db50634827427e2bd963fc6a52fe66dc232257b873efe906a6fd -size 48627 +oid sha256:13227500a1e8931cfb323079c3d76c16a0769591cc426e00df44f07e7418c5ab +size 52386 diff --git a/portfolio/rt/district_10-stockton/01__01_new_speedmaps__district_10-stockton__organization_source_record_id_recmqvspdg6sltd6j.ipynb b/portfolio/rt/district_10-stockton/01__01_new_speedmaps__district_10-stockton__organization_source_record_id_recmqvspdg6sltd6j.ipynb index 464796852..3c7e4967b 100644 --- a/portfolio/rt/district_10-stockton/01__01_new_speedmaps__district_10-stockton__organization_source_record_id_recmqvspdg6sltd6j.ipynb +++ b/portfolio/rt/district_10-stockton/01__01_new_speedmaps__district_10-stockton__organization_source_record_id_recmqvspdg6sltd6j.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:587dfdc2375d92af909e84b28e2d5f941243469e74785995b5247c2ca0044924 -size 60385 +oid sha256:002d2ce42665df33aa110fad01cbc076c10972730402e72b500580437b54ff15 +size 67383 diff --git a/portfolio/rt/district_10-stockton/02__01_new_speedmaps__district_10-stockton__organization_source_record_id_recpgyveu3vepmewx.ipynb b/portfolio/rt/district_10-stockton/02__01_new_speedmaps__district_10-stockton__organization_source_record_id_recpgyveu3vepmewx.ipynb index b6d4df885..2c28e48a1 100644 --- a/portfolio/rt/district_10-stockton/02__01_new_speedmaps__district_10-stockton__organization_source_record_id_recpgyveu3vepmewx.ipynb +++ b/portfolio/rt/district_10-stockton/02__01_new_speedmaps__district_10-stockton__organization_source_record_id_recpgyveu3vepmewx.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d8ad115edbcf370297fbf61ce5925a5fc3047e904d500cc2369b14e532f86cd -size 48892 +oid sha256:094b9cdb14ef8be8d9f563ee0fb36ed86ca6f517a4f42c78bb8182e76128b921 +size 52883 diff --git a/portfolio/rt/district_10-stockton/03__01_new_speedmaps__district_10-stockton__organization_source_record_id_reczgwvxkpix390of.ipynb b/portfolio/rt/district_10-stockton/03__01_new_speedmaps__district_10-stockton__organization_source_record_id_reczgwvxkpix390of.ipynb index 6d610ece4..662ac8faa 100644 --- a/portfolio/rt/district_10-stockton/03__01_new_speedmaps__district_10-stockton__organization_source_record_id_reczgwvxkpix390of.ipynb +++ b/portfolio/rt/district_10-stockton/03__01_new_speedmaps__district_10-stockton__organization_source_record_id_reczgwvxkpix390of.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f1fc334390412429d79b62b376ec15a38ca17560778601c836279cfe71af80c5 -size 60874 +oid sha256:548a79ddb4bf8fbc415cccaec8a3fcaa02f24529680ccecea7324262f3482e7b +size 68340 diff --git a/portfolio/rt/district_10-stockton/04__01_new_speedmaps__district_10-stockton__organization_source_record_id_recsiaammbxw7fuzs.ipynb b/portfolio/rt/district_10-stockton/04__01_new_speedmaps__district_10-stockton__organization_source_record_id_recsiaammbxw7fuzs.ipynb index be87ff7be..32d7addf3 100644 --- a/portfolio/rt/district_10-stockton/04__01_new_speedmaps__district_10-stockton__organization_source_record_id_recsiaammbxw7fuzs.ipynb +++ b/portfolio/rt/district_10-stockton/04__01_new_speedmaps__district_10-stockton__organization_source_record_id_recsiaammbxw7fuzs.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb5988a35e3c9c1518d57dc555d0a207d880c492ce76638a78f29775e95cc171 -size 63768 +oid sha256:10e9c35387967652975db24675481248b462dd8d7917d6957b4230fbcbb53d3a +size 72093 diff --git a/portfolio/rt/district_10-stockton/05__01_new_speedmaps__district_10-stockton__organization_source_record_id_reclbzt9triigwjbb.ipynb b/portfolio/rt/district_10-stockton/05__01_new_speedmaps__district_10-stockton__organization_source_record_id_reclbzt9triigwjbb.ipynb index f3d77ed1a..85b4339f4 100644 --- a/portfolio/rt/district_10-stockton/05__01_new_speedmaps__district_10-stockton__organization_source_record_id_reclbzt9triigwjbb.ipynb +++ b/portfolio/rt/district_10-stockton/05__01_new_speedmaps__district_10-stockton__organization_source_record_id_reclbzt9triigwjbb.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c2c0fe35cfcb90a11f0297d2c9d1d98e39ffeb99b028f3f7b09e3d6a771836b -size 57783 +oid sha256:df31657746ac5acc373ad23f98422e097b2422fd05f8ea07c1dae8fa90ff1190 +size 64256 diff --git a/portfolio/rt/district_11-san-diego/00__01_new_speedmaps__district_11-san-diego__organization_source_record_id_rech5ytfjpqvvibaf.ipynb b/portfolio/rt/district_11-san-diego/00__01_new_speedmaps__district_11-san-diego__organization_source_record_id_rech5ytfjpqvvibaf.ipynb index 191473f15..02e80f9b0 100644 --- a/portfolio/rt/district_11-san-diego/00__01_new_speedmaps__district_11-san-diego__organization_source_record_id_rech5ytfjpqvvibaf.ipynb +++ b/portfolio/rt/district_11-san-diego/00__01_new_speedmaps__district_11-san-diego__organization_source_record_id_rech5ytfjpqvvibaf.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe7e7016811009bc98e792c29fe53c5d4d7c5dcaea632e67175c775c81d61bdd -size 63580 +oid sha256:fb520ccd7d09e09c6958569b4a56383c52d0112774a5a032345de2fe2337efe4 +size 71785 diff --git a/portfolio/rt/district_11-san-diego/01__01_new_speedmaps__district_11-san-diego__organization_source_record_id_recrbcrx4zvtyvsnm.ipynb b/portfolio/rt/district_11-san-diego/01__01_new_speedmaps__district_11-san-diego__organization_source_record_id_recrbcrx4zvtyvsnm.ipynb index b8b0ab156..e062490f4 100644 --- a/portfolio/rt/district_11-san-diego/01__01_new_speedmaps__district_11-san-diego__organization_source_record_id_recrbcrx4zvtyvsnm.ipynb +++ b/portfolio/rt/district_11-san-diego/01__01_new_speedmaps__district_11-san-diego__organization_source_record_id_recrbcrx4zvtyvsnm.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ab5390f63a14ddf61cec7d9c0453ade9813a947e893e37a8bf5dfa43d5b6be2 -size 60686 +oid sha256:1cb8e43aea4164af32a866a08ef930b060d4a57f6aa81d880f833e081e16eb7c +size 67981 diff --git a/portfolio/rt/district_11-san-diego/02__01_new_speedmaps__district_11-san-diego__organization_source_record_id_recfblfddncxgifab.ipynb b/portfolio/rt/district_11-san-diego/02__01_new_speedmaps__district_11-san-diego__organization_source_record_id_recfblfddncxgifab.ipynb index f4d23a983..bf76ea261 100644 --- a/portfolio/rt/district_11-san-diego/02__01_new_speedmaps__district_11-san-diego__organization_source_record_id_recfblfddncxgifab.ipynb +++ b/portfolio/rt/district_11-san-diego/02__01_new_speedmaps__district_11-san-diego__organization_source_record_id_recfblfddncxgifab.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd35709f116671836f3193383f1b7fc9bb79093e6cfd61e1e503378e53b39a1d -size 63553 +oid sha256:6c720865c295970124bd897e2b5ec3580213349d162152fe97e93d5c8cbf61ed +size 71731 diff --git a/portfolio/rt/district_11-san-diego/03__01_new_speedmaps__district_11-san-diego__organization_source_record_id_reczalk4vysuotvjf.ipynb b/portfolio/rt/district_11-san-diego/03__01_new_speedmaps__district_11-san-diego__organization_source_record_id_reczalk4vysuotvjf.ipynb index 0f56d0e1e..d42cd1cdf 100644 --- a/portfolio/rt/district_11-san-diego/03__01_new_speedmaps__district_11-san-diego__organization_source_record_id_reczalk4vysuotvjf.ipynb +++ b/portfolio/rt/district_11-san-diego/03__01_new_speedmaps__district_11-san-diego__organization_source_record_id_reczalk4vysuotvjf.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a4b71348001d314d2e68885aed3f0e81c15baebffdf32c82466944c3d66ed116 -size 63706 +oid sha256:e48f4d6e45e5ccd34e01c90508f4817ca8d00584be469386d2aff422e9a140a0 +size 72034 diff --git a/portfolio/rt/district_12-irvine/00__01_new_speedmaps__district_12-irvine__organization_source_record_id_recfma7gnr5lqtttg.ipynb b/portfolio/rt/district_12-irvine/00__01_new_speedmaps__district_12-irvine__organization_source_record_id_recfma7gnr5lqtttg.ipynb index 61e675dbc..1d5429aa7 100644 --- a/portfolio/rt/district_12-irvine/00__01_new_speedmaps__district_12-irvine__organization_source_record_id_recfma7gnr5lqtttg.ipynb +++ b/portfolio/rt/district_12-irvine/00__01_new_speedmaps__district_12-irvine__organization_source_record_id_recfma7gnr5lqtttg.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68ad11aea6281e379588431ddb12877a0a03306c781ff509c2a14b130c9855f3 -size 63750 +oid sha256:621fa2717126ad02049b8ec00b18df836653301a53ba885777fa4ce3999e8816 +size 72097 diff --git a/portfolio/sites/rt.yml b/portfolio/sites/rt.yml index 7dcfc2980..56304c0f6 100644 --- a/portfolio/sites/rt.yml +++ b/portfolio/sites/rt.yml @@ -85,9 +85,9 @@ parts: - organization_source_record_id: reczIiFqdL5AXTpm1 - organization_source_record_id: rec5MLJKrAgeM8f6H - organization_source_record_id: recWLwvtjXhiVWjKt - - caption: District 07 - Los Angeles + - caption: District 07 - Los Angeles / Ventura params: - district: 07 - Los Angeles + district: 07 - Los Angeles / Ventura sections: - organization_source_record_id: recxsWR0KRrQTdjmg - organization_source_record_id: rec6z2ivjTxc8Sag3 diff --git a/rt_segment_speeds/44_excluded_shapes.ipynb b/rt_segment_speeds/44_excluded_shapes.ipynb index 079e6397f..ffc24ea77 100644 --- a/rt_segment_speeds/44_excluded_shapes.ipynb +++ b/rt_segment_speeds/44_excluded_shapes.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "d528f399-cf33-459e-b5dc-92e0b4ae389a", "metadata": {}, "outputs": [], @@ -151,14 +151,218 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "598ce854-dbfa-4a75-9002-ff284f1b6bdf", "metadata": {}, - "outputs": [], + "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", + "
organization_nameorganization_source_record_idnamebase64_urlcaltrans_districtstatusanalysis_date
55City and County of San FranciscorechaapWbeffO33OXBay Area 511 Muni ScheduleaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...04 - Oaklandspeedmap_segs_available2024-12-11
\n", + "
" + ], + "text/plain": [ + " organization_name organization_source_record_id \\\n", + "55 City and County of San Francisco rechaapWbeffO33OX \n", + "\n", + " name \\\n", + "55 Bay Area 511 Muni Schedule \n", + "\n", + " base64_url caltrans_district \\\n", + "55 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... 04 - Oakland \n", + "\n", + " status analysis_date \n", + "55 speedmap_segs_available 2024-12-11 " + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "pd.read_parquet('../ca_transit_speed_maps/_rt_progress_2024-12-11.parquet').query('name.str.contains(\"Muni\")')" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "04f6fe44-dcbf-4783-a66a-2d71ee484497", + "metadata": {}, + "outputs": [], + "source": [ + "reciep8muucosbvbz" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "702f4416-749b-4ef0-8f83-c6c407c4b8c5", + "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", + "
organization_nameorganization_source_record_idnamebase64_urlcaltrans_districtstatusanalysis_date
27City of Santa ClaritarecImm5SmW2zq9rMTSanta Clarita ScheduleaHR0cHM6Ly9hcHBzLnNhbnRhY2xhcml0YXRyYW5zaXQuY2...07 - Los Angeles / Venturaspeedmap_segs_available2024-12-11
33Golden Empire Transit DistrictrecIh3vq8jwuuJlvLGET ScheduleaHR0cDovL2V0YS5nZXRidXMub3JnL3J0dC9wdWJsaWMvdX...06 - Fresnospeedmap_segs_available2024-12-11
44Mountain View Transportation Management Associ...recIeP8mUucOsbvbzBay Area 511 MVGO ScheduleaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...04 - Oaklandspeedmap_segs_available2024-12-11
53Western Contra Costa Transit AuthorityrecIKnsnTdKQ0vsivBay Area 511 WestCAT ScheduleaHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW...04 - Oaklandspeedmap_segs_available2024-12-11
65Redding Area Bus AuthorityrecI1fuNpr306H0hwRedding ScheduleaHR0cHM6Ly9ob3N0ZWQtZ3Rmcy1mZWVkcy5zMy5hbWF6b2...02 - Reddingspeedmap_segs_available2024-12-11
\n", + "
" + ], + "text/plain": [ + " organization_name \\\n", + "27 City of Santa Clarita \n", + "33 Golden Empire Transit District \n", + "44 Mountain View Transportation Management Associ... \n", + "53 Western Contra Costa Transit Authority \n", + "65 Redding Area Bus Authority \n", + "\n", + " organization_source_record_id name \\\n", + "27 recImm5SmW2zq9rMT Santa Clarita Schedule \n", + "33 recIh3vq8jwuuJlvL GET Schedule \n", + "44 recIeP8mUucOsbvbz Bay Area 511 MVGO Schedule \n", + "53 recIKnsnTdKQ0vsiv Bay Area 511 WestCAT Schedule \n", + "65 recI1fuNpr306H0hw Redding Schedule \n", + "\n", + " base64_url \\\n", + "27 aHR0cHM6Ly9hcHBzLnNhbnRhY2xhcml0YXRyYW5zaXQuY2... \n", + "33 aHR0cDovL2V0YS5nZXRidXMub3JnL3J0dC9wdWJsaWMvdX... \n", + "44 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... \n", + "53 aHR0cHM6Ly9hcGkuNTExLm9yZy90cmFuc2l0L2RhdGFmZW... \n", + "65 aHR0cHM6Ly9ob3N0ZWQtZ3Rmcy1mZWVkcy5zMy5hbWF6b2... \n", + "\n", + " caltrans_district status analysis_date \n", + "27 07 - Los Angeles / Ventura speedmap_segs_available 2024-12-11 \n", + "33 06 - Fresno speedmap_segs_available 2024-12-11 \n", + "44 04 - Oakland speedmap_segs_available 2024-12-11 \n", + "53 04 - Oakland speedmap_segs_available 2024-12-11 \n", + "65 02 - Redding speedmap_segs_available 2024-12-11 " + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pd.read_parquet('../ca_transit_speed_maps/_rt_progress_2024-12-11.parquet').query('organization_source_record_id.str.contains(\"recI\")')" + ] + }, { "cell_type": "code", "execution_count": null, From 49daeaedc58b7287d7ee53511a4aa3fe9a481de9 Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Thu, 13 Feb 2025 00:07:47 +0000 Subject: [PATCH 16/17] further investigation, find stop_pair issue --- rt_segment_speeds/45_diff_tables.ipynb | 217 +- .../48_investigate_further.ipynb | 2372 +++++++++++++++++ rt_segment_speeds/logs/avg_speeds.log | 2 +- rt_segment_speeds/logs/cut_stop_segments.log | 2 + .../logs/interpolate_stop_arrival.log | 1 + rt_segment_speeds/logs/nearest_vp.log | 1 + .../logs/speeds_by_segment_trip.log | 1 + 7 files changed, 2543 insertions(+), 53 deletions(-) create mode 100644 rt_segment_speeds/48_investigate_further.ipynb diff --git a/rt_segment_speeds/45_diff_tables.ipynb b/rt_segment_speeds/45_diff_tables.ipynb index 1954d64fa..a5b4ef868 100644 --- a/rt_segment_speeds/45_diff_tables.ipynb +++ b/rt_segment_speeds/45_diff_tables.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "d528f399-cf33-459e-b5dc-92e0b4ae389a", "metadata": {}, "outputs": [], @@ -19,7 +19,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "id": "42a16a99-113f-48e9-9f8e-f5cea66952ed", "metadata": {}, "outputs": [], @@ -41,7 +41,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "id": "6cd318e5-5c4e-4249-b158-232f4d940770", "metadata": {}, "outputs": [], @@ -51,7 +51,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 5, "id": "02f9dbd8-cc31-4a7e-bccc-f5241b9144bf", "metadata": {}, "outputs": [], @@ -61,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 6, "id": "292a5d47-daaf-47bf-976f-0f1b8e28cc77", "metadata": {}, "outputs": [ @@ -71,7 +71,7 @@ "['raw_vp', 'usable_vp', 'vp_dwell', 'vp_condensed_line']" ] }, - "execution_count": 8, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -82,7 +82,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 7, "id": "f7d06216-4755-44e2-afd3-2a2b8ac2e1f5", "metadata": {}, "outputs": [], @@ -92,23 +92,44 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 8, + "id": "3fa5e88a-16a6-4556-8d32-af691bcbbc7e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['vp', 'vp_usable', 'vp_usable_dwell', 'condensed/vp_condensed']" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "paths" + ] + }, + { + "cell_type": "code", + "execution_count": 19, "id": "8d30e38f-a1af-4528-8f9c-e0cf367e1623", "metadata": {}, "outputs": [], "source": [ - "def diff_vp_tables(paths: list, dates: tuple):\n", + "def diff_tables(paths: list, dates: tuple, gcs_dir = catalog.speeds_tables.dir):\n", " for table in paths:\n", " for date in dates:\n", " try:\n", - " path = f'{catalog.speeds_tables.dir}{table}_{date}.parquet'\n", + " path = f'{gcs_dir}{table}_{date}.parquet'\n", " df = pd.read_parquet(path)\n", " print(path)\n", " print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')\n", " print(df.info())\n", " print(f'unique trips: {len(df.trip_instance_key.unique())}')\n", " except:\n", - " path = f'{catalog.speeds_tables.dir}{table}_{date}/'\n", + " path = f'{gcs_dir}{table}_{date}/'\n", " ddf = dd.read_parquet(path)\n", " print(path)\n", " print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')\n", @@ -119,7 +140,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 20, "id": "81a221c1-7797-48ff-ad26-55acf5f90eec", "metadata": {}, "outputs": [], @@ -131,7 +152,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 21, "id": "8cf736da-4380-49bf-bcd2-db845b81e6a4", "metadata": {}, "outputs": [ @@ -141,7 +162,7 @@ "['vp', 'vp_usable', 'vp_usable_dwell', 'condensed/vp_condensed']" ] }, - "execution_count": 24, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -152,9 +173,11 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 22, "id": "f722eb8a-6d6f-4b33-8b85-5d008f2f682a", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", @@ -264,79 +287,169 @@ } ], "source": [ - "diff_vp_tables(paths, dates)" + "diff_tables(paths=paths, dates=dates)" ] }, { - "cell_type": "code", - "execution_count": 30, - "id": "58e76e14-1e69-4b11-a87b-9c7c8572e82d", - "metadata": {}, - "outputs": [], - "source": [ - "cond1 = gpd.read_parquet('gs://calitp-analytics-data/data-analyses/rt_segment_speeds/condensed/vp_condensed_2024-12-11.parquet')" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "id": "a50beca0-f0f2-48b0-bc28-b07b51f9b4ef", + "cell_type": "markdown", + "id": "573f80e1-fc06-4f29-8b05-849da0680db8", "metadata": {}, - "outputs": [], "source": [ - "cond2 = gpd.read_parquet('gs://calitp-analytics-data/data-analyses/rt_segment_speeds/condensed/vp_condensed_2025-01-15.parquet')" + "## compare stage4 (trip speeds)" ] }, { "cell_type": "code", - "execution_count": 33, - "id": "94107516-838d-4234-9ae0-53fc64a68183", + "execution_count": 15, + "id": "f1fde5f6-ba02-4c90-836e-649e19de684d", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Eastbound 2804652\n", - "Westbound 2771695\n", - "Southbound 2679640\n", - "Northbound 2672020\n", - "Unknown 1627534\n", - "Name: vp_primary_direction, dtype: int64" + "'gs://calitp-analytics-data/data-analyses/rt_segment_speeds/'" ] }, - "execution_count": 33, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "cond1.vp_primary_direction.explode().value_counts()" + "catalog.stop_segments.dir" ] }, { "cell_type": "code", - "execution_count": 34, - "id": "bb986dd0-00aa-43c2-85c6-befed15277e9", + "execution_count": 16, + "id": "8e9bc2a1-abef-4866-9cb4-bb4e93a8bede", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Eastbound 2825746\n", - "Westbound 2792007\n", - "Southbound 2703923\n", - "Northbound 2692053\n", - "Unknown 1628248\n", - "Name: vp_primary_direction, dtype: int64" + "'speeds_stop_segments'" ] }, - "execution_count": 34, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "cond2.vp_primary_direction.explode().value_counts()" + "catalog.stop_segments.stage4" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "430430b0-fd8a-45a9-9f17-3f0f23ff80b8", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/nearest/nearest_vp_shape_segments_2024-12-11.parquet\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "\n", + "Int64Index: 3120555 entries, 0 to 3120554\n", + "Data columns (total 8 columns):\n", + " # Column Dtype \n", + "--- ------ ----- \n", + " 0 trip_instance_key object \n", + " 1 stop_sequence int64 \n", + " 2 shape_array_key object \n", + " 3 stop_meters float64\n", + " 4 prior_vp_idx int64 \n", + " 5 subseq_vp_idx int64 \n", + " 6 prior_vp_meters int64 \n", + " 7 subseq_vp_meters float64\n", + "dtypes: float64(2), int64(4), object(2)\n", + "memory usage: 214.3+ MB\n", + "None\n", + "unique trips: 79652\n", + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/nearest/nearest_vp_shape_segments_2025-01-15.parquet\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "\n", + "Int64Index: 235003 entries, 0 to 235002\n", + "Data columns (total 8 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 trip_instance_key 235003 non-null object \n", + " 1 stop_sequence 235003 non-null int64 \n", + " 2 shape_array_key 235003 non-null object \n", + " 3 stop_meters 235003 non-null float64\n", + " 4 prior_vp_idx 235003 non-null int64 \n", + " 5 subseq_vp_idx 235003 non-null int64 \n", + " 6 prior_vp_meters 235003 non-null float64\n", + " 7 subseq_vp_meters 235003 non-null int64 \n", + "dtypes: float64(2), int64(4), object(2)\n", + "memory usage: 16.1+ MB\n", + "None\n", + "unique trips: 72366\n" + ] + } + ], + "source": [ + "diff_tables([catalog.stop_segments.stage2], dates, catalog.stop_segments.dir)" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "f12b6af2-953d-4c7b-8770-3cf880e96b88", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/nearest/nearest_vp_speedmap_proxy_2024-12-11.parquet\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "\n", + "Int64Index: 577121 entries, 0 to 577120\n", + "Data columns (total 9 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 trip_instance_key 577121 non-null object \n", + " 1 stop_sequence 577121 non-null int64 \n", + " 2 stop_sequence1 577121 non-null float64\n", + " 3 shape_array_key 577121 non-null object \n", + " 4 stop_meters 577121 non-null float64\n", + " 5 prior_vp_idx 577121 non-null int64 \n", + " 6 subseq_vp_idx 577121 non-null int64 \n", + " 7 prior_vp_meters 577121 non-null int64 \n", + " 8 subseq_vp_meters 577121 non-null float64\n", + "dtypes: float64(3), int64(4), object(2)\n", + "memory usage: 44.0+ MB\n", + "None\n", + "unique trips: 51468\n", + "gs://calitp-analytics-data/data-analyses/rt_segment_speeds/nearest/nearest_vp_speedmap_proxy_2025-01-15.parquet\n", + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "\n", + "Int64Index: 604807 entries, 0 to 604806\n", + "Data columns (total 9 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 trip_instance_key 604807 non-null object \n", + " 1 stop_sequence 604807 non-null int64 \n", + " 2 stop_sequence1 604807 non-null float64\n", + " 3 shape_array_key 604807 non-null object \n", + " 4 stop_meters 604807 non-null float64\n", + " 5 prior_vp_idx 604807 non-null int64 \n", + " 6 subseq_vp_idx 604807 non-null int64 \n", + " 7 prior_vp_meters 604807 non-null float64\n", + " 8 subseq_vp_meters 604807 non-null float64\n", + "dtypes: float64(4), int64(3), object(2)\n", + "memory usage: 46.1+ MB\n", + "None\n", + "unique trips: 51487\n" + ] + } + ], + "source": [ + "diff_tables([catalog.speedmap_segments.stage2], dates, catalog.speedmap_segments.dir)" ] } ], diff --git a/rt_segment_speeds/48_investigate_further.ipynb b/rt_segment_speeds/48_investigate_further.ipynb new file mode 100644 index 000000000..a1453231f --- /dev/null +++ b/rt_segment_speeds/48_investigate_further.ipynb @@ -0,0 +1,2372 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "d528f399-cf33-459e-b5dc-92e0b4ae389a", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import geopandas as gpd\n", + "from siuba import *\n", + "import shared_utils\n", + "\n", + "from calitp_data_analysis import get_fs, geography_utils\n", + "from segment_speed_utils import helpers, time_series_utils, gtfs_schedule_wrangling\n", + "from segment_speed_utils.project_vars import SCHED_GCS, SEGMENT_GCS, GTFS_DATA_DICT, analysis_date" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "42a16a99-113f-48e9-9f8e-f5cea66952ed", + "metadata": {}, + "outputs": [], + "source": [ + "import dask.dataframe as dd\n", + "import dask_geopandas as dg\n", + "from dask import delayed, compute" + ] + }, + { + "cell_type": "markdown", + "id": "83bf87cf-a9f5-4acd-afa6-d0d8920f4a73", + "metadata": {}, + "source": [ + "# Further investigation after 45_diff_tables\n", + "\n", + "* https://github.com/cal-itp/data-analyses/pull/1356\n", + "* average_segment_speeds looks OK\n", + "* issue upstream, specifically with differing segment definitions (stop_pair) supplied via https://github.com/cal-itp/data-analyses/blob/5e83acbafe8312415f1752f25083688561dd42a6/gtfs_funnel/stop_times_with_direction.py vs. those from `gtfs_segments`\n", + "* " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "6cd318e5-5c4e-4249-b158-232f4d940770", + "metadata": {}, + "outputs": [], + "source": [ + "catalog = shared_utils.catalog_utils.get_catalog('gtfs_analytics_data')" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "87d3822b-e000-40c8-99a9-8b88bb50364d", + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n", + "sys.path.append('./scripts')" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "f393cf1d-bf99-4d95-8df3-a351e6e07137", + "metadata": {}, + "outputs": [], + "source": [ + "import average_segment_speeds as aseg" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "ed2065bd-6b66-4623-92ca-5409ac798f65", + "metadata": {}, + "outputs": [], + "source": [ + "from segment_speed_utils.project_vars import analysis_date_list, oct2024_week" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "5369fb08-a16d-4bc0-9230-a47f0ce81272", + "metadata": {}, + "outputs": [], + "source": [ + "from shared_utils import time_helpers, dask_utils" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "e74bca08-b455-4139-a5c7-56b85e41c250", + "metadata": {}, + "outputs": [], + "source": [ + "import nearest_vp_to_stop as nvp\n", + "import pipeline_segment_speeds as ps" + ] + }, + { + "cell_type": "markdown", + "id": "e4c663e1-dc62-4c7f-815a-e48e52736b18", + "metadata": {}, + "source": [ + "## explode steps in: [nearest_vp_to_stop](https://github.com/cal-itp/data-analyses/blob/5e83acbafe8312415f1752f25083688561dd42a6/rt_segment_speeds/scripts/nearest_vp_to_stop.py#L20)\n", + "\n", + "Also compare with December." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "a6c22411-fd51-4214-a2b1-da6bce206cbd", + "metadata": {}, + "outputs": [], + "source": [ + "segment_type = \"stop_segments\"\n", + "# segment_type = \"speedmap_segments\"" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "f5f1f2f7-efee-4091-b14d-7e84bb16cfd6", + "metadata": {}, + "outputs": [], + "source": [ + "SEGMENT_FILE = GTFS_DATA_DICT[segment_type]['segments_file']" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "763e56ed-a8bd-42f0-826c-61e269095e4a", + "metadata": {}, + "outputs": [], + "source": [ + "analysis_date_dec = shared_utils.rt_dates.DATES['dec2024']" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "9a31e7f3-1d94-49de-b72f-08bf145ac5ee", + "metadata": {}, + "outputs": [], + "source": [ + "rt_trips = helpers.import_unique_vp_trips(analysis_date)\n", + "rt_trips2 = helpers.import_unique_vp_trips(analysis_date_dec)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "ef8fb6e2-be9a-4e40-a785-c34a6e782119", + "metadata": {}, + "outputs": [], + "source": [ + "shape_stop_combinations = pd.read_parquet(\n", + " f\"{SEGMENT_GCS}{SEGMENT_FILE}_{analysis_date}.parquet\",\n", + " columns = [\"trip_instance_key\",\n", + " \"stop_id1\", \"stop_pair\",\n", + " \"st_trip_instance_key\"],\n", + "filters = [[(\"trip_instance_key\", \"in\", rt_trips)]]).rename(columns = {\"stop_id1\": \"stop_id\"})" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "9b68691a-6962-4093-a7da-d0440f2cc3c4", + "metadata": {}, + "outputs": [], + "source": [ + "shape_stop_combinations2 = pd.read_parquet(\n", + " f\"{SEGMENT_GCS}{SEGMENT_FILE}_{shared_utils.rt_dates.DATES['dec2024']}.parquet\",\n", + " columns = [\"trip_instance_key\",\n", + " \"stop_id1\", \"stop_pair\",\n", + " \"st_trip_instance_key\"],\n", + "filters = [[(\"trip_instance_key\", \"in\", rt_trips2)]]).rename(columns = {\"stop_id1\": \"stop_id\"})" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "e1ef784d-156f-4466-9215-002c9dced420", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Int64Index: 3151412 entries, 0 to 3151411\n", + "Data columns (total 4 columns):\n", + " # Column Dtype \n", + "--- ------ ----- \n", + " 0 trip_instance_key object\n", + " 1 stop_id object\n", + " 2 stop_pair object\n", + " 3 st_trip_instance_key object\n", + "dtypes: object(4)\n", + "memory usage: 120.2+ MB\n" + ] + } + ], + "source": [ + "shape_stop_combinations.info()" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "6ea2ac1b-e3fa-43ae-998e-ae916c877917", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Int64Index: 3150548 entries, 0 to 3150652\n", + "Data columns (total 4 columns):\n", + " # Column Dtype \n", + "--- ------ ----- \n", + " 0 trip_instance_key object\n", + " 1 stop_id object\n", + " 2 stop_pair object\n", + " 3 st_trip_instance_key object\n", + "dtypes: object(4)\n", + "memory usage: 120.2+ MB\n" + ] + } + ], + "source": [ + "shape_stop_combinations2.info()" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "0692ff77-fee2-402c-abd8-f428f9d3d6fd", + "metadata": {}, + "outputs": [], + "source": [ + "subset_trips2 = shape_stop_combinations2.st_trip_instance_key.unique()" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "b3074fcb-b597-43b2-8642-366fde4a2af4", + "metadata": {}, + "outputs": [], + "source": [ + "subset_trips = shape_stop_combinations.st_trip_instance_key.unique()" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "a8ee02be-4725-401f-95c6-0a66f7b36c16", + "metadata": {}, + "outputs": [], + "source": [ + "# GTFS_DATA_DICT.rt_vs_schedule_tables.stop_times_direction\n", + "# written in gtfs_funnel/stop_times_with_direction.py\n", + "stops_to_use = helpers.import_scheduled_stop_times(\n", + " analysis_date,\n", + " columns = [\"trip_instance_key\", \"shape_array_key\",\n", + " \"stop_sequence\", \"stop_id\", \"stop_pair\",\n", + " \"stop_primary_direction\", \"geometry\"],\n", + " filters = [[(\"trip_instance_key\", \"in\", subset_trips)]],\n", + " get_pandas = True,\n", + " with_direction = True\n", + ").rename(columns = {\"trip_instance_key\": \"st_trip_instance_key\"})" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "d78bc54d-0441-4181-aaf5-d4a588326c69", + "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", + "
st_trip_instance_keyshape_array_keystop_sequencestop_idstop_pairstop_primary_directiongeometry
000001f273308970887743ce0c3acf0685abad00eed316250607a32ab7aa38fa718887888878__60308UnknownPOINT (275996.236 -600448.777)
100001f273308970887743ce0c3acf0685abad00eed316250607a32ab7aa38fa726030860308__60310EastboundPOINT (276129.555 -600498.971)
200001f273308970887743ce0c3acf0685abad00eed316250607a32ab7aa38fa736030960309__60249NorthboundPOINT (276315.087 -600745.139)
\n", + "
" + ], + "text/plain": [ + " st_trip_instance_key shape_array_key \\\n", + "0 00001f273308970887743ce0c3acf068 5abad00eed316250607a32ab7aa38fa7 \n", + "1 00001f273308970887743ce0c3acf068 5abad00eed316250607a32ab7aa38fa7 \n", + "2 00001f273308970887743ce0c3acf068 5abad00eed316250607a32ab7aa38fa7 \n", + "\n", + " stop_sequence stop_id stop_pair stop_primary_direction \\\n", + "0 1 88878 88878__60308 Unknown \n", + "1 2 60308 60308__60310 Eastbound \n", + "2 3 60309 60309__60249 Northbound \n", + "\n", + " geometry \n", + "0 POINT (275996.236 -600448.777) \n", + "1 POINT (276129.555 -600498.971) \n", + "2 POINT (276315.087 -600745.139) " + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "stops_to_use.head(3)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "d86add72-0c08-4262-a1be-d8ec0da936de", + "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", + "
trip_instance_keystop_idstop_pairst_trip_instance_key
000001f273308970887743ce0c3acf0688887888878__6030800001f273308970887743ce0c3acf068
100001f273308970887743ce0c3acf0686030860308__6030900001f273308970887743ce0c3acf068
200001f273308970887743ce0c3acf0686030960309__6031000001f273308970887743ce0c3acf068
\n", + "
" + ], + "text/plain": [ + " trip_instance_key stop_id stop_pair \\\n", + "0 00001f273308970887743ce0c3acf068 88878 88878__60308 \n", + "1 00001f273308970887743ce0c3acf068 60308 60308__60309 \n", + "2 00001f273308970887743ce0c3acf068 60309 60309__60310 \n", + "\n", + " st_trip_instance_key \n", + "0 00001f273308970887743ce0c3acf068 \n", + "1 00001f273308970887743ce0c3acf068 \n", + "2 00001f273308970887743ce0c3acf068 " + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "shape_stop_combinations.head(3)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "e13c5f90-7c3e-4ffa-b85f-6da54416e1fe", + "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", + "
trip_instance_keyroute_short_namenamefeed_keytrip_id
33114ffd7d651605dbca64e7b3f46945f5817194Foothill Schedulee920f063b73c35605bb16e98f63d2e6ft90B-b2812-sl5
\n", + "
" + ], + "text/plain": [ + " trip_instance_key route_short_name name \\\n", + "33114 ffd7d651605dbca64e7b3f46945f5817 194 Foothill Schedule \n", + "\n", + " feed_key trip_id \n", + "33114 e920f063b73c35605bb16e98f63d2e6f t90B-b2812-sl5 " + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "trips.query('trip_instance_key == \"ffd7d651605dbca64e7b3f46945f5817\"')" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "58dd10a4-86fc-482d-8c04-d9e5441c4eca", + "metadata": {}, + "outputs": [], + "source": [ + "left_merge = pd.merge(\n", + " stops_to_use,\n", + " shape_stop_combinations,\n", + " on = [\"st_trip_instance_key\", \"stop_id\", \"stop_pair\"],\n", + " how = \"left\",\n", + " indicator=True\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "d951ba50-3fab-4f24-8542-baa32fe204e6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "both 235026\n", + "left_only 155801\n", + "right_only 0\n", + "Name: _merge, dtype: int64" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "left_merge._merge.value_counts()" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "60452325-4b1a-4ada-bc1b-ea7b0471698d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "st_trip_instance_key ffd7d651605dbca64e7b3f46945f5817\n", + "shape_array_key a094fd659ed5dffd9c4526cbd6df96c2\n", + "stop_sequence 2609\n", + "stop_id 1648\n", + "stop_pair 1648__2877\n", + "stop_primary_direction Northbound\n", + "geometry POINT (199462.02638845713 -439913.87381394114)\n", + "trip_instance_key NaN\n", + "_merge left_only\n", + "Name: 390823, dtype: object" + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "row = left_merge.loc[390823]\n", + "row" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "925baa69-daa5-492e-938e-81e885e4e566", + "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", + "
trip_instance_keystop_idstop_pairst_trip_instance_key
3151409ffd7d651605dbca64e7b3f46945f581716481648__2544ffd7d651605dbca64e7b3f46945f5817
\n", + "
" + ], + "text/plain": [ + " trip_instance_key stop_id stop_pair \\\n", + "3151409 ffd7d651605dbca64e7b3f46945f5817 1648 1648__2544 \n", + "\n", + " st_trip_instance_key \n", + "3151409 ffd7d651605dbca64e7b3f46945f5817 " + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "shape_stop_combinations.query('st_trip_instance_key == @row.st_trip_instance_key & stop_id == @row.stop_id')" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "2a2ae364-8337-4bc2-9924-01636c323db8", + "metadata": {}, + "outputs": [], + "source": [ + "gdf1 = stops_to_use.query('st_trip_instance_key == @row.st_trip_instance_key & stop_id == @row.stop_id')\n", + "\n", + "# map pair from shape_stop_combinations_combinations, only using stops_to_use for geom\n", + "gdf2 = stops_to_use.query('st_trip_instance_key == @row.st_trip_instance_key & stop_id == \"2544\"')" + ] + }, + { + "cell_type": "markdown", + "id": "b9542072-9bbf-4b70-ad7b-16801c8fcc10", + "metadata": {}, + "source": [ + "correct, consecutive stops" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "id": "053ace16-8eb0-4260-b39b-c464be6c1077", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pd.concat([gdf1, gdf2]).explore()" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "12fe3e45-d612-4812-94ed-3002cc06bb6b", + "metadata": {}, + "outputs": [], + "source": [ + "gdf1 = stops_to_use.query('st_trip_instance_key == @row.st_trip_instance_key & stop_id == @row.stop_id')\n", + "# from stops_to_use via helpers.import_scheduled_stop_times\n", + "# GTFS_DATA_DICT.rt_vs_schedule_tables.stop_times_direction\n", + "# written in gtfs_funnel/stop_times_with_direction.py\n", + "gdf2 = stops_to_use.query('st_trip_instance_key == @row.st_trip_instance_key & stop_id == \"2877\"')" + ] + }, + { + "cell_type": "markdown", + "id": "76f0b7b9-2394-4731-a95e-2662f5e5b712", + "metadata": {}, + "source": [ + "very far apart, skipping 20+ stops" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "id": "f153a325-729b-457f-bf51-b0bb4a361603", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Make this Notebook Trusted to load map: File -> Trust Notebook
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 42, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pd.concat([gdf1, gdf2]).explore()" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "8d4f2550-8632-40a9-9c60-a2efaed5c09f", + "metadata": {}, + "outputs": [], + "source": [ + "trips = helpers.import_scheduled_trips(analysis_date, columns=['trip_instance_key', 'route_short_name', 'name',\n", + " 'feed_key', 'trip_id'])" + ] + }, + { + "cell_type": "markdown", + "id": "0b698e74-19c7-4421-8d2f-37acf037905d", + "metadata": {}, + "source": [ + "### Another comparison\n", + "\n", + "referrring back to plain stop_times, the stop_pairs from shape_stop_combinations are in sequence while those from stops_to_use again skip many stops. It seems like the first part of stop_pair there is correct, but the second part is not actually the subsequent stop" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "id": "f3f912c2-474a-4384-9530-e31ebe5f4806", + "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", + "
trip_instance_keyroute_short_namenamefeed_keytrip_id
369330c9b170807546736de0820cf8860bc00169LA Metro Bus Schedule7a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC24
\n", + "
" + ], + "text/plain": [ + " trip_instance_key route_short_name \\\n", + "36933 0c9b170807546736de0820cf8860bc00 169 \n", + "\n", + " name feed_key \\\n", + "36933 LA Metro Bus Schedule 7a5a0fa93eb3c7a402c0887a4f11f066 \n", + "\n", + " trip_id \n", + "36933 10169001531434-DEC24 " + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "trips.query('trip_instance_key == \"0c9b170807546736de0820cf8860bc00\"')" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "id": "24a2ee38-5e50-452f-bab8-406fdfbcfb90", + "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", + "
trip_instance_keystop_idstop_pairst_trip_instance_key
24323530c9b170807546736de0820cf8860bc003002130021__36250c9b170807546736de0820cf8860bc00
24323540c9b170807546736de0820cf8860bc0036253625__121160c9b170807546736de0820cf8860bc00
24323550c9b170807546736de0820cf8860bc001211612116__24990c9b170807546736de0820cf8860bc00
\n", + "
" + ], + "text/plain": [ + " trip_instance_key stop_id stop_pair \\\n", + "2432353 0c9b170807546736de0820cf8860bc00 30021 30021__3625 \n", + "2432354 0c9b170807546736de0820cf8860bc00 3625 3625__12116 \n", + "2432355 0c9b170807546736de0820cf8860bc00 12116 12116__2499 \n", + "\n", + " st_trip_instance_key \n", + "2432353 0c9b170807546736de0820cf8860bc00 \n", + "2432354 0c9b170807546736de0820cf8860bc00 \n", + "2432355 0c9b170807546736de0820cf8860bc00 " + ] + }, + "execution_count": 54, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "shape_stop_combinations.query('trip_instance_key == \"0c9b170807546736de0820cf8860bc00\"').head(3)" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "id": "416c311e-d4d3-4f0f-9384-3befe2e6e71c", + "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", + "
st_trip_instance_keyshape_array_keystop_sequencestop_idstop_pairstop_primary_directiongeometry
698180c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d58313002130021__3325EastboundPOINT (151920.171 -423388.371)
698190c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583236253625__3252EastboundPOINT (152164.852 -423047.563)
698200c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d58331211612116__14463EastboundPOINT (152163.927 -422698.157)
\n", + "
" + ], + "text/plain": [ + " st_trip_instance_key shape_array_key \\\n", + "69818 0c9b170807546736de0820cf8860bc00 59459dbb9f7ce418d6f88f65e905d583 \n", + "69819 0c9b170807546736de0820cf8860bc00 59459dbb9f7ce418d6f88f65e905d583 \n", + "69820 0c9b170807546736de0820cf8860bc00 59459dbb9f7ce418d6f88f65e905d583 \n", + "\n", + " stop_sequence stop_id stop_pair stop_primary_direction \\\n", + "69818 1 30021 30021__3325 Eastbound \n", + "69819 2 3625 3625__3252 Eastbound \n", + "69820 3 12116 12116__14463 Eastbound \n", + "\n", + " geometry \n", + "69818 POINT (151920.171 -423388.371) \n", + "69819 POINT (152164.852 -423047.563) \n", + "69820 POINT (152163.927 -422698.157) " + ] + }, + "execution_count": 53, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "stops_to_use.query('st_trip_instance_key == \"0c9b170807546736de0820cf8860bc00\"').head(3)" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "id": "114d69ac-6ca8-43c9-8271-b722edf2aa27", + "metadata": {}, + "outputs": [], + "source": [ + "st_no_dir = helpers.import_scheduled_stop_times(analysis_date, with_direction=False, get_pandas=True,\n", + " columns=['feed_key', 'trip_id', 'stop_sequence',\n", + " 'stop_id'])" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "07329da2-611a-4ffc-81de-cd84837b1bce", + "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", + "
feed_keytrip_idstop_sequencestop_id
24489227a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC24130021
17662117a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC2423625
32550267a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC24312116
12797727a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC2442499
7797337a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC2453567
...............
12788247a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC241306575
29250607a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC241316597
27536557a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC241327148
14368057a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC241335507
16231897a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC241345505
\n", + "

134 rows × 4 columns

\n", + "
" + ], + "text/plain": [ + " feed_key trip_id \\\n", + "2448922 7a5a0fa93eb3c7a402c0887a4f11f066 10169001531434-DEC24 \n", + "1766211 7a5a0fa93eb3c7a402c0887a4f11f066 10169001531434-DEC24 \n", + "3255026 7a5a0fa93eb3c7a402c0887a4f11f066 10169001531434-DEC24 \n", + "1279772 7a5a0fa93eb3c7a402c0887a4f11f066 10169001531434-DEC24 \n", + "779733 7a5a0fa93eb3c7a402c0887a4f11f066 10169001531434-DEC24 \n", + "... ... ... \n", + "1278824 7a5a0fa93eb3c7a402c0887a4f11f066 10169001531434-DEC24 \n", + "2925060 7a5a0fa93eb3c7a402c0887a4f11f066 10169001531434-DEC24 \n", + "2753655 7a5a0fa93eb3c7a402c0887a4f11f066 10169001531434-DEC24 \n", + "1436805 7a5a0fa93eb3c7a402c0887a4f11f066 10169001531434-DEC24 \n", + "1623189 7a5a0fa93eb3c7a402c0887a4f11f066 10169001531434-DEC24 \n", + "\n", + " stop_sequence stop_id \n", + "2448922 1 30021 \n", + "1766211 2 3625 \n", + "3255026 3 12116 \n", + "1279772 4 2499 \n", + "779733 5 3567 \n", + "... ... ... \n", + "1278824 130 6575 \n", + "2925060 131 6597 \n", + "2753655 132 7148 \n", + "1436805 133 5507 \n", + "1623189 134 5505 \n", + "\n", + "[134 rows x 4 columns]" + ] + }, + "execution_count": 48, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "st_no_dir.query('feed_key == \"7a5a0fa93eb3c7a402c0887a4f11f066\" & trip_id == \"10169001531434-DEC24\"').sort_values('stop_sequence')" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "id": "e44785f7-d8cc-4a84-8290-41f5ad590b4b", + "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", + "
feed_keytrip_idstop_sequencestop_id
16084787a5a0fa93eb3c7a402c0887a4f11f06610169001531434-DEC241183325
\n", + "
" + ], + "text/plain": [ + " feed_key trip_id \\\n", + "1608478 7a5a0fa93eb3c7a402c0887a4f11f066 10169001531434-DEC24 \n", + "\n", + " stop_sequence stop_id \n", + "1608478 118 3325 " + ] + }, + "execution_count": 52, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(st_no_dir.query('feed_key == \"7a5a0fa93eb3c7a402c0887a4f11f066\" & trip_id == \"10169001531434-DEC24\"'\n", + " ).sort_values('stop_sequence'\n", + " ).query('stop_id == \"3325\"')\n", + "\n", + ")\n", + "# stop_sequence 118 but expect 2!" + ] + }, + { + "cell_type": "markdown", + "id": "09acfafa-fa1e-4137-ad76-3d4a893743c2", + "metadata": {}, + "source": [ + "### December data" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "id": "3ce7796d-d15d-4257-9d80-d1021e5211d1", + "metadata": {}, + "outputs": [], + "source": [ + "stops_to_use2 = helpers.import_scheduled_stop_times(\n", + " analysis_date_dec,\n", + " columns = [\"trip_instance_key\", \"shape_array_key\",\n", + " \"stop_sequence\", \"stop_id\", \"stop_pair\",\n", + " \"stop_primary_direction\", \"geometry\"],\n", + " filters = [[(\"trip_instance_key\", \"in\", subset_trips2)]],\n", + " get_pandas = True,\n", + " with_direction = True\n", + ").rename(columns = {\"trip_instance_key\": \"st_trip_instance_key\"})" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "id": "7319e8b3-2ba6-47b9-a552-c635d8ce4a2d", + "metadata": {}, + "outputs": [], + "source": [ + "left_merge2 = pd.merge(\n", + " stops_to_use2,\n", + " shape_stop_combinations2,\n", + " on = [\"st_trip_instance_key\", \"stop_id\", \"stop_pair\"],\n", + " how = \"left\",\n", + " indicator=True\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "id": "ca6140c6-5574-4c1c-9034-c6e12722b16c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "both 3134260\n", + "left_only 5232\n", + "right_only 0\n", + "Name: _merge, dtype: int64" + ] + }, + "execution_count": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "left_merge2._merge.value_counts()" + ] + }, + { + "cell_type": "markdown", + "id": "4231d5de-2fbf-47f8-88cb-7648c3186e79", + "metadata": { + "jp-MarkdownHeadingCollapsed": true, + "tags": [] + }, + "source": [ + "# Averaging seems to work OK actually, problem in previous step" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "1b82a625-85a5-47d0-b7c5-4ef19d70139e", + "metadata": {}, + "outputs": [], + "source": [ + "dict_inputs = catalog[\"stop_segments\"]\n", + "shape_stop_combinations_COLS = [*dict_inputs[\"shape_stop_combinations_cols\"]]\n", + "ROUTE_DIR_COLS = [*dict_inputs[\"route_dir_cols\"]]\n", + "STOP_PAIR_COLS = [*dict_inputs[\"stop_pair_cols\"]]" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "1f3a3b54-4e78-4e1c-b82b-afe6b56a76f7", + "metadata": {}, + "outputs": [], + "source": [ + "SPEED_FILE = dict_inputs[\"stage4\"]\n", + "MAX_SPEED = dict_inputs[\"max_speed\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "id": "e20de26d-facd-4a55-91be-58655308cc17", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['2025-01-15']" + ] + }, + "execution_count": 45, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "analysis_date_list" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "id": "b6c7206e-e2e8-490d-9979-3ba08f12c483", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'speeds_stop_segments'" + ] + }, + "execution_count": 71, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SPEED_FILE" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "aa1ef396-7508-4852-adf6-f48f1f889a54", + "metadata": {}, + "outputs": [], + "source": [ + "path = 'gs://calitp-analytics-data/data-analyses/rt_segment_speeds/speedmap/speeds_2025-01-15.parquet'" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "fa747a53-ab29-47e0-aab6-9f0b45b81450", + "metadata": {}, + "outputs": [], + "source": [ + "df = pd.read_parquet(\n", + " path,\n", + " # **kwargs,\n", + " ).drop_duplicates()" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "id": "8cff9d11-716d-4ba2-b4d1-4e28db42cdc4", + "metadata": {}, + "outputs": [], + "source": [ + "path = 'gs://calitp-analytics-data/data-analyses/rt_segment_speeds/speedmap/speeds'" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "id": "fbff6d6b-94c7-4d6a-83e9-9cf8f869c350", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['2025-01-15']" + ] + }, + "execution_count": 55, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "analysis_date_list" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "id": "3f10f9f4-9046-4b12-a086-2034b1e1bdf1", + "metadata": {}, + "outputs": [], + "source": [ + "# ddf=dask_utils.get_ddf([path], analysis_date_list, 'df', get_pandas = False, add_date = True) # this is fine\n", + "ddf=dask_utils.get_ddf([path], analysis_date_list, 'df', get_pandas = False,\n", + " add_date = True, columns = cols, filters = [[(\"speed_mph\", \"<=\", MAX_SPEED)]])" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "id": "2a22ab6e-fe10-48c3-a2e9-1ef44aa249e1", + "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", + "
schedule_gtfs_dataset_keyshape_array_keyshape_idstop_sequenceroute_iddirection_idstop_pairstop_pair_nametrip_instance_keyspeed_mphmeters_elapsedsec_elapsedtime_of_dayarrival_timeservice_date
0baeeb157e85a901e47b828ef9fe750915abad00eed316250607a32ab7aa38fa7906_8_3829060.060308__60310Beyer Bl & Iris Av__Beyer Bl & Precision Park Ln00001f273308970887743ce0c3acf0683.443793307.893917200.0PM Peak2025-01-15 18:09:272025-01-15
1baeeb157e85a901e47b828ef9fe750915abad00eed316250607a32ab7aa38fa7906_8_3839060.060309__60249Beyer Bl & Dairy Mart Rd__San Ysidro Bl & Virg...00001f273308970887743ce0c3acf06810.917496229.37966047.0PM Peak2025-01-15 18:12:472025-01-15
2baeeb157e85a901e47b828ef9fe750915abad00eed316250607a32ab7aa38fa7906_8_3849060.060310__60568Beyer Bl & Precision Park Ln__San Ysidro Bl & ...00001f273308970887743ce0c3acf06810.9153861039.328261213.0PM Peak2025-01-15 18:13:342025-01-15
3baeeb157e85a901e47b828ef9fe750915abad00eed316250607a32ab7aa38fa7906_8_3869060.060245__60567Beyer Bl & Poplar St__San Ysidro Bl & Dairy Ma...00001f273308970887743ce0c3acf06810.445412364.21194078.0PM Peak2025-01-15 18:17:072025-01-15
4baeeb157e85a901e47b828ef9fe750915abad00eed316250607a32ab7aa38fa7906_8_3879060.060052__60574South Vista Av & Sunset Ln__San Ysidro Bl & Cy...00001f273308970887743ce0c3acf06814.550872136.59736421.0PM Peak2025-01-15 18:18:252025-01-15
................................................
3074227f74424acf8c41e4c1e9fd42838c4875ca094fd659ed5dffd9c4526cbd6df96c218468_shp21601940.03356__3324Valley Blvd and Lemon Ave__Valley Blvd and Max...ffd7d651605dbca64e7b3f46945f581736.7495971002.11238761.0Evening2025-01-15 23:54:482025-01-15
3074228f74424acf8c41e4c1e9fd42838c4875ca094fd659ed5dffd9c4526cbd6df96c218468_shp22801940.03324__3337Valley Blvd and Pierre Rd E__Old Valley Blvd a...ffd7d651605dbca64e7b3f46945f581739.970207375.22322221.0Evening2025-01-15 23:54:542025-01-15
3074229f74424acf8c41e4c1e9fd42838c4875ca094fd659ed5dffd9c4526cbd6df96c218468_shp23221940.03329__3342Valley Blvd and Suzanne Rd E__Azusa Way and Va...ffd7d651605dbca64e7b3f46945f581723.061093639.15413262.0Evening2025-01-15 23:55:152025-01-15
3074230f74424acf8c41e4c1e9fd42838c4875ca094fd659ed5dffd9c4526cbd6df96c218468_shp23931940.03319__3340Valley Blvd and Brea Canyon Rd E__Mayor Dave W...ffd7d651605dbca64e7b3f46945f581725.971102940.39306181.0Evening2025-01-15 23:56:172025-01-15
3074231f74424acf8c41e4c1e9fd42838c4875ca094fd659ed5dffd9c4526cbd6df96c218468_shp24981940.03371__3316Grand Ave and Valley Blvd__Central Ave and 2nd Stffd7d651605dbca64e7b3f46945f581736.815938987.46370660.0Evening2025-01-15 23:57:382025-01-15
\n", + "

2897310 rows × 15 columns

\n", + "
" + ], + "text/plain": [ + " schedule_gtfs_dataset_key shape_array_key \\\n", + "0 baeeb157e85a901e47b828ef9fe75091 5abad00eed316250607a32ab7aa38fa7 \n", + "1 baeeb157e85a901e47b828ef9fe75091 5abad00eed316250607a32ab7aa38fa7 \n", + "2 baeeb157e85a901e47b828ef9fe75091 5abad00eed316250607a32ab7aa38fa7 \n", + "3 baeeb157e85a901e47b828ef9fe75091 5abad00eed316250607a32ab7aa38fa7 \n", + "4 baeeb157e85a901e47b828ef9fe75091 5abad00eed316250607a32ab7aa38fa7 \n", + "... ... ... \n", + "3074227 f74424acf8c41e4c1e9fd42838c4875c a094fd659ed5dffd9c4526cbd6df96c2 \n", + "3074228 f74424acf8c41e4c1e9fd42838c4875c a094fd659ed5dffd9c4526cbd6df96c2 \n", + "3074229 f74424acf8c41e4c1e9fd42838c4875c a094fd659ed5dffd9c4526cbd6df96c2 \n", + "3074230 f74424acf8c41e4c1e9fd42838c4875c a094fd659ed5dffd9c4526cbd6df96c2 \n", + "3074231 f74424acf8c41e4c1e9fd42838c4875c a094fd659ed5dffd9c4526cbd6df96c2 \n", + "\n", + " shape_id stop_sequence route_id direction_id stop_pair \\\n", + "0 906_8_38 2 906 0.0 60308__60310 \n", + "1 906_8_38 3 906 0.0 60309__60249 \n", + "2 906_8_38 4 906 0.0 60310__60568 \n", + "3 906_8_38 6 906 0.0 60245__60567 \n", + "4 906_8_38 7 906 0.0 60052__60574 \n", + "... ... ... ... ... ... \n", + "3074227 18468_shp 2160 194 0.0 3356__3324 \n", + "3074228 18468_shp 2280 194 0.0 3324__3337 \n", + "3074229 18468_shp 2322 194 0.0 3329__3342 \n", + "3074230 18468_shp 2393 194 0.0 3319__3340 \n", + "3074231 18468_shp 2498 194 0.0 3371__3316 \n", + "\n", + " stop_pair_name \\\n", + "0 Beyer Bl & Iris Av__Beyer Bl & Precision Park Ln \n", + "1 Beyer Bl & Dairy Mart Rd__San Ysidro Bl & Virg... \n", + "2 Beyer Bl & Precision Park Ln__San Ysidro Bl & ... \n", + "3 Beyer Bl & Poplar St__San Ysidro Bl & Dairy Ma... \n", + "4 South Vista Av & Sunset Ln__San Ysidro Bl & Cy... \n", + "... ... \n", + "3074227 Valley Blvd and Lemon Ave__Valley Blvd and Max... \n", + "3074228 Valley Blvd and Pierre Rd E__Old Valley Blvd a... \n", + "3074229 Valley Blvd and Suzanne Rd E__Azusa Way and Va... \n", + "3074230 Valley Blvd and Brea Canyon Rd E__Mayor Dave W... \n", + "3074231 Grand Ave and Valley Blvd__Central Ave and 2nd St \n", + "\n", + " trip_instance_key speed_mph meters_elapsed \\\n", + "0 00001f273308970887743ce0c3acf068 3.443793 307.893917 \n", + "1 00001f273308970887743ce0c3acf068 10.917496 229.379660 \n", + "2 00001f273308970887743ce0c3acf068 10.915386 1039.328261 \n", + "3 00001f273308970887743ce0c3acf068 10.445412 364.211940 \n", + "4 00001f273308970887743ce0c3acf068 14.550872 136.597364 \n", + "... ... ... ... \n", + "3074227 ffd7d651605dbca64e7b3f46945f5817 36.749597 1002.112387 \n", + "3074228 ffd7d651605dbca64e7b3f46945f5817 39.970207 375.223222 \n", + "3074229 ffd7d651605dbca64e7b3f46945f5817 23.061093 639.154132 \n", + "3074230 ffd7d651605dbca64e7b3f46945f5817 25.971102 940.393061 \n", + "3074231 ffd7d651605dbca64e7b3f46945f5817 36.815938 987.463706 \n", + "\n", + " sec_elapsed time_of_day arrival_time service_date \n", + "0 200.0 PM Peak 2025-01-15 18:09:27 2025-01-15 \n", + "1 47.0 PM Peak 2025-01-15 18:12:47 2025-01-15 \n", + "2 213.0 PM Peak 2025-01-15 18:13:34 2025-01-15 \n", + "3 78.0 PM Peak 2025-01-15 18:17:07 2025-01-15 \n", + "4 21.0 PM Peak 2025-01-15 18:18:25 2025-01-15 \n", + "... ... ... ... ... \n", + "3074227 61.0 Evening 2025-01-15 23:54:48 2025-01-15 \n", + "3074228 21.0 Evening 2025-01-15 23:54:54 2025-01-15 \n", + "3074229 62.0 Evening 2025-01-15 23:55:15 2025-01-15 \n", + "3074230 81.0 Evening 2025-01-15 23:56:17 2025-01-15 \n", + "3074231 60.0 Evening 2025-01-15 23:57:38 2025-01-15 \n", + "\n", + "[2897310 rows x 15 columns]" + ] + }, + "execution_count": 69, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ddf.compute()" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "id": "505d5d05-3b24-46f5-8ffe-7f098daa56da", + "metadata": {}, + "outputs": [], + "source": [ + "cols = helpers.unique_list(\n", + " aseg.OPERATOR_COLS + shape_stop_combinations_COLS + \n", + " ROUTE_DIR_COLS + STOP_PAIR_COLS + [\n", + " \"trip_instance_key\", \"speed_mph\", \n", + " \"meters_elapsed\", \"sec_elapsed\", \n", + " \"time_of_day\", \"arrival_time\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "id": "1efe821e-0148-4ff9-8b53-21fd97d455e7", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['schedule_gtfs_dataset_key',\n", + " 'shape_array_key',\n", + " 'shape_id',\n", + " 'stop_sequence',\n", + " 'route_id',\n", + " 'direction_id',\n", + " 'stop_pair',\n", + " 'stop_pair_name',\n", + " 'trip_instance_key',\n", + " 'speed_mph',\n", + " 'meters_elapsed',\n", + " 'sec_elapsed',\n", + " 'time_of_day',\n", + " 'arrival_time']" + ] + }, + "execution_count": 67, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cols" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "id": "391bb3a8-d110-4b1b-ac00-3c78e02e597b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index(['trip_instance_key', 'stop_sequence', 'stop_sequence1',\n", + " 'shape_array_key', 'stop_meters', 'arrival_time', 'arrival_time_sec',\n", + " 'subseq_arrival_time_sec', 'subseq_stop_meters', 'meters_elapsed',\n", + " 'sec_elapsed', 'speed_mph', 'schedule_gtfs_dataset_key', 'route_id',\n", + " 'direction_id', 'route_short_name', 'scheduled_service_minutes',\n", + " 'sched_rt_category', 'time_of_day', 'shape_id', 'segment_id',\n", + " 'stop_pair_name', 'stop_pair'],\n", + " dtype='object')" + ] + }, + "execution_count": 63, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.columns" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "id": "c02cccde-0885-42ef-8c64-5bf65c4c6ec7", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'gs://calitp-analytics-data/data-analyses/rt_segment_speeds/'" + ] + }, + "execution_count": 70, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "aseg.SEGMENT_GCS" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "fe322754-74d1-4976-bee6-099c7518f6d8", + "metadata": {}, + "outputs": [], + "source": [ + "df = time_series_utils.concatenate_datasets_across_dates(\n", + " aseg.SEGMENT_GCS, \n", + " SPEED_FILE,\n", + " analysis_date_list,\n", + " data_type = \"df\",\n", + " columns = helpers.unique_list(\n", + " aseg.OPERATOR_COLS + SHAPE_STOP_COLS + \n", + " ROUTE_DIR_COLS + STOP_PAIR_COLS + [\n", + " \"trip_instance_key\", \"speed_mph\", \n", + " \"meters_elapsed\", \"sec_elapsed\", \n", + " \"time_of_day\", \"arrival_time\"]),\n", + " filters = [[(\"speed_mph\", \"<=\", MAX_SPEED)]],\n", + " get_pandas=False\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "7402508c-5fee-45d9-9b18-18b085194dea", + "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", + "
schedule_gtfs_dataset_keyshape_array_keyshape_idstop_sequenceroute_iddirection_idstop_pairstop_pair_nametrip_instance_keyspeed_mphmeters_elapsedsec_elapsedtime_of_dayarrival_timeservice_date
0baeeb157e85a901e47b828ef9fe750915abad00eed316250607a32ab7aa38fa7906_8_38129060.060314__60315San Ysidro Bl & I-805 (Ramp)__San Ysidro Bl & ...00001f273308970887743ce0c3acf0685.8706173584.8292891366.0PM Peak2025-01-15 18:22:032025-01-15
1baeeb157e85a901e47b828ef9fe750915abad00eed316250607a32ab7aa38fa7906_8_38129060.060314__60315San Ysidro Bl & I-805 (Ramp)__San Ysidro Bl & ...093275bdc15202d91c8bea881866e7b26.4463533584.8292891244.0Midday2025-01-15 13:49:052025-01-15
2baeeb157e85a901e47b828ef9fe750915abad00eed316250607a32ab7aa38fa7906_8_38129060.060314__60315San Ysidro Bl & I-805 (Ramp)__San Ysidro Bl & ...0b309afa2d5bef3c2028961646c94ba37.0779023584.8292891133.0PM Peak2025-01-15 17:09:012025-01-15
3baeeb157e85a901e47b828ef9fe750915abad00eed316250607a32ab7aa38fa7906_8_38129060.060314__60315San Ysidro Bl & I-805 (Ramp)__San Ysidro Bl & ...0f5769de811a55b20dc44ffa816de4125.2897513584.8292891516.0PM Peak2025-01-15 16:54:382025-01-15
4baeeb157e85a901e47b828ef9fe750915abad00eed316250607a32ab7aa38fa7906_8_38129060.060314__60315San Ysidro Bl & I-805 (Ramp)__San Ysidro Bl & ...1288107588bb83361fda270fee48bdba6.8365413584.8292891173.0PM Peak2025-01-15 19:34:482025-01-15
................................................
191821c499f905e33929a641f083dad55c521e0227946648df4c7ba490c34bdc6c6ee3shp-696-02266960.050127__57896Florence Av & Hermosa Av__Florence Av & Broadw...fddaf72e40d72fbfea96f069a272451b11.322115313.80023062.0AM Peak2025-01-15 08:33:132025-01-15
191822c499f905e33929a641f083dad55c521e0227946648df4c7ba490c34bdc6c6ee3shp-696-02276960.057896__59519Florence Av & Broadway Ter__Broadway Ter & Her...fddaf72e40d72fbfea96f069a272451b14.0823072379.576195378.0AM Peak2025-01-15 08:34:152025-01-15
191826364d59b3aea55aec2962a0b3244a40e024d7ff7f53f1dd1ac665462891afdde61621310.0208__210Vanderbilt Wy & Westinghouse Pl__Ave Stanford ...fe6f2489a8dc41b382f4491539db22c716.1317042105.703045292.0AM Peak2025-01-15 09:23:132025-01-15
1918280666caf3ec1ecc96b74f4477ee4bc939f82809b9f53bd208c67890c43aa4dcec2420002_DEC2412242-131860.08492__8483Winnetka / Vanowen__Winnetka / Hartfe970eb78c0742910069087708c7466610.8430889888.1979682040.0PM Peak2025-01-15 16:09:532025-01-15
191832f74424acf8c41e4c1e9fd42838c4875ca094fd659ed5dffd9c4526cbd6df96c218468_shp7581940.03326__3321Valley Blvd and San Angelo Ave__Valley Blvd an...ffd7d651605dbca64e7b3f46945f581724.44543113725.2843271256.0Evening2025-01-15 23:29:052025-01-15
\n", + "

122021 rows × 15 columns

\n", + "
" + ], + "text/plain": [ + " schedule_gtfs_dataset_key shape_array_key \\\n", + "0 baeeb157e85a901e47b828ef9fe75091 5abad00eed316250607a32ab7aa38fa7 \n", + "1 baeeb157e85a901e47b828ef9fe75091 5abad00eed316250607a32ab7aa38fa7 \n", + "2 baeeb157e85a901e47b828ef9fe75091 5abad00eed316250607a32ab7aa38fa7 \n", + "3 baeeb157e85a901e47b828ef9fe75091 5abad00eed316250607a32ab7aa38fa7 \n", + "4 baeeb157e85a901e47b828ef9fe75091 5abad00eed316250607a32ab7aa38fa7 \n", + "... ... ... \n", + "191821 c499f905e33929a641f083dad55c521e 0227946648df4c7ba490c34bdc6c6ee3 \n", + "191822 c499f905e33929a641f083dad55c521e 0227946648df4c7ba490c34bdc6c6ee3 \n", + "191826 364d59b3aea55aec2962a0b3244a40e0 24d7ff7f53f1dd1ac665462891afdde6 \n", + "191828 0666caf3ec1ecc96b74f4477ee4bc939 f82809b9f53bd208c67890c43aa4dcec \n", + "191832 f74424acf8c41e4c1e9fd42838c4875c a094fd659ed5dffd9c4526cbd6df96c2 \n", + "\n", + " shape_id stop_sequence route_id direction_id stop_pair \\\n", + "0 906_8_38 12 906 0.0 60314__60315 \n", + "1 906_8_38 12 906 0.0 60314__60315 \n", + "2 906_8_38 12 906 0.0 60314__60315 \n", + "3 906_8_38 12 906 0.0 60314__60315 \n", + "4 906_8_38 12 906 0.0 60314__60315 \n", + "... ... ... ... ... ... \n", + "191821 shp-696-02 26 696 0.0 50127__57896 \n", + "191822 shp-696-02 27 696 0.0 57896__59519 \n", + "191826 162 13 1 0.0 208__210 \n", + "191828 2420002_DEC24 12 242-13186 0.0 8492__8483 \n", + "191832 18468_shp 758 194 0.0 3326__3321 \n", + "\n", + " stop_pair_name \\\n", + "0 San Ysidro Bl & I-805 (Ramp)__San Ysidro Bl & ... \n", + "1 San Ysidro Bl & I-805 (Ramp)__San Ysidro Bl & ... \n", + "2 San Ysidro Bl & I-805 (Ramp)__San Ysidro Bl & ... \n", + "3 San Ysidro Bl & I-805 (Ramp)__San Ysidro Bl & ... \n", + "4 San Ysidro Bl & I-805 (Ramp)__San Ysidro Bl & ... \n", + "... ... \n", + "191821 Florence Av & Hermosa Av__Florence Av & Broadw... \n", + "191822 Florence Av & Broadway Ter__Broadway Ter & Her... \n", + "191826 Vanderbilt Wy & Westinghouse Pl__Ave Stanford ... \n", + "191828 Winnetka / Vanowen__Winnetka / Hart \n", + "191832 Valley Blvd and San Angelo Ave__Valley Blvd an... \n", + "\n", + " trip_instance_key speed_mph meters_elapsed \\\n", + "0 00001f273308970887743ce0c3acf068 5.870617 3584.829289 \n", + "1 093275bdc15202d91c8bea881866e7b2 6.446353 3584.829289 \n", + "2 0b309afa2d5bef3c2028961646c94ba3 7.077902 3584.829289 \n", + "3 0f5769de811a55b20dc44ffa816de412 5.289751 3584.829289 \n", + "4 1288107588bb83361fda270fee48bdba 6.836541 3584.829289 \n", + "... ... ... ... \n", + "191821 fddaf72e40d72fbfea96f069a272451b 11.322115 313.800230 \n", + "191822 fddaf72e40d72fbfea96f069a272451b 14.082307 2379.576195 \n", + "191826 fe6f2489a8dc41b382f4491539db22c7 16.131704 2105.703045 \n", + "191828 fe970eb78c0742910069087708c74666 10.843088 9888.197968 \n", + "191832 ffd7d651605dbca64e7b3f46945f5817 24.445431 13725.284327 \n", + "\n", + " sec_elapsed time_of_day arrival_time service_date \n", + "0 1366.0 PM Peak 2025-01-15 18:22:03 2025-01-15 \n", + "1 1244.0 Midday 2025-01-15 13:49:05 2025-01-15 \n", + "2 1133.0 PM Peak 2025-01-15 17:09:01 2025-01-15 \n", + "3 1516.0 PM Peak 2025-01-15 16:54:38 2025-01-15 \n", + "4 1173.0 PM Peak 2025-01-15 19:34:48 2025-01-15 \n", + "... ... ... ... ... \n", + "191821 62.0 AM Peak 2025-01-15 08:33:13 2025-01-15 \n", + "191822 378.0 AM Peak 2025-01-15 08:34:15 2025-01-15 \n", + "191826 292.0 AM Peak 2025-01-15 09:23:13 2025-01-15 \n", + "191828 2040.0 PM Peak 2025-01-15 16:09:53 2025-01-15 \n", + "191832 1256.0 Evening 2025-01-15 23:29:05 2025-01-15 \n", + "\n", + "[122021 rows x 15 columns]" + ] + }, + "execution_count": 43, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.compute()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9ba9c7a7-e198-4c2d-8544-b6a896793ed5", + "metadata": {}, + "outputs": [], + "source": [ + "df = aseg.concatenate_trip_segment_speeds(\n", + " analysis_date_list,\n", + " \"stop_segments\",\n", + " get_pandas = False\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "58fdebe4-2794-402f-a22d-a203c5c9b336", + "metadata": {}, + "outputs": [], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b903a02c-5c7d-4ef8-bf03-ec8c63cd51ce", + "metadata": {}, + "outputs": [], + "source": [ + "trip_speeds = df.compute()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9e962769-d08a-4c2a-9168-67638049dfd4", + "metadata": {}, + "outputs": [], + "source": [ + "trip_speeds" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "39b9d782-d52f-4309-a563-7b21de27dc72", + "metadata": {}, + "outputs": [], + "source": [ + "group_cols = aseg.OPERATOR_COLS + ROUTE_DIR_COLS + STOP_PAIR_COLS" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ba487f4a-21d7-4227-a8a0-b80a7cdcec9c", + "metadata": {}, + "outputs": [], + "source": [ + "group_cols" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a52bec21-d581-417e-9fec-fbabf590ed89", + "metadata": {}, + "outputs": [], + "source": [ + "avg_speeds = delayed(aseg.metrics.concatenate_peak_offpeak_allday_averages)(\n", + " df, \n", + " group_cols,\n", + " metric_type = \"segment_speeds\"\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6c007925-36e4-4842-b75f-2d81d596f313", + "metadata": {}, + "outputs": [], + "source": [ + "avg_spds = avg_speeds.compute()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6debb886-1690-4e46-a674-6aa6ec81f993", + "metadata": {}, + "outputs": [], + "source": [ + "avg_spds" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "628a1a82-1164-48f2-ba76-5a9126e8bc75", + "metadata": {}, + "outputs": [], + "source": [ + "avg_spds = avg_spds.pipe(\n", + " gtfs_schedule_wrangling.merge_operator_identifiers, \n", + " analysis_date_list,\n", + " columns = aseg.CROSSWALK_COLS\n", + " )" + ] + } + ], + "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/rt_segment_speeds/logs/avg_speeds.log b/rt_segment_speeds/logs/avg_speeds.log index 3e06fed45..b6880f7a2 100644 --- a/rt_segment_speeds/logs/avg_speeds.log +++ b/rt_segment_speeds/logs/avg_speeds.log @@ -683,4 +683,4 @@ 2025-01-21 18:38:13.628 | INFO | __main__:summary_average_speeds:155 - rt_stop_times summary speed averaging for ['2025-01-15'] execution time: 0:00:29.651019 2025-01-21 18:57:59.637 | INFO | average_segment_speeds:segment_averages_detail:251 - speedmap_segments detailed segment averaging for ['2025-01-15'] execution time: 0:06:11.080021 2025-01-21 19:03:28.422 | INFO | average_segment_speeds:segment_averages:187 - speedmap_segments segment averaging for ['2025-01-15'] execution time: 0:05:28.685950 -2025-01-21 19:08:11.751 | INFO | average_segment_speeds:segment_averages:187 - speedmap_segments segment averaging for ['2025-01-15'] execution time: 0:04:43.240026 \ No newline at end of file +2025-01-21 19:08:11.751 | INFO | average_segment_speeds:segment_averages:187 - speedmap_segments segment averaging for ['2025-01-15'] execution time: 0:04:43.2400262025-02-12 10:11:30.775 | INFO | __main__:segment_averages:187 - stop_segments segment averaging for ['2025-01-15'] execution time: 0:01:27.273686 diff --git a/rt_segment_speeds/logs/cut_stop_segments.log b/rt_segment_speeds/logs/cut_stop_segments.log index 81df4c9a9..902c77600 100644 --- a/rt_segment_speeds/logs/cut_stop_segments.log +++ b/rt_segment_speeds/logs/cut_stop_segments.log @@ -75,3 +75,5 @@ 2024-12-18 09:13:13.266 | INFO | __main__::244 - speedmap segments and proxy_stop_times 2024-12-11: 0:04:55.428371 2025-01-21 13:14:13.570 | INFO | __main__::168 - cut segments 2025-01-15: 0:28:00.641195 2025-01-21 13:22:00.233 | INFO | __main__::244 - speedmap segments and proxy_stop_times 2025-01-15: 0:05:55.448966 +2025-02-12 09:54:53.038 | INFO | __main__::168 - cut segments 2025-01-15: 0:27:45.038713 +2025-02-12 10:02:11.788 | INFO | __main__::244 - speedmap segments and proxy_stop_times 2025-01-15: 0:05:29.432920 diff --git a/rt_segment_speeds/logs/interpolate_stop_arrival.log b/rt_segment_speeds/logs/interpolate_stop_arrival.log index 220b86456..f0ca5c395 100644 --- a/rt_segment_speeds/logs/interpolate_stop_arrival.log +++ b/rt_segment_speeds/logs/interpolate_stop_arrival.log @@ -140,3 +140,4 @@ 2025-01-21 17:12:27.738 | INFO | interpolate_stop_arrival:interpolate_stop_arrivals:236 - interpolate arrivals for stop_segments 2025-01-15: 2025-01-15: 0:01:20.848747 2025-01-21 18:35:30.275 | INFO | interpolate_stop_arrival:interpolate_stop_arrivals:236 - interpolate arrivals for rt_stop_times 2025-01-15: 2025-01-15: 0:13:06.847024 2025-01-21 18:49:29.708 | INFO | interpolate_stop_arrival:interpolate_stop_arrivals:236 - interpolate arrivals for speedmap_segments 2025-01-15: 2025-01-15: 0:02:15.045884 +2025-02-12 10:08:28.509 | INFO | interpolate_stop_arrival:interpolate_stop_arrivals:236 - interpolate arrivals for stop_segments 2025-01-15: 2025-01-15: 0:01:23.252567 diff --git a/rt_segment_speeds/logs/nearest_vp.log b/rt_segment_speeds/logs/nearest_vp.log index 640ebd401..cb89e3df9 100644 --- a/rt_segment_speeds/logs/nearest_vp.log +++ b/rt_segment_speeds/logs/nearest_vp.log @@ -280,3 +280,4 @@ 2025-01-21 17:11:06.855 | INFO | nearest_vp_to_stop:nearest_neighbor_for_stop:188 - nearest neighbor for stop_segments 2025-01-15: 0:04:14.577150 2025-01-21 18:22:23.308 | INFO | nearest_vp_to_stop:nearest_neighbor_for_stop:188 - nearest neighbor for rt_stop_times 2025-01-15: 0:39:52.283432 2025-01-21 18:47:14.614 | INFO | nearest_vp_to_stop:nearest_neighbor_for_stop:188 - nearest neighbor for speedmap_segments 2025-01-15: 0:08:43.206096 +2025-02-12 10:07:05.221 | INFO | nearest_vp_to_stop:nearest_neighbor_for_stop:188 - nearest neighbor for stop_segments 2025-01-15: 0:04:31.737901 diff --git a/rt_segment_speeds/logs/speeds_by_segment_trip.log b/rt_segment_speeds/logs/speeds_by_segment_trip.log index 477daea35..9263200e8 100644 --- a/rt_segment_speeds/logs/speeds_by_segment_trip.log +++ b/rt_segment_speeds/logs/speeds_by_segment_trip.log @@ -152,3 +152,4 @@ 2025-01-21 17:13:56.681 | INFO | stop_arrivals_to_speed:calculate_speed_from_stop_arrivals:176 - speeds by segment for stop_segments 2025-01-15: 0:01:28.844221 2025-01-21 18:37:14.368 | INFO | stop_arrivals_to_speed:calculate_speed_from_stop_arrivals:176 - speeds by segment for rt_stop_times 2025-01-15: 0:01:43.962507 2025-01-21 18:51:30.158 | INFO | stop_arrivals_to_speed:calculate_speed_from_stop_arrivals:176 - speeds by segment for speedmap_segments 2025-01-15: 0:01:50.399658 +2025-02-12 10:09:43.818 | INFO | stop_arrivals_to_speed:calculate_speed_from_stop_arrivals:176 - speeds by segment for stop_segments 2025-01-15: 0:01:15.281024 From 8434467a2d85b65265c5fb8c34f70c863d83a93b Mon Sep 17 00:00:00 2001 From: Eric Dasmalchi Date: Thu, 13 Feb 2025 01:13:25 +0000 Subject: [PATCH 17/17] debug stop_times_with_direction --- gtfs_funnel/02_debug_st_direction.ipynb | 1025 ++++++++++++++++++++++ gtfs_funnel/stop_times_with_direction.py | 5 +- 2 files changed, 1029 insertions(+), 1 deletion(-) create mode 100644 gtfs_funnel/02_debug_st_direction.ipynb diff --git a/gtfs_funnel/02_debug_st_direction.ipynb b/gtfs_funnel/02_debug_st_direction.ipynb new file mode 100644 index 000000000..be0e1d39d --- /dev/null +++ b/gtfs_funnel/02_debug_st_direction.ipynb @@ -0,0 +1,1025 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 3, + "id": "1371ca85-275c-4fb1-a81b-69c7af148053", + "metadata": {}, + "outputs": [], + "source": [ + "from update_vars import analysis_date_list, SCHED_GCS, GTFS_DATA_DICT" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "44d84321-f7b5-4d3b-bc64-5854512a2a18", + "metadata": {}, + "outputs": [], + "source": [ + "import datetime\n", + "import geopandas as gpd\n", + "import numpy as np\n", + "import pandas as pd\n", + "import sys\n", + "\n", + "from loguru import logger\n", + "\n", + "from calitp_data_analysis import utils\n", + "from shared_utils import rt_utils\n", + "from segment_speed_utils import helpers\n", + "from segment_speed_utils.project_vars import PROJECT_CRS\n", + "from update_vars import GTFS_DATA_DICT, RT_SCHED_GCS" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "41fd87b3-1a9d-413b-9dda-8e57e61b3a78", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['2025-01-15']" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "analysis_date_list" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "3a63eedc-f625-4c4f-b48c-ccbdc2019b29", + "metadata": {}, + "outputs": [], + "source": [ + "analysis_date = analysis_date_list[0]" + ] + }, + { + "cell_type": "markdown", + "id": "7cb9f228-4e60-49c4-a283-c300ea59110f", + "metadata": {}, + "source": [ + "## Next steps to solve https://github.com/cal-itp/data-analyses/pull/1356" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "228909ff-9402-4be4-b2dc-4ab09ac32f2d", + "metadata": {}, + "outputs": [], + "source": [ + "import stop_times_with_direction as sd" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "b8101ac0-cdb9-4bfe-9bd5-04bf9a6b247c", + "metadata": {}, + "outputs": [], + "source": [ + "EXPORT_FILE = GTFS_DATA_DICT.rt_vs_schedule_tables.stop_times_direction\n", + "\n", + "scheduled_stop_times = sd.prep_scheduled_stop_times(analysis_date)\n", + "\n", + "trip_cols = [\"trip_instance_key\"]\n", + "trip_stop_cols = [\"trip_instance_key\", \"stop_sequence\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "id": "585b67ee-6000-4282-abd1-e117d9549105", + "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", + "
feed_keystop_idstop_sequenceschedule_gtfs_dataset_keytrip_instance_keyshape_array_keystop_namegeometry
27145787a5a0fa93eb3c7a402c0887a4f11f0669255370666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Chase / KatherinePOINT (143436.362 -420025.038)
27148147a5a0fa93eb3c7a402c0887a4f11f0669256380666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Chase / LennoxPOINT (143169.561 -420048.613)
27161217a5a0fa93eb3c7a402c0887a4f11f066695350666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Chase / RanchitoPOINT (143956.624 -419845.037)
27161577a5a0fa93eb3c7a402c0887a4f11f0669254360666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Chase / HazeltinePOINT (143668.058 -419967.744)
27161937a5a0fa93eb3c7a402c0887a4f11f066696390666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Van Nuys / ChasePOINT (142883.028 -420093.918)
27425677a5a0fa93eb3c7a402c0887a4f11f06667441140666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Valley Circle / CanzonetPOINT (125364.090 -426918.777)
27425817a5a0fa93eb3c7a402c0887a4f11f06614487860666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Saticoy / SalePOINT (127206.779 -422123.347)
27425987a5a0fa93eb3c7a402c0887a4f11f06615184980666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Vanowen / BerquistPOINT (125847.611 -423758.251)
27426127a5a0fa93eb3c7a402c0887a4f11f0661346790666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Saticoy / De SotoPOINT (130023.517 -422076.878)
27426297a5a0fa93eb3c7a402c0887a4f11f066151061060666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Valley Circle / HamlinPOINT (123902.277 -424437.038)
\n", + "
" + ], + "text/plain": [ + " feed_key stop_id stop_sequence \\\n", + "2714578 7a5a0fa93eb3c7a402c0887a4f11f066 9255 37 \n", + "2714814 7a5a0fa93eb3c7a402c0887a4f11f066 9256 38 \n", + "2716121 7a5a0fa93eb3c7a402c0887a4f11f066 695 35 \n", + "2716157 7a5a0fa93eb3c7a402c0887a4f11f066 9254 36 \n", + "2716193 7a5a0fa93eb3c7a402c0887a4f11f066 696 39 \n", + "2742567 7a5a0fa93eb3c7a402c0887a4f11f066 6744 114 \n", + "2742581 7a5a0fa93eb3c7a402c0887a4f11f066 14487 86 \n", + "2742598 7a5a0fa93eb3c7a402c0887a4f11f066 15184 98 \n", + "2742612 7a5a0fa93eb3c7a402c0887a4f11f066 1346 79 \n", + "2742629 7a5a0fa93eb3c7a402c0887a4f11f066 15106 106 \n", + "\n", + " schedule_gtfs_dataset_key trip_instance_key \\\n", + "2714578 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "2714814 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "2716121 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "2716157 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "2716193 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "2742567 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "2742581 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "2742598 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "2742612 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "2742629 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "\n", + " shape_array_key stop_name \\\n", + "2714578 59459dbb9f7ce418d6f88f65e905d583 Chase / Katherine \n", + "2714814 59459dbb9f7ce418d6f88f65e905d583 Chase / Lennox \n", + "2716121 59459dbb9f7ce418d6f88f65e905d583 Chase / Ranchito \n", + "2716157 59459dbb9f7ce418d6f88f65e905d583 Chase / Hazeltine \n", + "2716193 59459dbb9f7ce418d6f88f65e905d583 Van Nuys / Chase \n", + "2742567 59459dbb9f7ce418d6f88f65e905d583 Valley Circle / Canzonet \n", + "2742581 59459dbb9f7ce418d6f88f65e905d583 Saticoy / Sale \n", + "2742598 59459dbb9f7ce418d6f88f65e905d583 Vanowen / Berquist \n", + "2742612 59459dbb9f7ce418d6f88f65e905d583 Saticoy / De Soto \n", + "2742629 59459dbb9f7ce418d6f88f65e905d583 Valley Circle / Hamlin \n", + "\n", + " geometry \n", + "2714578 POINT (143436.362 -420025.038) \n", + "2714814 POINT (143169.561 -420048.613) \n", + "2716121 POINT (143956.624 -419845.037) \n", + "2716157 POINT (143668.058 -419967.744) \n", + "2716193 POINT (142883.028 -420093.918) \n", + "2742567 POINT (125364.090 -426918.777) \n", + "2742581 POINT (127206.779 -422123.347) \n", + "2742598 POINT (125847.611 -423758.251) \n", + "2742612 POINT (130023.517 -422076.878) \n", + "2742629 POINT (123902.277 -424437.038) " + ] + }, + "execution_count": 64, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "scheduled_stop_times.query('trip_instance_key == \"0c9b170807546736de0820cf8860bc00\"').head(10) # not sorted..." + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "6611bb6f-e903-43d2-a282-cc4e1385cf24", + "metadata": {}, + "outputs": [], + "source": [ + "trip_cols = [\"trip_instance_key\"]\n", + "trip_stop_cols = [\"trip_instance_key\", \"stop_sequence\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "72983c13-21f2-4ef2-b862-ebbbf985aff9", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/conda/lib/python3.9/site-packages/shapely/linear.py:90: RuntimeWarning: invalid value encountered in line_locate_point\n", + " return lib.line_locate_point(line, other)\n" + ] + } + ], + "source": [ + "stop_meters = sd.get_projected_stop_meters(scheduled_stop_times, analysis_date)" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "44f77c55-1548-4af9-b4c8-11d24f336d1a", + "metadata": {}, + "outputs": [], + "source": [ + "gdf = scheduled_stop_times[\n", + " trip_stop_cols + [\"stop_id\", \"stop_name\", \"geometry\"]\n", + "].assign(\n", + " stop_meters = stop_meters\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "423601fb-53cd-4d7d-b6ac-9ca683b81e4e", + "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", + "
trip_instance_keystop_sequencestop_idstop_namegeometrystop_meters
27145780c9b170807546736de0820cf8860bc00379255Chase / KatherinePOINT (143436.362 -420025.038)20462.186863
27148140c9b170807546736de0820cf8860bc00389256Chase / LennoxPOINT (143169.561 -420048.613)12921.438656
27161210c9b170807546736de0820cf8860bc0035695Chase / RanchitoPOINT (143956.624 -419845.037)1247.844911
27161570c9b170807546736de0820cf8860bc00369254Chase / HazeltinePOINT (143668.058 -419967.744)5083.356481
27161930c9b170807546736de0820cf8860bc0039696Van Nuys / ChasePOINT (142883.028 -420093.918)18517.731848
.....................
27467260c9b170807546736de0820cf8860bc00130021Burbank Airport RitcPOINT (151920.171 -423388.371)36133.141573
27468220c9b170807546736de0820cf8860bc001183325Mulholland / WillensPOINT (126618.430 -428461.805)18103.141413
27468360c9b170807546736de0820cf8860bc001306575Topanga Canyon / ErwinPOINT (128506.351 -424953.278)18103.141413
27468970c9b170807546736de0820cf8860bc004315124Van Nuys / ArmintaPOINT (142901.964 -421307.549)33286.017759
27470140c9b170807546736de0820cf8860bc008314494Saticoy / Topanga CanyonPOINT (128412.831 -422103.258)32720.390048
\n", + "

134 rows × 6 columns

\n", + "
" + ], + "text/plain": [ + " trip_instance_key stop_sequence stop_id \\\n", + "2714578 0c9b170807546736de0820cf8860bc00 37 9255 \n", + "2714814 0c9b170807546736de0820cf8860bc00 38 9256 \n", + "2716121 0c9b170807546736de0820cf8860bc00 35 695 \n", + "2716157 0c9b170807546736de0820cf8860bc00 36 9254 \n", + "2716193 0c9b170807546736de0820cf8860bc00 39 696 \n", + "... ... ... ... \n", + "2746726 0c9b170807546736de0820cf8860bc00 1 30021 \n", + "2746822 0c9b170807546736de0820cf8860bc00 118 3325 \n", + "2746836 0c9b170807546736de0820cf8860bc00 130 6575 \n", + "2746897 0c9b170807546736de0820cf8860bc00 43 15124 \n", + "2747014 0c9b170807546736de0820cf8860bc00 83 14494 \n", + "\n", + " stop_name geometry \\\n", + "2714578 Chase / Katherine POINT (143436.362 -420025.038) \n", + "2714814 Chase / Lennox POINT (143169.561 -420048.613) \n", + "2716121 Chase / Ranchito POINT (143956.624 -419845.037) \n", + "2716157 Chase / Hazeltine POINT (143668.058 -419967.744) \n", + "2716193 Van Nuys / Chase POINT (142883.028 -420093.918) \n", + "... ... ... \n", + "2746726 Burbank Airport Ritc POINT (151920.171 -423388.371) \n", + "2746822 Mulholland / Willens POINT (126618.430 -428461.805) \n", + "2746836 Topanga Canyon / Erwin POINT (128506.351 -424953.278) \n", + "2746897 Van Nuys / Arminta POINT (142901.964 -421307.549) \n", + "2747014 Saticoy / Topanga Canyon POINT (128412.831 -422103.258) \n", + "\n", + " stop_meters \n", + "2714578 20462.186863 \n", + "2714814 12921.438656 \n", + "2716121 1247.844911 \n", + "2716157 5083.356481 \n", + "2716193 18517.731848 \n", + "... ... \n", + "2746726 36133.141573 \n", + "2746822 18103.141413 \n", + "2746836 18103.141413 \n", + "2746897 33286.017759 \n", + "2747014 32720.390048 \n", + "\n", + "[134 rows x 6 columns]" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "gdf.query('trip_instance_key == \"0c9b170807546736de0820cf8860bc00\"')" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "b7c8a110-ff17-406f-9f77-1353606c873d", + "metadata": {}, + "outputs": [], + "source": [ + "gdf2 = gdf.sort_values(trip_stop_cols) # sort here" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "id": "25e6ef59-bca5-4895-9606-9d8452d04439", + "metadata": {}, + "outputs": [], + "source": [ + "# too slow on full gdf to add to script?\n", + "check_monotonic = gdf2.iloc[:100000,:].groupby(trip_cols).stop_sequence.apply(lambda x: x.is_monotonic_increasing)\n", + "assert check_monotonic.all(), 'gdf must be sorted by trip_instance_key, stop_sequence'" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "c7dc3832-298b-49f6-97ab-74098adb3799", + "metadata": {}, + "outputs": [], + "source": [ + "gdf3 = gdf2.assign(\n", + " prior_geometry = (gdf2.groupby(trip_cols)\n", + " .geometry\n", + " .shift(1)),\n", + " prior_stop_sequence = (gdf2.groupby(trip_cols)\n", + " .stop_sequence\n", + " .shift(1)),\n", + " # add subseq stop info here\n", + " subseq_stop_sequence = (gdf2.groupby(trip_cols)\n", + " .stop_sequence\n", + " .shift(-1)),\n", + " subseq_stop_id = (gdf2.groupby(trip_cols)\n", + " .stop_id\n", + " .shift(-1)),\n", + " subseq_stop_name = (gdf2.groupby(trip_cols)\n", + " .stop_name\n", + " .shift(-1)),\n", + ").fillna({\n", + " **{c: \"\" for c in [\"subseq_stop_id\", \"subseq_stop_name\"]}\n", + "})" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "df1d3498-12ba-40bb-b279-d31dbb90bbe5", + "metadata": {}, + "outputs": [], + "source": [ + "gdf3.query('trip_instance_key == \"0c9b170807546736de0820cf8860bc00\"').head(3) # looks good after sort" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "id": "0da042d8-bfae-44b7-98a3-1074b6ef4825", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 53, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import importlib\n", + "importlib.reload(sd)" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "id": "e474435b-455d-40a0-9103-14aa57c24b16", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/conda/lib/python3.9/site-packages/shapely/linear.py:90: RuntimeWarning: invalid value encountered in line_locate_point\n", + " return lib.line_locate_point(line, other)\n", + "2025-02-12 17:10:33.733 | INFO | stop_times_with_direction:assemble_stop_times_with_direction:212 - scheduled stop times with direction 2025-01-15: 0:06:49.325982\n" + ] + } + ], + "source": [ + "test_fix = sd.assemble_stop_times_with_direction(analysis_date, GTFS_DATA_DICT)" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "id": "37e72495-b702-4888-9796-6c8fff1d9e21", + "metadata": {}, + "outputs": [], + "source": [ + "EXPORT_FILE = GTFS_DATA_DICT.rt_vs_schedule_tables.stop_times_direction" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "id": "7df04bd1-bbeb-42aa-99ee-6fdb251c2665", + "metadata": {}, + "outputs": [], + "source": [ + "path = f\"{RT_SCHED_GCS}{EXPORT_FILE}_{analysis_date}.parquet\"" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "id": "f2dffd0e-f1e9-46d1-81d5-aad9cafdd7e0", + "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", + "
feed_keystop_idstop_sequenceschedule_gtfs_dataset_keytrip_instance_keyshape_array_keystop_namegeometrystop_metersprior_stop_sequencesubseq_stop_sequencestop_primary_directionstop_pairstop_pair_name
2402547a5a0fa93eb3c7a402c0887a4f11f0663002110666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Burbank Airport RitcPOINT (151920.171 -423388.371)36133.141573NaN2.0Unknown30021__3625Burbank Airport Ritc__Hollywood Way / Thornton
2402557a5a0fa93eb3c7a402c0887a4f11f066362520666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Hollywood Way / ThorntonPOINT (152164.852 -423047.563)35377.7180101.03.0Northbound3625__12116Hollywood Way / Thornton__Hollywood Way / Winona
2402567a5a0fa93eb3c7a402c0887a4f11f0661211630666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Hollywood Way / WinonaPOINT (152163.927 -422698.157)17547.4369012.04.0Northbound12116__2499Hollywood Way / Winona__Hollywood Way / Tulare
2402577a5a0fa93eb3c7a402c0887a4f11f066249940666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Hollywood Way / TularePOINT (152163.038 -422334.989)5248.6826093.05.0Northbound2499__3567Hollywood Way / Tulare__Burbank Airport North
2402587a5a0fa93eb3c7a402c0887a4f11f066356750666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Burbank Airport NorthPOINT (152086.762 -422003.426)6869.1575954.06.0Northbound3567__3252Burbank Airport North__San Fernando / Lockheed
.............................................
2403837a5a0fa93eb3c7a402c0887a4f11f06665751300666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Topanga Canyon / ErwinPOINT (128506.351 -424953.278)18103.141413129.0131.0Northbound6575__6597Topanga Canyon / Erwin__Victory / Topanga Canyon
2403847a5a0fa93eb3c7a402c0887a4f11f06665971310666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Victory / Topanga CanyonPOINT (128552.060 -424482.483)13357.937722130.0132.0Northbound6597__7148Victory / Topanga Canyon__Victory / Owensmouth
2403857a5a0fa93eb3c7a402c0887a4f11f06671481320666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Victory / OwensmouthPOINT (128919.099 -424394.634)8608.096062131.0133.0Eastbound7148__5507Victory / Owensmouth__Canoga Station
2403867a5a0fa93eb3c7a402c0887a4f11f06655071330666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Canoga StationPOINT (129268.917 -424046.607)22395.340227132.0134.0Eastbound5507__5505Canoga Station__Rocketdyne Layover
2403877a5a0fa93eb3c7a402c0887a4f11f06655051340666caf3ec1ecc96b74f4477ee4bc9390c9b170807546736de0820cf8860bc0059459dbb9f7ce418d6f88f65e905d583Rocketdyne LayoverPOINT (129268.398 -424011.552)8883.330427133.0NaNNorthbound5505__Rocketdyne Layover__
\n", + "

134 rows × 14 columns

\n", + "
" + ], + "text/plain": [ + " feed_key stop_id stop_sequence \\\n", + "240254 7a5a0fa93eb3c7a402c0887a4f11f066 30021 1 \n", + "240255 7a5a0fa93eb3c7a402c0887a4f11f066 3625 2 \n", + "240256 7a5a0fa93eb3c7a402c0887a4f11f066 12116 3 \n", + "240257 7a5a0fa93eb3c7a402c0887a4f11f066 2499 4 \n", + "240258 7a5a0fa93eb3c7a402c0887a4f11f066 3567 5 \n", + "... ... ... ... \n", + "240383 7a5a0fa93eb3c7a402c0887a4f11f066 6575 130 \n", + "240384 7a5a0fa93eb3c7a402c0887a4f11f066 6597 131 \n", + "240385 7a5a0fa93eb3c7a402c0887a4f11f066 7148 132 \n", + "240386 7a5a0fa93eb3c7a402c0887a4f11f066 5507 133 \n", + "240387 7a5a0fa93eb3c7a402c0887a4f11f066 5505 134 \n", + "\n", + " schedule_gtfs_dataset_key trip_instance_key \\\n", + "240254 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "240255 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "240256 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "240257 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "240258 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "... ... ... \n", + "240383 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "240384 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "240385 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "240386 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "240387 0666caf3ec1ecc96b74f4477ee4bc939 0c9b170807546736de0820cf8860bc00 \n", + "\n", + " shape_array_key stop_name \\\n", + "240254 59459dbb9f7ce418d6f88f65e905d583 Burbank Airport Ritc \n", + "240255 59459dbb9f7ce418d6f88f65e905d583 Hollywood Way / Thornton \n", + "240256 59459dbb9f7ce418d6f88f65e905d583 Hollywood Way / Winona \n", + "240257 59459dbb9f7ce418d6f88f65e905d583 Hollywood Way / Tulare \n", + "240258 59459dbb9f7ce418d6f88f65e905d583 Burbank Airport North \n", + "... ... ... \n", + "240383 59459dbb9f7ce418d6f88f65e905d583 Topanga Canyon / Erwin \n", + "240384 59459dbb9f7ce418d6f88f65e905d583 Victory / Topanga Canyon \n", + "240385 59459dbb9f7ce418d6f88f65e905d583 Victory / Owensmouth \n", + "240386 59459dbb9f7ce418d6f88f65e905d583 Canoga Station \n", + "240387 59459dbb9f7ce418d6f88f65e905d583 Rocketdyne Layover \n", + "\n", + " geometry stop_meters prior_stop_sequence \\\n", + "240254 POINT (151920.171 -423388.371) 36133.141573 NaN \n", + "240255 POINT (152164.852 -423047.563) 35377.718010 1.0 \n", + "240256 POINT (152163.927 -422698.157) 17547.436901 2.0 \n", + "240257 POINT (152163.038 -422334.989) 5248.682609 3.0 \n", + "240258 POINT (152086.762 -422003.426) 6869.157595 4.0 \n", + "... ... ... ... \n", + "240383 POINT (128506.351 -424953.278) 18103.141413 129.0 \n", + "240384 POINT (128552.060 -424482.483) 13357.937722 130.0 \n", + "240385 POINT (128919.099 -424394.634) 8608.096062 131.0 \n", + "240386 POINT (129268.917 -424046.607) 22395.340227 132.0 \n", + "240387 POINT (129268.398 -424011.552) 8883.330427 133.0 \n", + "\n", + " subseq_stop_sequence stop_primary_direction stop_pair \\\n", + "240254 2.0 Unknown 30021__3625 \n", + "240255 3.0 Northbound 3625__12116 \n", + "240256 4.0 Northbound 12116__2499 \n", + "240257 5.0 Northbound 2499__3567 \n", + "240258 6.0 Northbound 3567__3252 \n", + "... ... ... ... \n", + "240383 131.0 Northbound 6575__6597 \n", + "240384 132.0 Northbound 6597__7148 \n", + "240385 133.0 Eastbound 7148__5507 \n", + "240386 134.0 Eastbound 5507__5505 \n", + "240387 NaN Northbound 5505__ \n", + "\n", + " stop_pair_name \n", + "240254 Burbank Airport Ritc__Hollywood Way / Thornton \n", + "240255 Hollywood Way / Thornton__Hollywood Way / Winona \n", + "240256 Hollywood Way / Winona__Hollywood Way / Tulare \n", + "240257 Hollywood Way / Tulare__Burbank Airport North \n", + "240258 Burbank Airport North__San Fernando / Lockheed \n", + "... ... \n", + "240383 Topanga Canyon / Erwin__Victory / Topanga Canyon \n", + "240384 Victory / Topanga Canyon__Victory / Owensmouth \n", + "240385 Victory / Owensmouth__Canoga Station \n", + "240386 Canoga Station__Rocketdyne Layover \n", + "240387 Rocketdyne Layover__ \n", + "\n", + "[134 rows x 14 columns]" + ] + }, + "execution_count": 60, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "gpd.read_parquet(path).query('trip_instance_key == \"0c9b170807546736de0820cf8860bc00\"') # looks good after sort" + ] + } + ], + "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/gtfs_funnel/stop_times_with_direction.py b/gtfs_funnel/stop_times_with_direction.py index f6205d757..bdbd00fad 100644 --- a/gtfs_funnel/stop_times_with_direction.py +++ b/gtfs_funnel/stop_times_with_direction.py @@ -116,7 +116,10 @@ def find_prior_subseq_stop_info( ].assign( stop_meters = stop_meters ) - + gdf = gdf.sort_values(trip_stop_cols) # important! gdf loses sort after prep_scheduled_stop_times + # slow check , commenting out since we're sorting right here (is there a faster way to test?) + # check_monotonic = gdf.groupby(trip_cols).stop_sequence.apply(lambda x: x.is_monotonic_increasing) + # assert check_monotonic.all(), 'gdf must be sorted by trip_instance_key, stop_sequence' gdf = gdf.assign( prior_geometry = (gdf.groupby(trip_cols) .geometry