-
Notifications
You must be signed in to change notification settings - Fork 233
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
Add an MDS Metrics API #485
Comments
Charles Noling, please explicit here the use-cases you had in mind for the API during the city-services working group call. |
@whereissean , it would be great if you could be there during the next city-services working group session on May 14th since we plan to discuss the metrics API in details. |
@Retzoh absolutely will be there. Apologies that I couldn't join today. |
I wanted to add some examples of what cities are asking for in their reporting requirement from providers. Some of it could be derived from MDS (if we can agree on how to calculate things) and some is outside of MDS (and should be). Here is Louisville, KY's example from their dockless policy (page 16):
Items with a [* api] (I added) can be derived from the MDS feed but the methodology is not always agreed upon. Other items cannot be derived from MDS. Interesting ones here that could be part of Metrics and are not in MDS are:
It would be good to collect other examples of this from current city policy documents. |
Here are Santa Monica's examples from the Shared Mobility Device Pilot Program Administrative Regulations pages 14-15 (last updated April 2019):
|
The Mobility Data Collaborative recently published their Data Sharing Glossary and Metrics document, referenced above and which OMF reviewed/contributed to, and should be utilized here. |
DC requires 7 additional monthly reports within 10 days of the end of the month. I've included the overarching concepts below but for specific fields please see the document attached. These include: |
Subjects discussed during 2020-05-14 city-services working group call: Presentation by @whereissean: https://docs.google.com/presentation/d/1bg36oyQhZlBCQb07JCUFyVe97WsCAeRCDeXjaFMXYM8/edit?usp=sharing Presentations of reports by @dirkdk (Spin): https://docs.google.com/document/d/1qZvmJzoWrnOVZeaubqxOLNVYKzueWQEaU3C7H3kQ1dw/edit?pli=1# Short-term actions:
|
For discussion around how to request the time period. Should it be interval counts w/ a start date and no end date, or start and end date with interval length only? The first is more machine readable and the latter is more human readable and something a data analyst would use. I think start and end dates are more consistent with MDS and other kinds of APIs where you request data over a time range. And you can specify the interval (minute, hour, day, week, month) over that time range and those values would be returned in an array. |
@whereissean would you mind making your slide deck publicly viewable? |
Some notes from our WG call yesterday:
See also new issue #569 from folks at Spin to cross reference use cases. |
Sorry, appears that permissions were changed on the document. Until I can resolve, here is a new public version: |
thanks @whereissean. @schnuerle would you mind adding the |
r.e. this bit from the doc:
😵 this is the first time I'm seeing mention of this in MDS. is this information that is held by providers? update: will move this discussion to #569 |
It looks like this spec might support operational use cases in a way that would avoid the need for agencies and providers to exchange telemetry data. I.e, it might be a drop-in replacement for For example, as an agency, I'd like to query for the number of vehicles in service in x geography during the last hour. Are there limitations that would prohibit such a use case as the spec is currently proposed? The use case above requires fairly high temporal and spatial resolution, and minimal latency. |
I've reviewed the MDC Glossary and the good news is that methodology looks consistent with the proposed MDS metrics. There were a couple of metrics that were not proposed and a number that are not in MDC Glossary. I've added the ones (maximum/minimum average) that were not in the MDS dockless metrics. I also renamed a number of the proposed metrics to try to align. I also attached a proposed metrics methodology document that discusses how to compute the metrics and compatibility with MDC Glossary definitions. Thanks @joanathan for putting this document together. @joshuaandrewjohnson1 @jfh01 @schnuerle Please have a look in #487. |
We reviewed this issue as part of the second OMF Working Group Steering Committee release Checkpoint. Both WGSCs had some feedback and I'm documenting it here for discussion.
If so, how much value is this to cities, and will they be able to justify the heavy lift implementing an API for this? Why not just pull CSV reports from a city database and share those with providers like they do now? Does an API provide enough benefit? If not, can you clarify how a city can use it and how a provider can use it, both in the issue description and the PR details?
These questions could be explored with a city survey to gauge interest if needed. |
Ah, I completely missed that was being proposed as a city endpoint. As such, it cannot serve as an alternative to consuming raw trip data, and in fact this proposal necessitates adding more attributes to trip records. That answers my own question. |
@johnclary @schnuerle @jfh01 I think there's a misunderstanding here. The Metrics API is not just for Agencies; it could be implemented by Providers. And the consumers of an Agency implementation of metrics are not necessarily (only) Providers, in fact the main use cases are for city-internal consumption by analytics and visualization tools. Yes, this could be an alternative to consuming raw trip data, although in the absence of such data, it makes the metrics essentially impossible to verify. |
That is how I saw the Metrics API as well. It is a standard that can be implemented by Agency or Provider, or even 3rd party Data aggregator. Either with input data from other MDS endpoints, or different sources (like Special Groups data that would only be available to the Provider) |
Note that for 1.1.0 we have merged with #582 the new Geography API to the 'dev' branch. Please update this pull request with the latest code, resolve any conflicts, and make references to the Geography API where appropriate, e.g. with UUIDs. We will be discussing Metrics at this week's Working Group meeting, so if available please come prepared to talk about your latest updates and ideas. |
The content of the 2 Metrics pull requests #486 and #487 have been merged to the new We will leave this issue open until that branch is ready to be merged to |
Is your feature request related to a problem? Please describe.
There is currently no standard way to retrieve metrics calculated from MDS data (
provider
oragency
) or to define a standard set of useful MDS-based data aggregations. We have heard from the OMF community that this leads to a number of problems:Describe the solution you'd like
The proposed Metrics API is intended to help users of MDS - both cities, mobility service providers, and third-party ecosystem services - to have a standard way to consistently describe available metrics, and create an extensible interface for querying core MDS metrics and future metrics still to be defined. It should be a framework to describe how different API users and hosts can:
The goal is to be able to define “Metric X” and then ensure that when “X” is calculated by the city, authorized parties, or transportation providers, the result will be identical. For example, while
n
different methods may exist to calculate the utilization of a vehicle or a fleet for a given time range, the Metrics API is intended to ensure that for given methodk
, the same result will be produced regardless of who conducts the calculation, and there is a standard interface for authorized users to receive this data without requiring access to underlying raw data.The Metrics API is intended to be useful for future MDS use cases, best practices and requirements. Particularly notable is that it provides the foundation to implement data anonymization best practices, such as k-anonymity. It also represents an important component needed to enable new MDS policy types and compliance evaluation as well as operations management use cases that can only be achieved by linking MDS metrics and MDS policy.
This proposed specification is not intended to represent a complete data pipeline or analytics service. It is also not meant to define the complete set of MDS metrics, only a useful starting point.
Is this a breaking change
Impacted Spec
agency
provider
Describe alternatives you've considered
It is hoped that this work can be complementary to other projects working to define, develop, and implement metrics services or metrics processing pipelines for MDS data. Much of this proposal was inspired by excellent work done by OMF member cities and SharedStreets with their SharedStreets Mobility Metrics.
This proposal represents work done without full visibility into the efforts of the Mobility Data Collaborative (MDC). We hope to bring the metrics defined in the Metrics Definitions PR to alignment with those MDC describes, once they become public.
Additional context
This specification received initial input from a variety of OMF contributors, representing city transportation departments (LADOT), ecosystem services stakeholders (Blue Systems, Lacuna, Ellis & Associates), and mobility service providers (Bird). We hope it encourages discussion and creation in the OMF on this important subject. A reference implementation of this API is not included at this time, but hopefully will be developed and contributed following additional community feedback.
Specific thanks to @bhandzo and @HenriJ.
Proposal consists of the following PRs
Metrics API PR #486 and Metrics Definitions PR #487
The text was updated successfully, but these errors were encountered: