Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace dataset with year, month and day in separate columns #79

Closed
avallecam opened this issue Jun 17, 2024 · 0 comments · Fixed by #143
Closed

replace dataset with year, month and day in separate columns #79

avallecam opened this issue Jun 17, 2024 · 0 comments · Fixed by #143
Assignees
Labels
clean-validation set of issues about the clean-validation episode priority upcoming-training To prioritize

Comments

@avallecam
Copy link
Member

to avoid having an output that does not recover the dates, we can try to upload a dataset with year, month and day in separate columns

we can use this code to create it

library(dplyr)
library(rio)

rio::import("https://raw.githubusercontent.com/epiverse-trace/tutorials-early/main/episodes/data/ebola_cases.csv") %>% 
  dplyr::mutate(
    year = lubridate::year(date),
    month = lubridate::month(date),
    day = lubridate::day(date)
  ) %>% 
  dplyr::select(
    year:day, confirm
  ) %>% 
  dplyr::as_tibble()
#> # A tibble: 120 × 4
#>     year month   day confirm
#>    <dbl> <dbl> <int>   <int>
#>  1  2014     5    18       1
#>  2  2014     5    20       2
#>  3  2014     5    21       4
#>  4  2014     5    22       6
#>  5  2014     5    23       1
#>  6  2014     5    24       2
#>  7  2014     5    26      10
#>  8  2014     5    27       8
#>  9  2014     5    28       2
#> 10  2014     5    29      12
#> # ℹ 110 more rows

Created on 2024-06-14 with reprex v2.1.0

Originally posted by @avallecam in #70 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean-validation set of issues about the clean-validation episode priority upcoming-training To prioritize
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant