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:
- The overall traffic in Istanbul
- The traffic on the European side of Istanbul
- The traffic on the Asian side of Istanbul
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:
- TI: The overall traffic index
- TI_Av: European side traffic index
- TI_An: Asian side traffic index
I also put the data on Kaggle 2, so you can play around with it.