Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update shared_utils and segment_speed_utils / fix SHN segments #1283

Merged
merged 12 commits into from
Nov 7, 2024

Conversation

tiffanychu90
Copy link
Member

@tiffanychu90 tiffanychu90 commented Nov 7, 2024

shared_utils / segment_speed_utils

  • Feature Request: Update shared_utils after mart_transit_database changes #1282
  • update schedule_rt_utils for how to grab caltrans_district, which is no longer part of dim_organizations and is part of dim_county_geography.
    • notebook to check results -- note that FlixBus is the only one that moves from D7 to D8, other organizations match previous results
  • to prevent circular imports with segment_speed_utils, move some of the functions there into shared_utils. assume that shared_utils is installed before segment_speed_utils. shared_utils holds general use functions, where as segment_speed_utils supports the GTFS analytics pipeline.
    • create shared_utils.geo_utils to hold geospatial related utility functions...calitp-data-analysis too unwieldy to update quickly
    • segment_speed_utils.wrangle_shapes functions get moved into other geo_utils or segment_calcs references updated
    • segment_speed_utils.time_helpers moves over into shared_utils, references updated

shared_data

  • postmile segments sometimes draw straight lines, which don't follow roads
  • fix this by adopting an idea once used for speeds work, where we subset into the relevant coordinates of a line and use that to create the highway segment. this better follows the curves in the road
    • use nearest_snap from speeds pipeline to cut segments in shared_data.py
  • these segments can be used for vulnerability risk analysis work
  • TODO: investigate the empty geometries are created
    • how we order the postmiles to find the current postmile and subsequent postmile is important
    • SHN has several columns to uniquely identify a linestring route, routes (suffix), pmrouteid, begin/end postmile, begin/end odometer. avoiding multilinestrings because we can't segment those nicely.
    • are empty geometries simply at the endpoints? is it ok to be empty?
    • check whether we can adjust the grouping to avoid as-the-crow-flies-straight-lines, while maintaining segments that hug curves in the road
  • Research Request - Map PeMS data #1233

@tiffanychu90 tiffanychu90 linked an issue Nov 7, 2024 that may be closed by this pull request
5 tasks
@tiffanychu90 tiffanychu90 added the tooling Work related to the management of our tooling and shared modules label Nov 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

nbviewer URLs for impacted notebooks:

@tiffanychu90 tiffanychu90 changed the title Fix shn segments update shared_utils and segment_speed_utils / fix SHN segments Nov 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

nbviewer URLs for impacted notebooks:

Copy link

github-actions bot commented Nov 7, 2024

nbviewer URLs for impacted notebooks:

@tiffanychu90 tiffanychu90 merged commit 6adecac into main Nov 7, 2024
2 checks passed
@tiffanychu90 tiffanychu90 deleted the fix-shn-segments branch November 7, 2024 22:29
Copy link

github-actions bot commented Nov 7, 2024

nbviewer URLs for impacted notebooks:

@tiffanychu90 tiffanychu90 mentioned this pull request Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Work related to the management of our tooling and shared modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Update shared_utils after mart_transit_database changes
1 participant