Create summary information about the covid in each province of Canada

calculate_stat_summary(df, column)

Arguments

df:

data.frame containing covid data to summarize

column:

the column name to summarize

Value

data.frame containing summary information.

Examples

covid_df <- get_covid_data()
calculate_stat_summary(covid_df,'cases')
#>         province start_date   end_date count      sd min   max mean quantile_25
#> 1        Alberta 2020-01-25 2022-01-30   737 1349.10   0 17577  661          18
#> 2             BC 2020-01-25 2022-01-30   737  807.77   0  9332  434           0
#> 3       Manitoba 2020-01-25 2022-01-30   737  436.47   0  7083  161           1
#> 4             NL 2020-01-25 2022-01-30   737  129.75   0  1873   22           0
#> 5            NWT 2020-01-25 2022-01-30   737   31.58  -4   314    7           0
#> 6  New Brunswick 2020-01-25 2022-01-30   737  137.24  -2  2548   38           0
#> 7    Nova Scotia 2020-01-25 2022-01-30   737  157.65  -1  1184   51           0
#> 8        Nunavut 2020-01-25 2022-01-30   737   10.14   0   140    2           0
#> 9        Ontario 2020-01-25 2022-01-30   737 2901.28   0 35287 1409         202
#> 10           PEI 2020-01-25 2022-01-30   737   46.69   0   407   10           0
#> 11        Quebec 2020-01-25 2022-01-30   737 2329.72 -90 17122 1166         158
#> 12   Repatriated 2020-01-25 2022-01-30   737    0.20   0     4    0           0
#> 13  Saskatchewan 2020-01-25 2022-01-30   737  251.78   0  1979  159           8
#> 14         Yukon 2020-01-25 2022-01-30   737   16.12   0   197    4           0
#>    quantile_50 quantile_75 current_value
#> 1          206         773             0
#> 2           72         580             0
#> 3           52         170             0
#> 4            0           3             0
#> 5            0           0             0
#> 6            3          16           274
#> 7            2          17           425
#> 8            0           0           122
#> 9          548        1549          1103
#> 10           0           1             0
#> 11         650        1093          2838
#> 12           0           0             0
#> 13          71         220          1347
#> 14           0           1             0