Skip to contents

This data source of confirmed COVID-19 cases and deaths is based on reports made available by the Center for Systems Science and Engineering at Johns Hopkins University. This example data is a snapshot as of March 20, 2024, and ranges from March 1, 2020 to December 31, 2021. It is limited to counties from Massachusetts and Vermont.

It is used in the epiprocess aggregation vignette.

Usage

covid_incidence_county_subset

Format

An object of class epi_df (inherits from tbl_df, tbl, data.frame) with 16212 rows and 5 columns.

Source

This object contains a modified part of the COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University as republished in the COVIDcast Epidata API. This data set is licensed under the terms of the Creative Commons Attribution 4.0 International license by the Johns Hopkins University on behalf of its Center for Systems Science in Engineering. Copyright Johns Hopkins University 2020.

Modifications:

  • From the COVIDcast Epidata API: These signals are taken directly from the JHU CSSE COVID-19 GitHub repository without changes. The 7-day average signals are computed by Delphi by as moving averages of the preceding 7 days, so the signal for June 7 is the average of the underlying data for June 1 through 7, inclusive.

  • Furthermore, the data has been limited to a very small number of rows, formatted into an epi_df, and the signal names slightly altered.

Data dictionary

The data has columns:

geo_value

the geographic value associated with each row of measurements.

time_value

the time value associated with each row of measurements.

cases

Number of new confirmed COVID-19 cases, daily

county_name

the name of the county

state_name

the full name of the state

Examples

# Since this is a re-exported dataset, it cannot be loaded using
# the `data()` function. `data()` looks for a file of the same name
# in the `data/` directory, which doesn't exist in this package.
# works
epiprocess::covid_incidence_county_subset
#> An `epi_df` object, 16,212 x 5 with metadata:
#> * geo_type  = county
#> * time_type = day
#> * as_of     = 2024-03-20
#> 
#> # A tibble: 16,212 × 5
#>    geo_value time_value cases county_name       state_name   
#>  * <chr>     <date>     <dbl> <chr>             <chr>        
#>  1 25001     2020-06-01     4 Barnstable County Massachusetts
#>  2 25003     2020-06-01     0 Berkshire County  Massachusetts
#>  3 25005     2020-06-01    78 Bristol County    Massachusetts
#>  4 25007     2020-06-01     0 Dukes County      Massachusetts
#>  5 25009     2020-06-01    92 Essex County      Massachusetts
#>  6 25011     2020-06-01     0 Franklin County   Massachusetts
#>  7 25013     2020-06-01    35 Hampden County    Massachusetts
#>  8 25015     2020-06-01     4 Hampshire County  Massachusetts
#>  9 25017     2020-06-01    98 Middlesex County  Massachusetts
#> 10 25019     2020-06-01     0 Nantucket County  Massachusetts
#> # ℹ 16,202 more rows

# works
library(epiprocess)
covid_incidence_county_subset
#> An `epi_df` object, 16,212 x 5 with metadata:
#> * geo_type  = county
#> * time_type = day
#> * as_of     = 2024-03-20
#> 
#> # A tibble: 16,212 × 5
#>    geo_value time_value cases county_name       state_name   
#>  * <chr>     <date>     <dbl> <chr>             <chr>        
#>  1 25001     2020-06-01     4 Barnstable County Massachusetts
#>  2 25003     2020-06-01     0 Berkshire County  Massachusetts
#>  3 25005     2020-06-01    78 Bristol County    Massachusetts
#>  4 25007     2020-06-01     0 Dukes County      Massachusetts
#>  5 25009     2020-06-01    92 Essex County      Massachusetts
#>  6 25011     2020-06-01     0 Franklin County   Massachusetts
#>  7 25013     2020-06-01    35 Hampden County    Massachusetts
#>  8 25015     2020-06-01     4 Hampshire County  Massachusetts
#>  9 25017     2020-06-01    98 Middlesex County  Massachusetts
#> 10 25019     2020-06-01     0 Nantucket County  Massachusetts
#> # ℹ 16,202 more rows

# fails
if (FALSE) { # \dontrun{
data(covid_incidence_county_subset, package = "epiprocess")
} # }