Read in a monthly time series of climate data, rename columns and create lag variable for spatiotemporal and DLNM analysis. The climate data should start a year before a start year in the health data to allow the lag variables calculation.
load_and_process_climatedata(
climate_data_path,
district_col,
year_col,
month_col,
tmin_col,
tmean_col,
tmax_col,
rainfall_col,
r_humidity_col,
runoff_col = NULL,
ndvi_col = NULL,
spi_col = NULL,
max_lag
)climate dataframe with formatted and renamed columns, and the lag variables
Path to a csv file containing a monthly time series of data for climate variables, which may be disaggregated by district.
Character. Name of the column in the dataframe that contains the region names.
Character. Name of the column in the dataframe that contains the Year.
Character. Name of the column in the dataframe that contains the month.
Character. Name of the column in the dataframe that contains the minimum temperature data.
Character. Name of the column in the dataframe that contains the average temperature.
Character. Name of the column in the dataframe that contains the maximum temperature.
Character. Name of the column in the dataframe that contains the cumulative monthly rainfall.
Character. Name of the column in the dataframe that contains the relative humidity.
Character. Name of the column in the dataframe that contains the monthly runoff water data. Defaults to NULL.
Character. Name of column containing the Normalized Difference Vegetation Index (ndvi) data. Defaults to NULL.
Character. Name of the column in the dataframe that contains the standardized precipitation index. Defaults to NULL.
Character. Number corresponding to the maximum lag to be considered for the delay effect. It should be between 2 an 4. Defaults to 4.