Learn R Programming

climatehealth (version 1.0.0)

air_pollution_descriptive_stats: Descriptive statistics

Description

Generates summary statistics for climate, environmental and health data

Usage

air_pollution_descriptive_stats(
  data,
  env_labels = c(pm25 = "PM2.5 (µg/m³)", tmax = "Max Temperature (°C)", precipitation
    = "Precipitation (mm)", humidity = "Humidity (%)", wind_speed = "Wind Speed (m/s)"),
  save_outputs = FALSE,
  output_dir = NULL,
  moving_average_window = 3L,
  plot_corr_matrix = FALSE,
  correlation_method = "pearson",
  plot_dist = FALSE,
  plot_na_counts = FALSE,
  plot_scatter = FALSE,
  plot_box = FALSE,
  plot_seasonal = FALSE,
  plot_regional = FALSE,
  plot_total = FALSE,
  detect_outliers = FALSE,
  calculate_rate = FALSE
)

Value

Invisibly returns the national data with moving averages

Arguments

data

Dataframe containing a daily time series of climate, environmental and health data

env_labels

Named vector. Labels for environmental variables with units.

save_outputs

Logical. Whether to save outputs. Defaults to FALSE.

output_dir

Character. Directory to save descriptive statistics. Defaults to NULL.

moving_average_window

Numeric. Window size for moving average calculations. Defaults to 3 (3-day moving average).

plot_corr_matrix

Logical. Whether to plot correlation matrix. Defaults to FALSE.

correlation_method

Character. Correlation method. One of 'pearson', 'spearman', 'kendall'.

plot_dist

Logical. Whether to plot distribution histograms. Defaults to FALSE.

plot_na_counts

Logical. Whether to plot NA counts. Defaults to FALSE.

plot_scatter

Logical. Whether to plot scatter plots. Defaults to FALSE.

plot_box

Logical. Whether to plot box plots. Defaults to FALSE.

plot_seasonal

Logical. Whether to plot seasonal trends. Defaults to FALSE.

plot_regional

Logical. Whether to plot regional trends. Defaults to FALSE.

plot_total

Logical. Whether to plot total health outcomes per year. Defaults to FALSE.

detect_outliers

Logical. Whether to detect outliers. Defaults to FALSE.

calculate_rate

Logical. Whether to calculate rate per 100k people.. Defaults to FALSE.