Introduction

We will assemble some data and analyses of COVID-19 data using R.

Installation

You can install this package in R with the following steps.

  • ensure that you are using R 4.1 or later
  • install.packages("BiocManager")
  • BiocManager::install(c("remotes", "vjcitn/teachCovidData"))

Basic data resource

##   countyFIPS           County Name State StateFIPS 2020-01-22 2020-01-23
## 1          0 Statewide Unallocated    AL         1          0          0
## 2       1001       Autauga County     AL         1          0          0
## 3       1003       Baldwin County     AL         1          0          0
## 4       1005       Barbour County     AL         1          0          0
## 5       1007          Bibb County     AL         1          0          0

Examining new daily case counts by state

library(ggplot2)
ncms = new_cases_state("MS")
plot(ncms)

nn = new_cases_state("VT")
plot(nn)

Use dplyr to filter by date.

library(dplyr)
nnn = nn |> filter(date > "2021-01-01" & date < "2021-06-01")
plot(nnn)

Make the comparable plot for MS.