Skip to content

singhrahuldps/covid19tracker

Repository files navigation

Covid-19 Tracker

Create your own algorithms which fit on the covid-19 Dataset and send a Pull Request. Accepted code algorithms will be published to the website singhrahuldps.github.io/covid19tracker.

The data we use can be found at covid.ourworldindata.org.

Add your own algorithm

Add your module to the Algorithm folder and add the py file name to the init.py file. Make sure to keep the file name to be your GitHub username. Also add the import statement for your module in the init.py.

Add a classNames list to your module which contains the names of your algorithm classes.

The training data is Covid-19 data 10 days before the present date and the validation loss is measured for the next 10 days.

Your class must have the following methods:

class MyAlgorithm():
    def __init__(self, countryNames, countryCodes):
        #  countryNames, countryCodes are list of str
        # statements

    def fit(self, data):
        # data is a dictionary with country names as the key
        # and corresponding pandas dataFrame as value
        # Fit or train your algorithm on the data
        # statements

    def predict(self):
        # statements
        # returns list
        return your_new_cases_prediction_for_each_country_in_the_order_of_country_names

Your module must have your github username as its name. For example: Algorithms/singhrahuldps.py. It should have the following structure:

# your imports
classNames = ['Algo1', 'Algo2']
classDescription = ['Algo1 Description', 'Algo2 Description']

class Algo1():
    def __init__(self, countryNames, countryCodes):
        #statements

    def fit(self, data):
        # statements

    def predict(self):
        # statements
        return predictions

class Algo2():
    def __init__(self, countryNames, countryCodes):
        #statements

    def fit(self, data):
        # statements

    def predict(self):
        # statements
        return predictions

View your changes on index.html by running the following command in terminal

python run.py

Ifyou want to only create output files for your own algorithm, use the following arguments

python run.py -u yourGithubUsername -a YourAlgorithm1, YourAlgorithm2, YourAlgorithm3

Dependencies

pip install numpy scipy pandas requests pathlib bokeh

Mention additional dependencies for your class in the pull request.

Features to add

  • Displaying a table for the training and validation loss of the algorithm
  • LeaderBoard of algorithms
  • UI improvements

Releases

No releases published

Packages

No packages published

Languages