# Load data
data("dengue_MS")
data("dengue_SP")
# Plotting two covariates with temporal aggregation, align using the mean
plot_timeseries2(dengue_SP,
var = c("temp_med", "precip_tot"),
time = "date",
align = "mean",
aggregate_time = "month")
# Plotting case incidence and a covariate with temporal aggregation
# and customized colours and labels
plot_timeseries2(dengue_SP,
var = c("cases", "precip_tot"),
type = c("inc", "cov"),
var_label = c("Incidence", "Precipitation"),
title = "Precipitation and dengue incidence in Sao Paulo",
time = "date",
pop = "pop",
aggregate_time = "month",
palette = c("darkgreen", "royalblue"),
alpha = 0.8)
# Plotting case incidence and a covariate with spatial aggregation
plot_timeseries2(dengue_MS,
var = c("dengue_cases", "pdsi"),
type = c("inc", "cov"),
pop = "population",
time = "date",
area = "micro_code",
aggregate_space = "meso_code")
Run the code above in your browser using DataLab