cal-itp / data-analyses

Place for sharing quick reports, and works in progress
https://analysis.calitp.org
27 stars 6 forks source link

MSD Dashboard Metric: Number of feeds with data about physical accessibility #165

Closed evansiroky closed 1 year ago

evansiroky commented 3 years ago

Question

How many feeds have data about physical accessibility?

This question can be answered by resolving cal-itp/data-infra#561 and cal-itp/data-infra#562, therefore it is blocked for now.

Metrics

The exact criteria deciding whether a feed "has data about physical accessibility" could be determined in various ways. See proposed idea for an MVP or a more rigorous analysis.

MVP:

More rigorous analysis:

Data sources

(Data Servicess Team to Copy and Fill Out Below)

The QuVR MD template below will be filled out by a member of the data services team. This allows us to describe the request, in a way that is easy to hand-off for analysis. After the research phase, we will sync with the asker to figure out if the metric and dashboard pieces are needed.

Before starting research:

After reviewing research with the asker:

evansiroky commented 2 years ago

@tiffanychu90

Let's try to answer this question in two ways in a notebook at first.

The first way is to calculate the total number of feeds that meet all of the 3 conditions:

  1. 100% of stops have a value of 1 or 2 in the wheelchair_boarding field.
  2. 100% of trips have a value of 1 or 2 in the wheelchair_accessible field.
  3. If any of the stops have a parent stop, there needs to be at least 1 record in the pathways file. If no stops have a parent stop, then this criteria is satisfied.

The second way is to give a weighted answer by adding up the per-feed score across all feeds where a feed's score is calculated as follows:

# set a pathways_required variable to true if any of the stops have a parent stop defined
num_parent_stops = count_num_parent_stops()
pathways_required = num_parent_stops > 0

# find weight to use for trips and stops based on whether pathways data is required
stops_and_trips_weight = 0.3333 if pathways_required else 0.5

# calculate overall accessible score
feed_score = (
    stops_and_trips_weight * calculate_percent_of_stops_with_explicitly_defined_wheelchair_code() + 
    stops_and_trips_weight * calculate_percent_of_trips_with_explicitly_defined_wheelchair_code() + 
    # TODO: a more rigorous analysis that checks if each child-stop of a parent is able to be accessed to 
    # every other child-stop of the parent stop would be needed to calculate a more realistic value here.
    # Until then, a full score on pathways-completeness is given if more than 0 pathways entries exist.
    (0 if not pathways_required else 0.3333 if count_num_pathways() > 0 else 0)
) / (3 if pathways_required else 2)
e-lo commented 2 years ago

MVP:

Presence of stops#wheelchair_boarding field Presence of trips#wheelchair_accessible field Presence of non-empty pathways table when at least one child_stop within parent_stop exists in stops

Can we make the MVP at least some non-blank values? Should be trivially more diff.

tiffanychu90 commented 1 year ago

Notebook work completed. Validations and checks now tracked differently in GTFS Features dashboard.