fkrauer / COVID-19

Google Trend as a predictor for covid cases? nope
https://fkrauer.github.io/COVID-19/
GNU General Public License v3.0
3 stars 1 forks source link

add read_csv example to README #1

Closed avallecam closed 4 years ago

avallecam commented 4 years ago

what do you think of adding a reprex to README about how to read the csv inside R?

pros:

cons:

solution:

here a minimal reprex to show:

library(tidyverse)
path_file <- "https://raw.github.com/fkrauer/COVID-19/master/data/WHO_COVID19_ALL_ADM0_2020-03-10.csv"
read_csv(file = path_file)
#> # A tibble: 1,768 x 8
#>    date       country adm   n_cum_conf n_cum_deaths n_inc_conf n_inc_deaths
#>    <date>     <chr>   <chr>      <dbl>        <dbl>      <dbl>        <dbl>
#>  1 2020-01-20 Japan   all            1           NA         NA           NA
#>  2 2020-01-20 South ~ all            1           NA         NA           NA
#>  3 2020-01-20 Thaila~ all            2           NA         NA           NA
#>  4 2020-01-21 Japan   all            1           NA         NA           NA
#>  5 2020-01-21 South ~ all            1           NA         NA           NA
#>  6 2020-01-23 Japan   all            1           NA         NA           NA
#>  7 2020-01-23 South ~ all            1           NA         NA           NA
#>  8 2020-01-23 Thaila~ all            4           NA         NA           NA
#>  9 2020-01-23 USA     all            1           NA         NA           NA
#> 10 2020-01-24 Japan   all            1           NA         NA           NA
#> # ... with 1,758 more rows, and 1 more variable: class <chr>

Created on 2020-03-11 by the reprex package (v0.3.0)

I'm open to make a pull request

fkrauer commented 4 years ago

Hi Andree, thanks for the suggestion, I think it's a good idea. Will look into it tomorrow. As for dynamic url, I think that's a bit tricky. I might just rename the files without the last update in the file name and just add the update in the commit message. Hope that's not too confusing for people. But makes reading files easier.