Giter VIP home page Giter VIP logo

covid19-with-r's Introduction

Covid19 data analysis and forecasting with R

Packages used:

  1. covid19.analytics
  2. dplyr
  3. prophet
  4. lubridate
  5. ggplot2

For installing any new package in R, type the following command:

install.packages("package-name")

Here, covid19.analytics package from R is used to get covid-19 data which is internally extracted from the John Hopkins github repo for covid-19.

For covid-19 forecasting purpose, prophet package is used.


Analysis


The data for analysis is retreived from Jan 1 2020 to 30 Nov 2020. It includes data from all over the world.

1. Confirmed cases

con

2. Deaths

deaths

3. Recovered

rec

4. Aggregate

agg

5. Total cases in India

tot

6. Growth rate in India

grt

7. SIR model for India

sir

8. Trends in India

tr


Forecasting covid-19 for the next 2 months


preds

For an interactive version of this plot, click here.

Clearly, the graph does not form uniform patterns. It is only from around mid-July that a pattern is visible till present. This may have to do with varying lockdowns in states, case reporting timelines, etc.

This variability in graph is evident in the results of forecasting as:

res

The R squared values are around 42-43% which is not great accuracy. But the data is such that predictions aren't necessarily accurate.

Hence, to make more accurate predictions about the spread of Covid-19, we need more variety of data to train our model.


covid19-with-r's People

Contributors

adityarc19 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.