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

segment speeds for speedmaps part 2 #1278

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

edasmalchi
Copy link
Member

  • complete groundwork for Epic - Transit Speed Maps Data Source Migration #1186
  • remove route_short_name from grouping cols, instead re-add later (this was inadvertently dropping routes with only a long name)
  • new function and associated catalog entries for speedmap segments by all times of day
  • new function for getting scheduled frequencies across all time periods

Copy link

github-actions bot commented Nov 5, 2024

@edasmalchi
Copy link
Member Author

still pending (possibly in separate PRs):

  • trivial modifications to parameterized nb
  • deprecate/remove old rt_analysis code
  • modify webapp map over in data-infra to show stop pair and segment id in tooltip, use new trips_hr_sch column, remove stop_sequence

@tiffanychu90
Copy link
Member

Thanks! This all looks good to me. Approving this because my comment isn't a blocker, so it can be incorporated in future work.

I recently added this into portfolio_utils to help generate / overwrite the portfolio yaml

Small example of how it'd be used for you in stage_run_portfolio.py and you can see how it'd work on a test yml. I'm in the process of updating it for digest.

import pandas as pd
import shutil

from shared_utils import portfolio_utils

# make a copy of rt.yml and see if we can test the overwrite
TEST_YML = "../portfolio/sites/test_rt.yml"
shutil.copy("../portfolio/sites/rt.yml", TEST_YML)

test_dict = {
    'itp_id': [18, 108, 4, 56],
    'caltrans_district': [
        '01 - Eureka',
        '01 - Eureka',
        '04 - Oakland',
        '04 - Oakland']
}

test_df = pd.DataFrame(test_dict)

portfolio_utils.create_portfolio_yaml_chapters_with_sections(
    TEST_YML ,
    test_df,
    chapter_info = {
        "column": "caltrans_district",
        "name": "district",
        "caption_prefix": "District ",
        "caption_suffix": "",
    },
    section_info = {
        "column": "itp_id",
        "name": "Operator ID",
    },
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants