Packages used:
- covid19.analytics
- dplyr
- prophet
- lubridate
- 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.
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
2. Deaths
3. Recovered
4. Aggregate
5. Total cases in India
6. Growth rate in India
7. SIR model for India
8. Trends in India
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:
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.