# Load data
data("dengue_MS")
# Plotting a covariate, all areas in a single graph
plot_timeseries(dengue_MS,
var = "tmin",
time = "date",
type = "cov",
area = "micro_code",
title = "Minimun Temperature")
# Plotting a covariate with space aggregation and different facets
plot_timeseries(dengue_MS,
var = "tmin",
time = "date",
type = "cov",
area = "micro_code",
aggregate_space = "meso_code",
aggregate_space_fun = "mean",
facet = TRUE,
var_label= "Minimum Temperature",
palette = "violetred")
# Plotting counts, highlight a single area
plot_timeseries(dengue_MS,
var = "dengue_cases",
time = "date",
type = "counts",
pop = "population",
area = "micro_code",
title= "Dengue cases",
highlight = "50001")
# Plot disease counts (log scale) with temporal and spatial aggregation
plot_timeseries(dengue_MS,
var = "dengue_cases",
time = "date",
type = "counts",
area = "micro_code",
aggregate_space = "meso_code",
aggregate_time = "year",
title = "Yearly Cases",
transform = "log10")
# Plot incidence for 1,000 people with a Brewer palette and log y axis
plot_timeseries(dengue_MS,
var = "dengue_cases",
time = "date",
type = "inc",
pop = "population",
area = "micro_code",
pt = 1000,
transform = "log10p1")
Run the code above in your browser using DataLab