{"id":28729779,"url":"https://github.com/didi/trafficindex","last_synced_at":"2025-06-15T17:11:02.637Z","repository":{"id":86305851,"uuid":"177722812","full_name":"didi/TrafficIndex","owner":"didi","description":"TTI ,Smart Transportation Industry Standard","archived":false,"fork":false,"pushed_at":"2019-12-30T09:07:58.000Z","size":926,"stargazers_count":90,"open_issues_count":4,"forks_count":20,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-14T13:44:10.740Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/didi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-03-26T05:48:10.000Z","updated_at":"2024-02-20T14:33:13.000Z","dependencies_parsed_at":"2023-03-03T08:16:02.550Z","dependency_job_id":null,"html_url":"https://github.com/didi/TrafficIndex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/didi/TrafficIndex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2FTrafficIndex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2FTrafficIndex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2FTrafficIndex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2FTrafficIndex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/didi","download_url":"https://codeload.github.com/didi/TrafficIndex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2FTrafficIndex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260016055,"owners_count":22946321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-15T17:11:01.423Z","updated_at":"2025-06-15T17:11:02.629Z","avatar_url":"https://github.com/didi.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TTI ,Smart Transportation Industry Standard! \n\n[![license](http://img.shields.io/badge/license-Apache2.0-brightgreen.svg?style=flat)](https://github.com/didichuxing/TrafficIndex/blob/master/LICENSE)\n[![Release Version](https://img.shields.io/badge/release-0.9.8-red.svg)]\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)]\n\nThe TTI (Travel Time Index) industry's most used evaluation index of urban \ncongestion degree is the ratio of the actual travel time and the free flow time.\nThe larger the value, the worse the traffic operation status, and the congestion \nlevel is generally positive. Related, other abnormal weather conditions (such as rain, snow, fog, etc.)\nor abnormal road conditions may also affect the value of TTI.\n\n# Basic Idea\n\nthe basic idea of Speed:\nIf a link has two time slices, t1 and t2, and the link's length is S, then the average speed v of the link is: \nv = 2·S / (t1 + t2) during the period from t1 to t2.\n\nthe basic idea of TTI:\nIn the same link in a time slice, tti = free flow speed / actual speed.\n\n# Calculation method of traffic index\n\n![TTI](method.jpg)\n# Data curves of Beijing and Urumqi\n![TTI](demo.jpg)\n\n# Required data\n\n| Feature | Detail |\n|:-------------|:-------------:|\n| Road network data | Basic map road network data, including road shape and unique id |\n| Realtime Traffic data | Relying on dripping massive floating car data, real-time traffic data released by Didi |\n| Free flow data | From the Drip Trajectory database, the road speed generated by the excavation |\n| weight data | The total number of vehicles passing the road within a natural month |\n\n# Getting started\n\n## GAIA Open Dataset\nWith DiDi's advantages in big data and technology, the GAIA Initiative provides academic community with real-life application use cases, anonymized data and computing resources, and seeks collaboration with the academic community. The Initiative aims to advance fundamental and prospective studies in transportation research. It promotes the application of scientific achievements by strengthening ties between industry, university and research. This effort will drive scientific development in intelligent transportation systems and contribute to societal development.With DiDi's advantages in big data and technology, the GAIA Initiative provides academic community with real-life application use cases, anonymized data and computing resources, and seeks collaboration with the academic community. The Initiative aims to advance fundamental and prospective studies in transportation research. It promotes the application of scientific achievements by strengthening ties between industry, university and research. This effort will drive scientific development in intelligent transportation systems and contribute to societal development.\n\nAdd a realtime traffic data API in `config.conf` in root of host project as following.\n\n``` c++\ndependencies {\n    realtime_traffic_data 'http://sts.didichuxing.com/api/realtime?citycode=1\u0026token=your token'\n    roadnet 'http://sts.didichuxing.com/api/roadnet?citycode=1\u0026token=your token'\n    freeflow 'http://sts.didichuxing.com/api/freeflow?link_id=10001\u0026token=your token'\n    weight 'http://sts.didichuxing.com/api/weight?link_id=10001\u0026token=your token'\n}\n```\nIn addition, you need to configure redis、mysql\n\n# Compile c++ program\ng++ -o TrafficIndex CommonTools.cpp LogUlits.cpp main.cpp md5.cpp TrafficIndex.cpp traffic_pb.pb.cc -lmysqlclient -lpq -I/usr/include/mysql -L/usr/lib64/mysql -I/usr/include -L/usr/lib64 -I/usr/local/protobuf/include -L/usr/local/protobuf/lib -I/usr/local/include/hiredis -L/usr/local/lib -I/usr/local/postgresql-9.6.6/include -L/usr/local/postgresql-9.6.6/lib -I/usr/local/leveldb -luuid -lpthread -lprotobuf -lhiredis -lcurl -lleveldb\n\nFinally, Get executable program TrafficIndex\n\nStart the calculation program like this:\nnohup ./TrafficIndex \u0026\n\n# Known issues\n\n* Only supports the data format of DIDI, other data types are not supported.\n* Need to apply for open data from DIDI.\n\n# Contributing\n\nWelcome to contribute by creating issues or sending pull requests. See [Contributing Guide](CONTRIBUTING.md) for guidelines.\n\n# Who is using TTI?\n\n\u003cimg src=\"didi.png\" width=\"78px\" align=\"center\" alt=\"滴滴出行\"/\u003e \u003cimg src=\"uber-china.png\" width=\"78px\" align=\"center\" alt=\"Uber中国\"/\u003e\n\n# License\n\nTTI is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidi%2Ftrafficindex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdidi%2Ftrafficindex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidi%2Ftrafficindex/lists"}