With increasing deaths on Calgary's streets, it's over due for the bot to come back and remind folks of how dangerous our streets are.
The initial version of this was a Twitter only bot that would quote any tweet from @yyctransport with the words: "ALERT" and "pedestrian" or "ped" but not cleared. In the tweet it mentions the number and tags #yycwalk.
When Twitter/X killed bots by destroying their API, the bot was shut down.
Thanks to @yyctransport for reporting the incidents, and @RrrichardZach for the push to create the bot.
Since the bot is dependant on the @yyctransport team at the Traffic Management Centre tweeting, not all incidents are counted and reported. For the most accurate stats, please check with @CalgaryPolice. Incidents if viewed via camera, reported via 911, and affect traffic are tweeted. [1][2]
Even with this limitation, the purpose to show just how frequent incidents occur.
- Incidents (35ra-9556)
- Ward Boundaries (4b54-tmc4)
- Communities (kxmf-bzkv)
- Councillors - manually created into a json config blob.
- Language: Go
- Database: Sqlite3
After trying go-soda, I opted to move to using earthboundkid/requests instead so I could use the v3 API which provides extra fields.
Run: go get -u && go mod tidy
- Check your app token is valid
- Ensure the token is properly exported as an environment variable
- Check network connectivity
- The Calgary Open Data portal may be experiencing issues
- Try again later or fall back to local JSON files
- The API response format may have changed
- Check the dataset schema at data.calgary.ca
- Update the struct definitions in
database.goif needed
Please see deploy
Licensed with an MIT License