get.cdc.data: Load the full 'DICE' dataset and subset by date and region.

Description Usage Arguments Value Examples

View source: R/data_fxns.R

Description

This function is generally called by get.DICE.data. For the current season, access the CDC server for most up-to-date data.

Usage

1
2
3
4
get.cdc.data(mod_level = 2, fit_level = 3, mod_name = c(NAME_2 = "USA"),
  start.year = 2016, start.week = 27, end.year = 2017, end.week = 26,
  data_source = "cdc", all_years_flag = T, NOAA_clim = T,
  DICE_db = "predsci")

Arguments

mod_level

An integer describing the spatial level of the model data.(Default value is 2) Levels: 0-Global, 1-Continent, 2-Country, 3-Region, 4-State, 5-County, 6-City. dice currently has mydata at levels 2-3 for CDC and 2-4 for GFT.

fit_level

An integer describing the spatial level of the fits used to construct the model-level profile/forecast (Default value is 3, must be >= mod_level).

mod_name

A named-vector of character strings that specify which region is to be modeled. In other words, mod_name specifies the country, region, state, etc. of the mod_level region. mod_name should be of the form mod_name = c(NAME_2='a', NAME_3='b',..., NAME_i='x' where i=mod_level and 'a', 'b',...,'x' are the appropriate level names. NAME_i='x' also accepts abbreviations. Choose appropriate names from diceData. For example, mod_name=c(NAME_2='United.States',NAME_3='Region4',NAME_4='North.Carolina') and mod_level=4 specifies North Carolina. To achieve the same result, use all abbreviations mod_name=c(NAME_2='USA',NAME_3='R4',NAME_4='NC') or a mix of names and abbreviations mod_name=c(NAME_2='USA',NAME_3='Region4',NAME_4='NC')

start.year

An integer - start year of the flu season

start.week

An integer - starting CDC week of the flu season (default is 27)

end.year

An integer - end year of the flu season (default is end.year = start.year + 1)

end.week

An integer - ending CDC week of the flu season (default is 26)

data_source

A string specifying the type of mydata the user wants to model, currently we support ‘cdc’ and ‘gft’ (default is cdc)

all_years_flag

Logical that determines if all years of incidence are returned in addition to the specified time period.

NOAA_clim

Logical that determines if population-weighted precipitation and temperature (NOAA) are returned. NASA specific humidity is always returned.

Value

mydata A list ILI, SH, School, and Census mydata for both the model- and fit-level region(s).

Examples

1
2
require(DICE)
mydata = get.CDC.data(mod_level = 3, fit_level = 4, mod_name = c(NAME_2='USA',NAME_3='Region4'), start.year = 2014)

predsci/DICE documentation built on Aug. 9, 2019, 9:41 a.m.