I was tired of taking routes to work that would have me stuck in traffic the whole time. I wanted to create a script that could track what roads had the most incidents on them.
What it does
The script retrieves the most recent traffic data for my city utilising the HERE traffic API. The api doesn't store historical data so I used CORTX and IPFS to store it. I then receive updates every morning by using the gmail api to send alerts about my route to work
How we built it
I built the script using Python. First I got the API key from HERE so that I could retrieve the data for my city. I did this by inputting lat longs to create an area encompassing my route to work in the api search query which gave me back all incidents in a json format. Then I sent an email to myself of all incidents for that day before I set out for work and stored this data in CORTX and IPFS. The following day it would append the current day of data to the previous day's data to keep a count of all the incidents for a given road.
Challenges we ran into
Sometimes CORTX shuts off and would become unresponsive.
Accomplishments that we're proud of
I'm proud to have stored the data so that I have a historical feed of all incidents. This can be shared with local governments to improve road safety.
What we learned
I learned how to use IPFS and connect to an s3 storage system and also CORTX
What's next for HERE API with CORTX and IPFS integration
I would like to analyse the data for a longer time period to try to extract patterns that may be occurring within the traffic flow of my city. We could use this data to predict traffic flows and hopefully limit the incidents within the city by sharing it with the local government.