# Load data
library("sf")
data("dengue_MS")
data("map_MS")
plot_compare(
plot_function = plot_timeseries,
data = dengue_MS,
var = c("dengue_cases", "pdsi"),
type = c("inc", "cov"),
pop = "population",
time = "date",
area = "micro_code",
var_label = c("Dengue inc", "PDSI"),
combine_legend = TRUE,
ncol_legend = 1,
ncol = 1,
align = "h")
# Comparing seasonality plots
plot_compare(
plot_function = plot_seasonality,
data = dengue_MS,
var = c("dengue_cases", "dengue_cases", "pdsi"),
type = c("counts", "inc", "cov"),
pop = "population",
time = "date",
area = "micro_code",
aggregate_space = "region_code",
pt = 100,
var_label = c("Dengue Cases", "Dengue inc", "Min Temp"),
ncol_legend = 1,
combine_legend = TRUE)
# Comparing heatmaps plots
plot_compare(
plot_function = plot_heatmap,
data = dengue_MS,
var = c("dengue_cases", "pdsi"),
type = c("inc", "cov"),
pop = "population",
time = "date",
area = "micro_code",
var_label = c("Dengue Cases", "Min Temp"),
palette = c("Reds", "Blues"),
ncol_legend = 1,
combine_xaxis = TRUE)
# Comparing map plots
plot_compare(
plot_function = plot_map,
data = dengue_MS,
var = c("dengue_cases", "tmax"),
type = c("inc", "cov"),
pop = "population",
time = "date",
area = "micro_code",
var_label= c("Dengue Incidence", "Max Temperature"),
palette = c("Reds", "Blues"),
map = map_MS,
map_area = "code",
aggregate_time = "all",
ncol_legend = 1,
combine_xaxis =TRUE)
Run the code above in your browser using DataLab