Intro

Because functions give outputs as plots, unit testing would not work; manually testing each function instead.

Query 5

Expect success

?query5
query5()
query5(var = "new_deaths")
query5(var = "new_vaccinations")
query5(country = "Canada")
query5(country = "Iceland")
query5(start = "07-21-2020", end = "08-22-2020")
query5(plot_type = "dynamic", var = "positive_rate")
query5(plot_type = "dynamic", var = "hosp_patients", end = "02-02-2022", country = "United Kingdom")
query5(plot_type = "dynamic", var = "hosp_patients", end = "02-02-2022", country = "United Kingdom",
       group_by = "month")
query5(plot_type = "static", var = "hosp_patients", end = "02-02-2022", country = "United Kingdom",
       group_by = "month")
query5(plot_type = "dynamic", var = "hosp_patients", country = "United Kingdom",
       start = "05-01-2020", end = "07-01-2020", group_by = "week")
query5(plot_type = "static", var = "hosp_patients", country = "United Kingdom",
       start = "05-01-2020", end = "07-01-2020", group_by = "week")
query5(plot_type = "static", var = "new_cases", country = c("Greenland", "Iceland", "Switzerland"),
       start = "01-01-2021", end = "02-01-2021", group_by = "week")
query5(plot_type = "dynamic", var = "new_cases", country = c("Greenland", "Iceland", "Switzerland"),
       start = "01-01-2021", end = "02-01-2021", group_by = "week")
query5(plot_type = "static", var = "new_cases", country = c("Greenland", "Iceland", "Switzerland"),
       start = "01-01-2021", end = "02-01-2021", group_by = "week", bar_type = "box")
query5(plot_type = "dynamic", var = "new_cases", country = c("Greenland", "Iceland", "Switzerland"),
       start = "01-01-2021", end = "02-01-2021", group_by = "week", bar_type = "box")
query5(plot_type = "static", var = "new_deaths", country = c("United States", "Canada"),
       start = "03-28-2020", end = "07-26-2020", group_by = "month")
query5(plot_type = "dynamic", var = "new_deaths", country = c("United States", "Canada", "China"),
       start = "03-28-2020", end = "07-26-2020", group_by = "month")
query5(plot_type = "static", var = "new_deaths", country = c("United States", "Canada"),
       start = "03-28-2020", end = "07-26-2020", group_by = "month", bar_type = "box")
query5(plot_type = "dynamic", var = "new_deaths", country = c("United States", "Canada"),
       start = "03-28-2020", end = "07-26-2020", group_by = "month", bar_type = "box")
query5(plot_type = "static", country = c("Canada", "Mexico"), palette = "Pastel2")
query5(plot_type = "dynamic", country = c("Canada", "China"), group_by = "month", palette = "Set2")
query5(plot_type = "dynamic", country = c("Canada", "Switzerland", "Greenland"), group_by = "month", palette = "Set2", bar_type = "box")

Expect failure

query5(plot_type = "new_type")
query5(var = "new_var")
query5(country = "mars")
query5(start = "today")
query5(end = "march, 2020")
query5(country = c("Canada", "United Kingdom", "Australia"), palette = "setosa")


tomzhang255/covidviz documentation built on May 15, 2022, 6:59 a.m.