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

GTFS Digest Portfolio Tweaks & Cardinal Direction #1173

Merged
merged 9 commits into from
Jul 11, 2024
Merged

Conversation

amandaha8
Copy link
Contributor

@amandaha8 amandaha8 commented Jul 11, 2024

  1. Research Request - add cardinal direction into GTFS analytics pipeline #1135
  • I noticed there are routes that swap cardinal directions - many City of Fairfield routes do so. As such, 2+ charts appear for these routes and this creates confusion for the viewers and begs the question "did these routes actually change?"
  • I took a look at several of these routes with 2+ cardinal directions, plotting all their route geographies across time on a map. While some routes genuinely did change, most stayed the same. Perhaps the cardinal direction switch is due to the vehicle positions collected?
  • To resolve this, I added a new function that takes the most common cardinal direction for each route-direction_id (0/1) pair and overrode all the other cardinal directions over time.
  • Now, all routes have only two graphs.
  1. Research Request - GTFS Digest Portfolio Refactor Summer 2024  #1159
  • Reran a subset of the portfolio incorporating the new cardinal direction changes. Link here
  • Updated README.md with the new template and Methodology copy. @KatrinaMKaiser could you review this using the link above?
  • Updated graphs to be color-blind friendly based on this UCSB guide
  • Cleaned up all python files used to create the portfolio (deleting unused functions, making sure all chart titles reference the readable.yml, etc).

@amandaha8 amandaha8 requested a review from KatrinaMKaiser July 11, 2024 17:38
@amandaha8 amandaha8 merged commit 63107b9 into main Jul 11, 2024
5 checks passed
@amandaha8 amandaha8 deleted the ah_gtfs_digest branch July 11, 2024 17:40
2 similar comments
@@ -45,7 +45,13 @@ def get_day_type(date):
"""
Function to return the day type (e.g., Monday, Tuesday, etc.) from a datetime object.
"""
days_of_week = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
days_of_week = ["Monday",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeats segment_speed_utils.time_helpers, days of week are already set up in a dictionary. example: https://github.com/cal-itp/data-analyses/blob/main/rt_segment_speeds/segment_speed_utils/gtfs_schedule_wrangling.py#L114

"Thursday",
"Friday",
"Saturday",
"Sunday"]
return days_of_week[date.weekday()]

def weekday_or_weekend(row):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for linking the function. I think I can't use it since I have to differentiate Saturday and Sunday for the charts, instead of grouping together under "weekend."

Copy link
Member

@KatrinaMKaiser KatrinaMKaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only minor tweaks, I think the readme looks good!

# GTFS Digest
This portfolio houses performance metrics from GTFS schedule and vehicle positions time-series data for all transit operators by route.
# General Transit Feed Specification (GTFS) Digest
The goal of this website is to give you an overview of transit operators that produce GTFS schedules and/or real-time data. We use data from the National Transit Database, National Association of City Transportation Officials, and GTFS feeds to deliver key insights. You can find details such as the types of routes and the total scheduled hours of public transit service for which an operator runs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be linking to the NTD/NACTO/MobilityData site for GTFS?

To read about the methodology behind and the definitions of terms used throughout our work, please visit [here](https://github.com/cal-itp/data-analyses/blob/main/gtfs_digest/methodology.md).

## Frequently Asked Questions
**Why is time-series table sampling single days?**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is **a** time-series table sampling single days

@@ -22,4 +26,12 @@ The Caltrans Division of Data & Digital Services has been ingesting and collecti

There overlaps with the goals of SB 125. There are a set of performance metrics that could be of interest to the task force, the public, and us! However, GTFS Digest is a **GTFS** digest, which means its primary focus is on metrics that can be derived purely from GTFS, and to do it statewide so we can understand transit operator performance. We based a lot of our metrics on the papers by [Professor Gregory Newmark](https://www.morgan.edu/sap/gregory-newmark) that gave us a roadmap of metrics that could be derived solely from GTFS that would create comparisons of transit operators regardless of size, service area and density.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"There are overlaps"

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.

3 participants