Skip to contents

This data is the number of reported COVID-19 cases in British Columbia between January 2020 and April 15, 2023. The values are.up-to-date as of August 2023.

Usage

bccovid

bccovid_train

bccovid_test

bcpop

Format

An object of class tbl_df (inherits from tbl, data.frame) with 1143 rows and 2 columns.

An object of class tbl_df (inherits from tbl, data.frame) with 1655 rows and 6 columns.

An object of class tbl_df (inherits from tbl, data.frame) with 685 rows and 6 columns.

An object of class tbl_df (inherits from tbl, data.frame) with 6 rows and 2 columns.

Source

This data comes from the British Columbia CDC linelist via the {CanCovidData} package.

Details

The full data (bccovid), contains the case count for BC.

The other data has been processed from this raw file. First, it is separated out by Health Authority. Then it was "smoothed" by applying a 7 day trailing sum. By this we mean that,

cases_today  = sum(cases_7days_ago:cases_today)

The result is in the cases+0 column. The other columns are "shifts" of this value. cases+14 is the response: it is the total number of cases observed in the week ending 14 days after date. The other cases variables are features: the total number of cases in the week ending on the date (cases+0), 1 week earlier (cases-7) and 2 weeks earlier (cases-14). HA is the name of the BC Health Authority. There are 5 different HAs, and UBC is located in "Vancouver Coastal" along with Kitsilano and Downtown. SFU, Burnaby, Richmond, and Surrey are all in "Fraser".

bccovid_train is the Training set for use on the homework. It contains only the data prior to 1 August 2021.

bccovid_test is the Test set for use on the homework. It contains 137 rows of the data (between 1 August 2021 and 1 December 2021).

bcpop gives the number of people living in each BC Health Authority as of the 2020 Census

Examples

bccovid
#> # A tibble: 1,143 × 2
#>    date       cases
#>    <date>     <int>
#>  1 2020-01-29     1
#>  2 2020-02-06     1
#>  3 2020-02-10     2
#>  4 2020-02-18     1
#>  5 2020-02-24     2
#>  6 2020-03-03     5
#>  7 2020-03-05     8
#>  8 2020-03-06     7
#>  9 2020-03-07     1
#> 10 2020-03-08     4
#> # ℹ 1,133 more rows
bccovid_train
#> # A tibble: 1,655 × 6
#>    HA     date       `cases+14` `cases+0` `cases-7` `cases-14`
#>    <chr>  <date>          <dbl>     <dbl>     <dbl>      <dbl>
#>  1 Fraser 2020-08-21        339       304       269        185
#>  2 Fraser 2020-08-22        335       319       277        172
#>  3 Fraser 2020-08-23        356       298       311        162
#>  4 Fraser 2020-08-24        374       301       298        180
#>  5 Fraser 2020-08-25        409       290       296        196
#>  6 Fraser 2020-08-26        414       305       292        212
#>  7 Fraser 2020-08-27        402       296       308        222
#>  8 Fraser 2020-08-28        393       285       304        269
#>  9 Fraser 2020-08-29        378       298       319        277
#> 10 Fraser 2020-08-30        355       304       298        311
#> # ℹ 1,645 more rows
bccovid_test
#> # A tibble: 685 × 6
#>    HA     date       `cases+14` `cases+0` `cases-7` `cases-14`
#>    <chr>  <date>          <dbl>     <dbl>     <dbl>      <dbl>
#>  1 Fraser 2022-07-18        339       372       393        355
#>  2 Fraser 2022-07-19        333       386       372        372
#>  3 Fraser 2022-07-20        305       359       395        381
#>  4 Fraser 2022-07-21        303       319       410        388
#>  5 Fraser 2022-07-22        299       341       397        376
#>  6 Fraser 2022-07-23        291       328       383        383
#>  7 Fraser 2022-07-24        307       328       370        403
#>  8 Fraser 2022-07-25        291       329       372        393
#>  9 Fraser 2022-07-26        266       351       386        372
#> 10 Fraser 2022-07-27        284       366       359        395
#> # ℹ 675 more rows
bcpop
#> # A tibble: 6 × 2
#>   HA                    pop
#>   <chr>               <int>
#> 1 British Columbia  5071336
#> 2 Interior           827314
#> 3 Fraser            1906933
#> 4 Vancouver Coastal 1193977
#> 5 Vancouver Island   858785
#> 6 Northern           284327