expand.human.data: Expand human data

View source: R/dfmip.R

expand.human.dataR Documentation

Expand human data

Description

Takes human cases from a single row for each county and year, and adds individual rows for each county reporting cases I.e. converts it into the format used by dfmip. This is unfortunate, as ArboMAP is the only model that requires the detailed format, and this is not suitable for ArboMAP, as the dates are not accurate. However, it enables a common workflow for all models, and that is highly desirable (i.e. the goal of the project)

Usage

expand.human.data(
  cases,
  arbitrary.date = "08-01",
  case.field = "count",
  year.field = "year",
  location.field = "location"
)

Arguments

cases

Human cases summarized by location and year

arbitrary.date

The month and day to fill into the returned date field. This will be the same for all entries

case.field

The field containing counts of human cases

year.field

The field containing the year of the human cases

location.field

The field containing the spatial extent of the human cases (e.g., county)

Value

human.data Data in the standardized dfmip input format, with a column for date, and a column for location. location-years with no cases are omitted, consequently an assumption of no missing data within years is made.


akeyel/dfmip documentation built on Sept. 3, 2022, 1:26 a.m.