-
Notifications
You must be signed in to change notification settings - Fork 16
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
Improve transit database documentation #3774
Open
evansiroky
wants to merge
3
commits into
main
Choose a base branch
from
transit-database-docs-update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+50
−21
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,12 @@ Inconsistent use of the term `agency` can be confusing, so this section of the d | |
|
||
| <span style="white-space: nowrap;">Area of Focus</span> | How to Identify an `agency` | | ||
| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| **Organizations** | Within the [California Transit Base](california-transit), organizations can represent transit agencies or other organizations that don't provide transit service. Some of these entities may "manage" several transit services. Some of these organizations have a built-in crosswalk to NTD data via the `ntd_id_2022` column. | | ||
| **Services** | Within the [California Transit Base](california-transit), services represent a type of transit "product" that people can use to travel. Services are differentiated if there is a difference in any of the following characteristics: <ol><li>Provider of the service</li><li>"Super-mode" of the service.</li><li>Whether the service is a "fixed-route" service.</li><li>Whether there are different "rider requirements" that passengers must qualify for in order to ride.</li></ol> Often times, organizations (especially large transit agencies) will "manage" multiple services. <br/><br/>**Examples of `services` for OCTA:**<br/><ul><li>`Orange County Transportation Authority`: fixed-route bus service</li><li>`OC Streetcar`: fixed-route streetcar service</li><li>`OC ACCESS`: paratransit demand-response service</li><li>`OC Flex`: a demand-response service open to public</li></ul>| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you define what super mode means in this context? |
||
| **NTD Agencies** | Within the NTD data in the warehouse, there are various organizations that have provided transit data on an agency-wide basis. These organizations are all associated with each other via an "NTD ID". These NTD Agencies can be linked to California Transit organizations by joining the `NTD ID` with `organizations.ntd_id_2022`. | | ||
| **GTFS Datasets** | For both GTFS Static and GTFS Real-Time data, when trying to analyze GTFS datasets it is easiest to think of `agency` as **"unique feed publisher"**, with the exception of the combined regional feed in the Bay Area, as it is a regional reporter that publishes duplicates of other feeds that we also consume.<br/><br/>**To identify "unique feed publishers":**<ul><li>Decide whether customer-facing feeds or agency feeds make sense for the analysis. For data quality analyses, customer-facing is crucial; for transit planning analyses, agency subfeeds is more relevant. </li><li>Deduplicate feeds</li></ul> | | ||
| **GTFS-Provider-Service Relationships** | In the warehouse, this is the relationship between `organizations` and the `services` they manage. An agency can be interpreted as both depending on the use case. <br/><br/>This is not an exhaustive list of all services managed by providers, only those that we are targeting to get into GTFS reporting.<br/><br/>Each record defines an organization and one of it's services. For the most part, each service is managed by a single organization with a small number of exceptions (e.g. *Solano Express*, which is jointly managed by Solano and Napa). In all cases, it is best to define how you are using `agency` within your analyses.<br/><br/>**Reference table**: Use this table to identify provider-service relationships<br/> `cal-itp-data-infra.mart_transit_database.dim_provider_gtfs_data`<ul><li>Column: `organization_name`</li><li>Column: `mobility_service`</li><br/> | | ||
| **Non-GTFS Datasets** | Depending on the data you are using, defining an agency can change. In most cases, an `agency` refers to a public entity. For analyses that include non-public entities, `organization` can be used as a catch-all term to include local government agencies and other entities that may not fall under this definition of `agency`.<br/><br/>**Examples of `agency` definitions:**<br/><ul><li>[DLA Local Public Agency](https://dot.ca.gov/-/media/dot-media/programs/local-assistance/documents/guide/dla-glossary052022.pdf): "A California City, county, tribal government or other local public agency. In many instances this term is used loosely to include nonprofit organizations." | | ||
| **AgencyID Dataset** | The Transit Data Quality Team produced a dataset crosswalk in Airtable between 5 tables representing "organizations" in different internal Caltrans systems. Some of these systems had multiple records for a single entity. This dataset is not updated on a regular basis. | | ||
| **Other Datasets** | Depending on the data you are using, defining an agency can change. In most cases, an `agency` refers to a public entity. For analyses that include non-public entities, `organization` can be used as a catch-all term to include local government agencies and other entities that may not fall under this definition of `agency`.<br/><br/>**Examples of `agency` definitions:**<br/><ul><li>[DLA Local Public Agency](https://dot.ca.gov/-/media/dot-media/programs/local-assistance/documents/guide/dla-glossary052022.pdf): "A California City, county, tribal government or other local public agency. In many instances this term is used loosely to include nonprofit organizations." | | ||
|
||
**Note**: Defining your unit of analysis within your analyses — whether it be `agency` or `organization` or another term — can help clarify how you are using the term. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give an example of an entity that manages several transit services and an example of an organization that doesn't provide transit service?