Generate time series plots for combined health and climate data prepared for spatiotemporal and DLNM analysis. Supports aggregation at the country, region, or district level.
plot_health_climate_timeseries(
data,
param_term,
level = "country",
filter_year = NULL,
case_type,
save_fig = FALSE,
output_dir = NULL
)A ggplot object.
A data frame containing the combined health and climate data.
Character. The variable to plot (e.g., tmax, tmean, tmin, Malaria). Use "all" to include all available variables.
Character. Aggregation level: one of "country", "region", or "district". Defaults to "country".
Optional numeric vector to filter data by year(s). Defaults to NULL.
Character. The type of disease that the case column refers to. Must be one of 'diarrhea' or 'malaria'.
Boolean. Whether to save the figure as a PDF. Defaults to FALSE.
Character. Directory path to save the figure. Default to NULL