Git Product home page Git Product logo

belcovid's Introduction

BelCovid

A React-powered Covid-19 tracker for Belgium.

Acknowledgments

This is something I started for my family and I in order to get a better grasp on some metrics, and help us follow the situation so we could make informed decisions for our safety and that of our cocitizens. At the same time, it was an opportunity to get acquainted with React. With time it changed and grew and it now seems appropriate to share the code so hopefully it can benefit from the expertise of the community. I am in no way an epidemiologist so if there's anything wrong with my approaches do not hesitate to file an issue.

Installation

Clone the repository then in its folder:

npm install
npm start

Contributions

Feel free to file issues and propose Pull Requests. I do this in my spare time so I can't guarantee much reactivity but I will do what I can. The more precise the bug reports the better.

Features

Dashboard

  • News aggregator for various news sources in French, Dutch and English, including major scientific journals
  • Table of data for a quick look at the latest developments
  • Naive predictions (based on compound interest):
    • Day of next peak (when the value reaches the same level as the highest recorded)
    • Day of saturation (for hospitalizations and intensive care admissions, when the value reaches capacity) - Estimated number of hospital beds from healthybelgium.be (52565) and historical hospitalization data from KCE were used to estimate the number of beds available per day (20769), number of ICU beds from VRT: 2650
  • Table of data can be filtered by province (where the data exists)

Charts

  • Made with react-chartjs-2
  • Using Covid-19 data from Sciensano
  • Incidence charts using population data from StatBel and Covid-19 data from Sciensano
  • Rate of change computations
  • Comparative charts
  • Simple regression trend lines using js-polynomial-regression
  • Everything can be filtered by province (where the data exists)

Data Structures

All data drom Sciensano is normalized in the following way (drawing inspiration from typescript syntax for ease of presentation of interfaces).

With:

// Two distributions of age groups exist, due to the way Sciensano reports its data.
CaseAgeGroups = [
    '0-9',
    '10-19',
    '20-29',
    '30-39',
    '40-49',
    '50-59',
    '60-69',
    '70-79',
    '80-89',
    '90+',
    'Age unknown'
];
MortalityAgeGroups = [
    '0-24',
    '25-44',
    '45-64',
    '65-74',
    '75-84',
    '85+',
    'Age unknown'
];
interface AgeSortedFigures<('cases' | 'mortality') as T> {
    total: number,
    [T === 'cases' ? CaseAgeGroups : MortalityAgeGroups]: number, // for each age group
}
interface Provinces {
    be: 'Belgium',
    ant: 'Antwerpen',
    ovl: 'OostVlaanderen',
    vbr: 'VlaamsBrabant',
    lim: 'Limburg',
    wvl: 'WestVlaanderen',
    hnt: 'Hainaut',
    lge: 'Liège',
    lux: 'Luxembourg',
    nam: 'Namur',
    brw: 'BrabantWallon',
    bxl: 'Brussels',
}

The data itself looks like this:

interface cases {
    [province: keyof Provinces]: { // for each province
        [date: string]: AgeSortedFigures<'cases'>, // for each date
    },
}
// The number of people occupying a hospital bed.
interface totalHospitalizations {
    [province: keyof Provinces]: { // for each province
        [date: string]: number, // for each date
    },
}
// The number of new hospital admissions.
interface newHospitalizations {
    [province: keyof Provinces]: { // for each province
        [date: string]: number, // for each date
    },
}
// The number of people occupying an ICU bed.
interface totalICU {
    [province: keyof Provinces]: { // for each province
        [date: string]: number, // for each date
    },
}
interface mortality {
    be: {
        [date: string]: AgeSortedFigures<'mortality'>, // for each date
    },
    [province: keyof Provinces]: {}, // for each province but 'be' (data unavailable)
}
interface tests {
    [province: keyof Provinces]: { // for each province
        [date: string]: number, // for each date
    },
}

belcovid's People

Contributors

zynton avatar sebgeelen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.