Skip to contents

This function pulls, formats and returns NSSP emergency department visit data in hubverse format.

Usage

get_hubverse_format_nssp_data(
  disease,
  base_hub_path,
  as_of = lubridate::today(),
  included_locations = hubhelpr::included_locations,
  nssp_update_local = FALSE,
  start_date = NULL,
  end_date = NULL
)

Arguments

disease

Disease name ("covid" or "rsv").

base_hub_path

Path to the base hub directory.

as_of

As-of date of the data pull. Default is the system date as determined by lubridate::today().

included_locations

Vector of location codes to include in the output. Default value hubhelpr::included_locations.

nssp_update_local

Logical. Whether to update NSSP data from local file auxiliary-data/latest.parquet (default: FALSE).

start_date

First week-ending date to include for the NSSP dataset. Default value is NULL (no filtering).

end_date

Last week-ending date to include for the NSSP dataset. Default value is NULL (no filtering).

Value

Data frame with formatted NSSP data.