Skip to content

Summarized data on cases of COVID-19 in France

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

Covid19R/covid19france

Repository files navigation

covid19france

Travis build status License: MIT CRAN status

This package provides per-day data on COVID-19 cases in France.

The data is an average over all of the sources provided by opencovid19-fr. (README in English available here.)

Installation

From CRAN:

install.packages("covid19france")

or the development version:

# install.packages("devtools")
devtools::install_github("Covid19R/covid19france")

Data

library(covid19france)

Get the full dataset:

(france <- refresh_covid19france())
#> Downloading raw data from https://raw.githubusercontent.com/opencovid19-fr/data/master/dist/chiffres-cles.csv.
#> # A tibble: 30,090 x 7
#>    date       location location_type location_standa… location_standa… data_type
#>    <date>     <chr>    <chr>         <chr>            <chr>            <chr>    
#>  1 2020-04-14 Ain      county        DEP-01           department       confirmed
#>  2 2020-04-14 Ain      county        DEP-01           department       dead     
#>  3 2020-04-14 Ain      county        DEP-01           department       icu      
#>  4 2020-04-14 Ain      county        DEP-01           department       hospital…
#>  5 2020-04-14 Ain      county        DEP-01           department       recovered
#>  6 2020-04-14 Ain      county        DEP-01           department       discover…
#>  7 2020-04-14 Aisne    county        DEP-02           department       confirmed
#>  8 2020-04-14 Aisne    county        DEP-02           department       dead     
#>  9 2020-04-14 Aisne    county        DEP-02           department       icu      
#> 10 2020-04-14 Aisne    county        DEP-02           department       hospital…
#> # … with 30,080 more rows, and 1 more variable: value <int>

To switch to a wider format, you can use tidyr:

france %>% 
  tidyr::pivot_wider(
    names_from = "data_type"
  ) %>% 
  dplyr::select(
    1, 6:ncol(.), everything()
  )
#> # A tibble: 5,015 x 11
#>    date       confirmed  dead   icu hospitalized recovered discovered location
#>    <date>         <int> <int> <int>        <int>     <int>      <int> <chr>   
#>  1 2020-04-14        NA    46    29          134       144         NA Ain     
#>  2 2020-04-14        NA   152    45          279       296         NA Aisne   
#>  3 2020-04-14        NA    16    21           62        81         NA Allier  
#>  4 2020-04-14        NA     5     4           34        71         NA Alpes-d…
#>  5 2020-04-14        NA    81    79          282       270         NA Alpes-M…
#>  6 2020-04-14        NA    45    24          106       193         NA Ardèche 
#>  7 2020-04-14        NA    21    17           78        71         NA Ardennes
#>  8 2020-04-14        NA     1     4           16        15         NA Ariège  
#>  9 2020-04-14        NA    65    26          274       198         NA Aube    
#> 10 2020-04-14        NA    41    12           86        98         NA Aude    
#> # … with 5,005 more rows, and 3 more variables: location_type <chr>,
#> #   location_standardized <chr>, location_standardized_type <chr>

For more info on the dataset:

get_info_covid19france()
#> # A tibble: 1 x 10
#>   data_set_name package_name function_to_get… data_details data_url license_url
#>   <chr>         <chr>        <chr>            <chr>        <chr>    <chr>      
#> 1 covid19france covid19fran… refresh_covid19… Open Source… https:/… https://gi…
#> # … with 4 more variables: data_types <chr>, location_types <chr>,
#> #   spatial_extent <chr>, has_geospatial_info <lgl>

Contributing

Please submit issues and pull requests with any package improvements!

Please note that the ‘covid19france’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

About

Summarized data on cases of COVID-19 in France

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages