Learn R Programming

climatehealth (version 1.0.0)

load_and_process_data: Read in and format health data - diseases cases type

Description

Read in a csv file containing a monthly time series of health outcomes and population data. Renames columns and creates time variables for spatiotemporal analysis.

Usage

load_and_process_data(
  health_data_path,
  region_col,
  district_col,
  date_col = NULL,
  year_col = NULL,
  month_col = NULL,
  case_col,
  case_type,
  tot_pop_col
)

Value

A dataframe with formatted and renamed columns.

Arguments

health_data_path

Path to a csv file containing a monthly time series of data for health outcome case type, which may be disaggregated by sex (under five case or above five case), and by Region and District.

region_col

Character. Name of the column in the dataframe that contains the region names.

district_col

Character. Name of the column in the dataframe that contains the district names.

date_col

Character. Name of the column in the dataframe that contains the date. Defaults to NULL.

year_col

Character. Name of the column in the dataframe that contains the year.

month_col

Character. Name of the column in the dataframe that contains the month.

case_col

Character. Name of the column in the dataframe that contains the disease cases to be considered.

case_type

Character. The type of disease that the case column refers to. Must be one of 'diarrhea' or 'malaria'.

tot_pop_col

Character. Name of the column in the dataframe that contains the total population.