Skip to content

Commit

Permalink
Fix table columns and data dictionary table
Browse files Browse the repository at this point in the history
  • Loading branch information
allejo committed Jan 31, 2024
1 parent 295cb59 commit 0a2ce76
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
30 changes: 15 additions & 15 deletions src/metadata/providers/dictionary.csv
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
column,type,definition
agency_name,string,The name of the TA as specified in NTD.
ntd_id,string,"The organization's ID in the National Transit Database / FTA agency ID number. Data entry processes / sources of truth for this field have changed over time. As of May 2023, the source is the `raw_ntd_id` field in the Airtable `organizations` table; for records before May 2023, sources were some combination of the `NTD agency info` table in Airtable and the `ntd_agency_to_organizations` CSV seed file in this dbt project (now renamed to `_deprecated__ntd_agency_to_organizations`)."
hq_city,string,The city where this TA's headquarters is located.
hq_county,string,The county where this TA's headquarters is located.
counties_served,string,A semi-colon delimited list of counties that are serviced by the parent organization this TA belongs to; this TA may not service all counties listed.
agency_website,string,The website for this TA.
caltrans_district_id,int64,null
caltrans_district_name,string,null
is_public_entity,bool,"Formula in source system returns true if the `organization_type` column has been set to one of the following: City/Town, Independent Agency, MPO/RTPA, County, Tribe, Federal Government, Joint Powers Agency, or Council of Governments"
is_publicly_operating,bool,"Formula in source system returns true value if the following criteria are met: 1. Service has “Operating” value in `operational_status` column (for organizations, only at least one managed service must meet this criterion) 2. Service is rideable by the general public (for organizations, only at least one managed service must meet this criterion) 3. Provider is either an NTD reporter (indicated by non-empty `raw_ntd_id`) or is a public entity."
funding_sources,string,"A semi-colon delimted list of numerical funding program names that this TA's parent organization receives; all non-numerical (e.g. `Public`, `Caltrans`) funding programs are excluded in this column."
vehicles_at_max_service,float64,"(abbreviated as ""voms"") The number of revenue vehicles operated to meet the annual maximum service requirement. This is the revenue vehicle count during the peak season of the year on the week and day that maximum service is provided."
on_demand_vehicles_at_max_service,float64,"(abbreviated as ""voms_dr"") The number of revenue vehicles operated to meet the annual maximum service requirement for NTD categories: Demand Response (DR) and Demand Response Taxi (DT)."
gtfs_schedule_uris,string,A semi-colon delimited list of URLs for GTFS schedules this TA's parent organization has under its umbrella of services; there may be feeds that do not belong to this TA but instead from a sibling service provider within the same parent organization.
column,label,type,definition
agency_name,Agency Name,string,The name of the TA as specified in NTD.
ntd_id,NTD Id,string,"The organization's ID in the National Transit Database / FTA agency ID number. Data entry processes / sources of truth for this field have changed over time. As of May 2023, the source is the `raw_ntd_id` field in the Airtable `organizations` table; for records before May 2023, sources were some combination of the `NTD agency info` table in Airtable and the `ntd_agency_to_organizations` CSV seed file in this dbt project (now renamed to `_deprecated__ntd_agency_to_organizations`)."
hq_city,HQ City,string,The city where this TA's headquarters is located.
hq_county,HQ County,string,The county where this TA's headquarters is located.
counties_served,Counties Served,string,A semi-colon delimited list of counties that are serviced by the parent organization this TA belongs to; this TA may not service all counties listed.
agency_website,Agency Website,string,The website for this TA.
caltrans_district_id,CalTrans District Id,int64,null
caltrans_district_name,CalTrans District Name,string,null
is_public_entity,Is Public Entity,bool,"Formula in source system returns true if the `organization_type` column has been set to one of the following: City/Town, Independent Agency, MPO/RTPA, County, Tribe, Federal Government, Joint Powers Agency, or Council of Governments"
is_publicly_operating,Is Publicly Operating,bool,"Formula in source system returns true value if the following criteria are met: 1. Service has “Operating” value in `operational_status` column (for organizations, only at least one managed service must meet this criterion) 2. Service is rideable by the general public (for organizations, only at least one managed service must meet this criterion) 3. Provider is either an NTD reporter (indicated by non-empty `raw_ntd_id`) or is a public entity."
funding_sources,Founding Sources,string,"A semi-colon delimted list of numerical funding program names that this TA's parent organization receives; all non-numerical (e.g. `Public`, `Caltrans`) funding programs are excluded in this column."
vehicles_at_max_service,VOMS,float64,"(abbreviated as ""voms"") The number of revenue vehicles operated to meet the annual maximum service requirement. This is the revenue vehicle count during the peak season of the year on the week and day that maximum service is provided."
on_demand_vehicles_at_max_service,VOMS DR,float64,"(abbreviated as ""voms_dr"") The number of revenue vehicles operated to meet the annual maximum service requirement for NTD categories: Demand Response (DR) and Demand Response Taxi (DT)."
gtfs_schedule_uris,GTFS Schedule URIs,string,A semi-colon delimited list of URLs for GTFS schedules this TA's parent organization has under its umbrella of services; there may be feeds that do not belong to this TA but instead from a sibling service provider within the same parent organization.
4 changes: 2 additions & 2 deletions src/scripts/providers/layers.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"interpolate",
["linear"],
["get", "num_providers"],
1,
0,
"hsl(208, 36%, 78%)",
20,
5,
"hsl(260, 53%, 36%)"
]
}
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/providers/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ $(function () {
const refresh = (county) => {
if (county && county !== "") {
// filter where service_county column contains county
table.setFilter("service_county", "like", county);
table.setFilter("counties_served", "like", county);
} else {
// clear programmatic filters
table.clearFilter(true);
}

// although not intuitive, this sorts by service_county and then provider
table.setSort([
{ column: "provider", dir: "asc" },
{ column: "service_county", dir: "asc" },
{ column: "counties_served", dir: "asc" },
{ column: "agency_name", dir: "asc" },
]);
};

Expand Down

0 comments on commit 0a2ce76

Please sign in to comment.