install.packages("remotes") remotes::install_github("rejustify/r-package") library(rejustify)
setCurl() register(token = "YOUR_TOKEN", email = "YOUR_EMAIL")
df <- data.frame(date = as.Date(Sys.time()), country = c('AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PL', 'PT', 'RO', 'SE', 'SI', 'SK'), covid = NA, check.names = FALSE, stringsAsFactors = FALSE)
st <- analyze(df)
st <- adjust(st, column = 1, items = list("class" = "time", "feature" = "week", "format" = "%Y-%m-%d"))
st <- adjust(st, column = 2, items = list("class" = "geography", "feature" = "country"))
st <- adjust(st, column = 3, items = list("provider" = "REJUSTIFY", "table" = "COVID-19-ECDC-WEEKLY"))
rdf <- fill(df, st) vis(rdf)