Introduction to the covid19italy Datasets

The covid19italy R package provides a tidy format dataset of the 2019 Novel Coronavirus COVID-19 (2019-nCoV) pandemic outbreak in Italy. The package includes the following three datasets:

The data was pull from Italy Department of Civil Protection

Installation

You can install the released version of covid19italy from CRAN with:

install.packages("covid19italy")

Or, install the most recent version from GitHub with:

# install.packages("devtools")
devtools::install_github("RamiKrispin/covid19Italy")

Data refresh

The covid19italy package dev version is been updated on a daily bases. The update_data function enables a simple refresh of the installed package datasets with the most updated version on Github:

library(covid19italy)

update_data()

Note: must restart the R session to have the updates available

Italy summary

The italy_total dataset provides an overall summary of the cases in Italy since the beginning of the covid19 outbreak since February 24, 2020. The dataset contains the following fields:

library(covid19italy)

data(italy_total)

str(italy_total)
#> 'data.frame':    62 obs. of  12 variables:
#>  $ date                      : Date, format: "2020-02-24" "2020-02-25" ...
#>  $ hospitalized_with_symptoms: int  101 114 128 248 345 401 639 742 1034 1346 ...
#>  $ intensive_care            : int  26 35 36 56 64 105 140 166 229 295 ...
#>  $ total_hospitalized        : int  127 150 164 304 409 506 779 908 1263 1641 ...
#>  $ home_confinement          : int  94 162 221 284 412 543 798 927 1000 1065 ...
#>  $ cumulative_positive_cases : int  221 311 385 588 821 1049 1577 1835 2263 2706 ...
#>  $ daily_positive_cases      : int  0 90 74 203 233 228 528 258 428 443 ...
#>  $ recovered                 : int  1 1 3 45 46 50 83 149 160 276 ...
#>  $ death                     : int  7 10 12 17 21 29 34 52 79 107 ...
#>  $ cumulative_cases          : int  229 322 400 650 888 1128 1694 2036 2502 3089 ...
#>  $ total_tests               : int  4324 8623 9587 12014 15695 18661 21127 23345 25856 29837 ...
#>  $ total_people_tested       : int  NA NA NA NA NA NA NA NA NA NA ...

head(italy_total)
#>         date hospitalized_with_symptoms intensive_care total_hospitalized
#> 1 2020-02-24                        101             26                127
#> 2 2020-02-25                        114             35                150
#> 3 2020-02-26                        128             36                164
#> 4 2020-02-27                        248             56                304
#> 5 2020-02-28                        345             64                409
#> 6 2020-02-29                        401            105                506
#>   home_confinement cumulative_positive_cases daily_positive_cases recovered
#> 1               94                       221                    0         1
#> 2              162                       311                   90         1
#> 3              221                       385                   74         3
#> 4              284                       588                  203        45
#> 5              412                       821                  233        46
#> 6              543                      1049                  228        50
#>   death cumulative_cases total_tests total_people_tested
#> 1     7              229        4324                  NA
#> 2    10              322        8623                  NA
#> 3    12              400        9587                  NA
#> 4    17              650       12014                  NA
#> 5    21              888       15695                  NA
#> 6    29             1128       18661                  NA

Italy region level

The italy_region dataset provides an overall summary of the cases in Italy’s regions. The dataset contains the following fields:

data(italy_region)

str(italy_region)
#> 'data.frame':    1302 obs. of  17 variables:
#>  $ date                      : Date, format: "2020-02-24" "2020-02-24" ...
#>  $ region_code               : int  13 17 4 18 15 8 6 12 7 3 ...
#>  $ region_name               : chr  "Abruzzo" "Basilicata" "P.A. Bolzano" "Calabria" ...
#>  $ lat                       : num  42.4 40.6 46.5 38.9 40.8 ...
#>  $ long                      : num  13.4 15.8 11.4 16.6 14.3 ...
#>  $ hospitalized_with_symptoms: int  0 0 0 0 0 10 0 1 0 76 ...
#>  $ intensive_care            : int  0 0 0 0 0 2 0 1 0 19 ...
#>  $ total_hospitalized        : int  0 0 0 0 0 12 0 2 0 95 ...
#>  $ home_confinement          : int  0 0 0 0 0 6 0 0 0 71 ...
#>  $ cumulative_positive_cases : int  0 0 0 0 0 18 0 2 0 166 ...
#>  $ daily_positive_cases      : int  0 0 0 0 0 0 0 0 0 0 ...
#>  $ recovered                 : int  0 0 0 0 0 0 0 1 0 0 ...
#>  $ death                     : int  0 0 0 0 0 0 0 0 0 6 ...
#>  $ cumulative_cases          : int  0 0 0 0 0 18 0 3 0 172 ...
#>  $ total_tests               : int  5 0 1 1 10 148 58 124 1 1463 ...
#>  $ total_people_tested       : int  NA NA NA NA NA NA NA NA NA NA ...
#>  $ region_spatial            : chr  "Abruzzo" "Basilicata" "Trentino-Alto Adige" "Calabria" ...

head(italy_region)
#>         date region_code    region_name      lat     long
#> 1 2020-02-24          13        Abruzzo 42.35122 13.39844
#> 2 2020-02-24          17     Basilicata 40.63947 15.80515
#> 3 2020-02-24           4   P.A. Bolzano 46.49933 11.35662
#> 4 2020-02-24          18       Calabria 38.90598 16.59440
#> 5 2020-02-24          15       Campania 40.83957 14.25085
#> 6 2020-02-24           8 Emilia-Romagna 44.49437 11.34172
#>   hospitalized_with_symptoms intensive_care total_hospitalized home_confinement
#> 1                          0              0                  0                0
#> 2                          0              0                  0                0
#> 3                          0              0                  0                0
#> 4                          0              0                  0                0
#> 5                          0              0                  0                0
#> 6                         10              2                 12                6
#>   cumulative_positive_cases daily_positive_cases recovered death
#> 1                         0                    0         0     0
#> 2                         0                    0         0     0
#> 3                         0                    0         0     0
#> 4                         0                    0         0     0
#> 5                         0                    0         0     0
#> 6                        18                    0         0     0
#>   cumulative_cases total_tests total_people_tested      region_spatial
#> 1                0           5                  NA             Abruzzo
#> 2                0           0                  NA          Basilicata
#> 3                0           1                  NA Trentino-Alto Adige
#> 4                0           1                  NA            Calabria
#> 5                0          10                  NA            Campania
#> 6               18         148                  NA      Emilia-Romagna

Italy province level

The italy_region dataset provides an overall summary of the cases in Italy’s regions. The dataset contains the following fields:

data(italy_province)

str(italy_province)
#> 'data.frame':    7936 obs. of  11 variables:
#>  $ date            : Date, format: "2020-02-24" "2020-02-24" ...
#>  $ region_code     : int  13 13 13 13 13 17 17 17 4 4 ...
#>  $ region_name     : chr  "Abruzzo" "Abruzzo" "Abruzzo" "Abruzzo" ...
#>  $ province_code   : int  69 66 68 67 979 77 76 980 21 981 ...
#>  $ province_name   : chr  "Chieti" "L'Aquila" "Pescara" "Teramo" ...
#>  $ province_abb    : chr  "CH" "AQ" "PE" "TE" ...
#>  $ lat             : num  42.4 42.4 42.5 42.7 0 ...
#>  $ long            : num  14.2 13.4 14.2 13.7 0 ...
#>  $ total_cases     : int  0 0 0 0 0 0 0 0 0 0 ...
#>  $ new_cases       : int  0 0 0 0 0 0 0 0 0 0 ...
#>  $ province_spatial: chr  "Chieti" "L'Aquila" "Pescara" "Teramo" ...

head(italy_province)
#>         date region_code region_name province_code
#> 1 2020-02-24          13     Abruzzo            69
#> 2 2020-02-24          13     Abruzzo            66
#> 3 2020-02-24          13     Abruzzo            68
#> 4 2020-02-24          13     Abruzzo            67
#> 5 2020-02-24          13     Abruzzo           979
#> 6 2020-02-24          17  Basilicata            77
#>                          province_name province_abb      lat     long
#> 1                               Chieti           CH 42.35103 14.16755
#> 2                             L'Aquila           AQ 42.35122 13.39844
#> 3                              Pescara           PE 42.46458 14.21365
#> 4                               Teramo           TE 42.65892 13.70440
#> 5 In fase di definizione/aggiornamento               0.00000  0.00000
#> 6                               Matera           MT 40.66751 16.59792
#>   total_cases new_cases                     province_spatial
#> 1           0         0                               Chieti
#> 2           0         0                             L'Aquila
#> 3           0         0                              Pescara
#> 4           0         0                               Teramo
#> 5           0         0 In fase di definizione/aggiornamento
#> 6           0         0                               Matera