Giter Club home page Giter Club logo

socialmedia2traffic-api's Introduction

SocialMedia2Traffic API

The SocialMedia2Traffic (SM2T) API provides modelled hourly traffic speed data for individual OSM road features suitable for integration in openrouteservice.

The traffic speed was modelled using geocoded Twitter data and OpenStreetMap data using machine learning and UBER movement data as reference which are licensed under CC BY-NC 3.0 US

Currently available cities incl. bounding box:

  • Berlin: [13.088333,52.338241,13.760469,52.674915]
  • Nairobi: [36.663475,-1.4421585,37.103702,-1.157910]
  • Seattle: [-123.503379,46.728870,-120.905265,48.411334]

Note: Since this is a rather a demonstrator and not a productive system, the size of the bounding box per request is limited to a width and height of 0.2 degree at the moment.

Usage

Traffic data can be queried from https://sm2t.heigit.org/download/traffic/csv using GET requests by providing a spatial bounding box in geographic coordinates (min_lon, min_lat, max_lon, max_lat).

Example Query

curl https://sm2t.heigit.org/download/traffic/csv?bbox=13.3472,52.52,13.4117,52.5304

The response is a CSV file containing hourly traffic speed in km/h for individual OSM highway segments, e.g.

Example Response

osm_way_id,osm_start_node_id,osm_end_node_id,hour_of_day,speed_kph_p85
4615004,12614644,29266235,6,41
4615004,12614644,29266235,7,28
4615004,12614644,29266235,8,28
4615004,12614644,29266235,9,22
4615004,12614644,29266235,10,29

The data structure is the same as UBER movement data. The first three columns denote official OSM IDs, so the respective OSM objects can be viewed on https://www.openstreetmap.org, e.g.

API Setup

Copy the sample.env to .env and set the envrionment variables. Afterwards, set up the API using Docker:

cd socialmedia2traffic-api
cp sample.env .env
docker compose up

Contributing

If you encounter problems or bugs, please open an issue. Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Also please make sure to update tests as appropriate.

Acknowledgements

This project was funded by the German Federal Ministry for Digital and Transport (BMDV) in the context of the research initiative mFUND.

Speed Data was retrieved from Uber Movement, (c) 2022 Uber Technologies, Inc., https://movement.uber.com. For the speed data by Uber additional data attribution applies.

Project term: 02/2021 - 01/2021

socialmedia2traffic-api's People

Contributors

redfrexx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  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.