Giter Site home page Giter Site logo

opentraffic / api Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 3.0 30 KB

[DEPRECATED] OTv2: API for querying the centralized Datastore

Home Page: https://github.com/opentraffic/datastore/

License: GNU Lesser General Public License v3.0

Shell 3.07% Python 96.93%

api's People

Contributors

drewda avatar gknisely avatar heffergm avatar kevinkreiser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

api's Issues

re-open connections

If the db is bounced or goes down, we need re-open connections. Currently, we have to bounce the api.

query API for network statistics

The Datastore API will support a range of live queries for simple analysis of roadway network statistics.

The Datastore API will offer similar functionality to the existing POC's Traffic Engine API, which is partially documented at https://github.com/WorldBank-Transport/traffic-engine-app/wiki/Functionality-Overview

(Note the Datastore API will also offer an endpoint for traffic-influenced routing in the future--that work be fleshed out under another issue.)

query parameters to accept for the network statistics API endpoint:

  • bounding box for geographic extent [required]
  • start datetime and end datetime for temporal extent [optional]
  • array of one or more days-of-week (Monday, Tuesday, etc.) to filter results by day(s) [optional]
  • array of one or more hours-of-day (00:00, 01:00, 02:00, etc.) to filter results by hour(s) [optional]
  • comparison start datetime and comparison end datetime, when comparing between two temporal extents [optional]

The only query parameter that should be required is bounding box. All temporal query parameters are optional.

response contents:

  • geometries (as GeoJSON)
  • overall average speed per segment across entire temporal extent
  • average speed per segment by hour + day per week (to power bar charts)
  • observation count per segment by hour + day per week (only for authorized users)
  • When comparing across two different timeframes, also:
    • significance figure from a two-sample paired t-test
    • percentage change in speed by day of week + hour of day (to power bar charts)

Access to OSMLR segment geometries

The OSMLR generator application generates geometries for each OSMLR segment as GeoJSON tiles. The Datastore will need to have access to these geometries in some form in order to respond to API queries for network statistics ( #1 ).

First, Datastore will need to be able to look up segments by bounding box. Second, Datastore will need to include geometries for the appropriate segments in API response.

//cc @kevinkreiser please edit or expand as you see fit!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.