-
Notifications
You must be signed in to change notification settings - Fork 243
Description
Is your feature request related to a problem? Please describe.
Cities often request data on how many lower income users we reach with our vehicle service, and how many trips such users take. MDS does not currently support user segmentation. We would oppose attaching any user data to the Trips endpoint as it would involve information close to Personally Identifiable Information (PII) and would make it fairly easy to identify individuals by trip route and user segment. Instead, we propose the solution of providing aggregate trip data by user segment.
Describe the solution you'd like
We propose that Providers provide aggregated data on trips by special user segments, using the new Metrics API. By using aggregation, it should be impossible to trace back this data to individuals. This does mean we need to set meaningful minimals for certain metrics so that the aggregated data has k-anonymity.
The new Metrics API specifies parameters for name, since, interval, dimensions that we will assume these metrics support.
Proposed metrics for special groups:
| Metric | Description |
|---|---|
| special_groups | array of names of special groups as served by Provider. This list will be fairly static. Example values are low_income or students |
| active_users[special_group] | total number of users for given group with at least 1 trip in interval |
| trips[special_group] | count of trips by users of given special group during interval |
| trips.average_duration[special_group] | average duration in seconds of trips by users of given special group during interval |
| trips.median_duration[special_group] | median duration in seconds of trips by users of given special group during interval |
| trips.std_duration[special_group] | standard deviation of duration in seconds of trips by users of given special group during interval |
| trips.average_distance[special_group] | average distance in meters of trips by users of given special group during interval |
| trips.median_distance[special_group] | median distance in meters of trips by users of given special group during interval |
| trips.std_distance[special_group] | standard deviation of distance in meters of trips by users of given special group during interval |
Overall aggregate statistics
For overall usage we can do what is listed below. Please note that this data should be derivable from MDS trip data, minus active users.
| Metric | Description |
|---|---|
| active_users | total number of all users with at least 1 trip in interval |
| trips | count of trips by all users during interval |
| trips.average_duration | average duration in seconds of trips by all users group during interval |
| trips.median_duration | median duration in seconds of trips by all users during interval |
| trips.std_duration | standard deviation of duration in seconds of trips by all users during interval |
| trips.average_distance | average distance in meters of trips by all users during interval |
| trips.median_distance | median distance in meters of trips by all users during interval |
| trips.std_distance | standard deviation of distance in meters of trips by all users during interval |
Is this a breaking change
A breaking change would require consumers or implementors of the API to modify their code for it to continue to function (ex: renaming of a required field or the change in data type of an existing field). A non-breaking change would allow existing code to continue to function (ex: addition of an optional field or the creation of a new optional endpoint).
- No, not breaking
Impacted Spec
For which spec is this feature being requested?
metricsbut only served by Providers. Only Providers will have the raw data
Describe alternatives you've considered
Alternatives would be to add user segments to individual trips in the Trips API. We oppose this method as it would make user identification extremely easy. We currently send this data to cities via manually compiled Excel sheets, and it would be better to have an official API.