Counting COVID cases with twitterbots

My first bot and my first foray into Python.

When the Yukon government announced in November 2020 that it would no longer be releasing updated case counts daily, I wanted a technology solution to continue getting those numbers into the public sphere.

My original concept for the Yukon COVID-19 cases bot was a Twitter bot that would scrape the Yukon.ca COVID-19 webpage and tweet only when it was updated. This proved a little too complicated for me. Instead, the bot tweeted the territory’s COVID-19 data daily at 10 a.m.

Embed Block
Add an embed URL or code. Learn more

At its peak the account gained 120 followers. It was periodically retweeted to show rapid changes in case counts and testing and overall, a successful project. It was also relatively fragile and required fixing whenever the Yukon page changed format. This happened several times as new types of data were added.

The project was based on this tutorial from Sagun Shrestha, Build a Twitter Bot for Coronavirus update. I took Shrestha’s template for global COVID-19 stats and jerry-rigged a local version that pulled stats from the Yukon.

The account has been retired and the Yukon government now provides a more comprehensive data dashboard.