Inspiration

Helping public health and the general public be aware of the COVID19 situation is an important step in overcoming the mass spread of the virus. Toronto being one of Ontario's most populated areas has its downfalls when it comes to viral spread. With so many people densely packed together there must be a way to predict what neighbourhoods are going to be heavily affected so those who live in them can step up their precautionary measures and public health can take early steps to mitigate spread. I wanted to try and contribute to the effort of reducing spread by making people aware of future trends so we can slow them before the reach extremes.

What it does

Predict the counts of each Toronto neighbourhood and which neighbourhoods are expected to have outbreaks a day to days in advance.

How we built it

Data Collection

Data was collected from publicaaly available souces listed below.

Build Model - Neuarl Network

Assumptions:
  1. data without a valid neighbourhood name was not considered
  2. we assumed the case remained in the neighbourhood for 2 weeks
  3. if the result was fatal or the person was was ever hospitalized we assumed it lasted 1 week.

These assumptions were made based on data of the contageous period of covid as well as if a person is in hospital or no longer alive then they cannot infect their neighbourhood this data was gathered from [CBC Covid progression](# https://www.cbc.ca/news/health/typical-covid-19-progression-1.5546949 approx 7 days after symptoms you get hospitalized]

Using tactics from the set up of open source chess engines Leela and Maia, the data was created in "map" form to preserve spatial relations between neighbourhoods.

A map is of shape 3x45x45 with channels as follows:

  1. Case counts where the counts are displayed in array indicies that would fall into the corresponding neighbourhood (image displaying point-neighbourhood correlation shown below). Note: areas outside of the map were given a value of 0
  2. Outbreak present shown with 1s in respective neighbourhoods
  3. Calendar week of prediction date to preserve timing relations

image

Model inputs were 13x45x45 channels as follows:

  • 1-3: Current map
  • 3-12: Last 3 maps
  • 13 array of 0s and 1s where the ones are only in indicies that overlap Image shown above for clarity

image

The network was trained for 5 steps with a batch size of 10 for both count and outbreak modeling.

The average error on count prediction was 15.7% and the average percision and recall for prediction outbreaks is 0.88 and 0.87 respectively.

Make Publically Accessible

The website can be access through covidto.tech

Firebase was used for hosting. Since the code was done with python, Flask combined with Google Cloud was used as a bridging language to allow for a dynamic webpage through Firebase hosting.

Challenges we ran into

Time constraints: the website still needs a lot of work and I was learning Firebase, Google Cloud and Flask from scratch.

Accomplishments that we're proud of

This is my first hackathon and I'm very happy with the work I managed to produce. I'm very proud of how I managed to tackle the Google Cloud interface even though I was unable to get everything to work seemlessly.

Additionally my model gives very accurate predictions making this my first well planned and successful machine learning algorithm

What we learned

I learned how to interact with Firebase and Google Cloud, host a website and incorporate some basic Python code into a Firebase environment taking it from a static environment

What's next for covidTO

The website is a work in progress as I was entirely new to Firebase, Flask and Google Cloud. The intention is to have someone be able to look at past outbreak and count trends, as well as look ahead on where trends can lead, both on graph and map views. I hope to make an interactive website where people can look through past states of the Toronto COVID situation, as well to expand to larger areas and make predictions based on vaccine rollout.

I would also like to work on incorporating some web scraping and set up times for the ML model to retrain so its predictions can be tailored to current trends as well.

Share this project:

Updates