leo.blog();

2022-10-31

Istanbul traffic API

The Transport Management Center of Istanbul Metropolitan Municipality has websites and mobile applications that display traffic conditions in Istanbul.

Aside from data on individual roads, the website also provides a “traffic index” for the city. The index consists of three percentages:

I thought it might be fun to see how the traffic index has changed over time, and maybe play around with predicting the traffic index for the future. So I wrote a cron job that scrapes the traffic index from the API and stores it in ClickHouse.

The API endpoint 1 returns a JSON object with the following fields:

I also put the data on Kaggle 2, so you can play around with it.

Leave a Comment