Reads in a CSV file for a daily time series of health and climate data, renames columns to standard names. Creates columns for day of week, month, and year columns derived from the date.
read_and_format_data(
health_path,
date_col,
mean_temperature_col,
health_outcome_col,
population_col = NULL,
region_col = NULL,
rh_col = NULL,
wind_speed_col = NULL
)Dataframe with formatted and renamed columns
Path to a CSV file containing a daily time series of data for a particular health outcome and climate variables, which may be disaggregated by region.
Character. Name of the column in the dataframe that contains the date. Date column should be in YYYY-MM-DD or YYYY/MM/DD format.
Character. Name of the column in the dataframe that contains the daily mean temperature column.
Character. Name of the column in the dataframe that contains the daily health outcome count (e.g. number of deaths, hospital admissions)
Character. Name of the column in the dataframe that
contains the population data. Defaults to NULL. If omitted, a pop column
is used when present.
Character. Name of the column in the dataframe that contains the region names. Defaults to NULL.
Character. Name of the column in the dataframe that contains daily relative humidity values. Defaults to NULL.
Character. Name of the column in the dataframe that contains daily wind speed. Defaults to NULL.