
Plot Seasonal Transmission Example with Grid Points
Source:R/plot_seasonal_transmission_example.R
plot_seasonal_transmission_example.RdThis function plots the map of a selected country with grid points used for climate data sampling, and visualizes the seasonal transmission dynamics using Fourier series for both precipitation and cholera cases.
Arguments
- PATHS
A list containing paths where processed climate, cholera, and fitted data are stored. Typically generated by the
get_paths()function and should include:DATA_SHAPEFILES: Path to the directory containing shapefiles for African countries.
MODEL_INPUT: Path to the
data_seasonal_precipitation.csvandpred_seasonal_dynamics_day.csvfiles written byest_seasonal_dynamics.DOCS_FIGURES: Path to save the output plot.
- country_iso_code
A character string representing the ISO3 code of the country to plot.
- n_points
An integer specifying the number of grid points to generate within the country for sampling.
Value
The function generates and saves a PNG file showing the grid points on the country map and the seasonal transmission dynamics.
Details
The years in the legend labels of the precipitation and case points are the calendar years spanned by that country's points, read from the dates in data_seasonal_precipitation.csv (the window est_seasonal_dynamics was fit to). A country without case data in that window has no case points and its label carries no years.