Giter Club home page Giter Club logo

kpublictransport's Introduction

KPublicTransport

A library for accessing realtime public transport data and for performing public transport journey queries.

This includes:

  • Finding bus stops or train stations, departures/arrivals from there, and journeys between those.
  • Path and routing information for individual transport sections of a journey.
  • Information about train coach and train station platform layouts.
  • Information about rental vehicle positions and availability, such as shared bikes or scooters.
  • Realtime information about the operational status of elevators or escalators.
  • Unified access to onboard API on trains for obtaining the current position and journey.

!! Before using this, please read the license compliance and attribution section below !!

Data Model

The key elements are:

  • KPublicTransport::Journey (getting from one place to another)
  • KPublicTransport::Stopover (departures/arrivals)
  • KPublicTransport::Location (a place, stop, or train station, rental vehicle dock, floating rental vehicle, elevator/escalator, ie. anything that has a geo coordinate associated with it).

Supported Operations

  • Location searches: retrieve stop information based on name or geo coordinates.
  • Stopover (arrival/departure) queries: retrieve base schedule and if available realtime information about upcoming arrivals and departures at a stop.
  • Journey queries: obtain ways to get from A to B.
  • Vehicle and platform layout queries: information about where coaches stop on a platform, and how a platform is structured.

All operations can be started from KPublicTransport::Manager with an API similar to QNetworkAccessManager.

Onboard API access is available via the KPublicTransport::OnboardStatus class.

Backends

All data is retrieved from online backend services, this library is not offline capable. The following Free Software/Open Data backend types are supported:

Additionally, a few proprietary/vendor-specific backends are supported too though.

Configurations for about 70 backend services can be found in 'src/lib/networks'. Backend service configations follow the Transport API Repository format.

License Compliance and Attribution

When using the data retrieved by this library you need to comply with the license terms of the backends this is coming from, in particular https://www.navitia.io/api-term-of-use.

Attribution information that need to be displayed in an appropriate place in the application using this are provided globally via KPublicTransport::Manager::attributions() as well as more fine-grained per query reply via KPublicTransport::Reply::attributions().

Besides attributing backend data correctly, this library also contains static data retrieved from Wikidata licensed as CC0 as well as data from OpenStreetMap licensed as ODbL, so those should be appropriately credited in your application as well.

Development

Setting the KPUBLICTRANSPORT_LOG_DIR environment variable will result in all network operations being logged there, grouped by backend, and including the full network traffic. This is useful for example to capture rare scenarios not parsed correctly yet, or for exploring what additional information is available that KPublicTransport does not expose yet.

kpublictransport's People

Contributors

vkrause avatar montel avatar jbruechert avatar nicolasfella avatar heirecka avatar tsdgeos avatar alistair23 avatar kbroulik avatar winterz avatar carlschwan avatar ratijas avatar yurchor avatar tobiasfella avatar llianefr avatar ahmadsamir avatar dfaure avatar wrobelda avatar vogtinator avatar kossebau avatar 1maxnet1 avatar

Stargazers

 avatar Kristen McWilliam avatar  avatar Daniel avatar  avatar  avatar Norwin avatar Jannis R avatar techm avatar  avatar Javed Khan avatar Software Nerd avatar Lisa Martens avatar Stefan Begerad avatar Kristjan ESPERANTO avatar Gábor Mihálcz avatar  avatar

Watchers

Nicolás Alvarez avatar James Cloos avatar Jannis R avatar  avatar  avatar  avatar

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.