Description Usage Arguments Value Examples
get.DICE.data
retrieves all the information for the model and fit regions from the DICE data base. DICE currently has Google Flu Trends (GFT) and Centers for Disease Control (CDC) for the United States and Dengue data for a large number of countries. It is assumed that one might be using finer resolution data (fit_level) to create a forecast for a larger area (mod_level).
1 2 3 4 5 | get.DICE.data(data_source = "cdc", mod_level = 2, mod_name = c(NAME_2 =
"US"), fit_names = "all", fit_level = 3, RegState = NULL, year = 2015,
nperiodsFit = 52, model = 4, isingle = 0, db_opts = list(DICE_db =
"predsci", CDC_server = TRUE), disease = "flu", epi_model = 1,
method = "mech", all_years_flag = T, all_cad_clim = T)
|
data_source |
Describes the data source for the incidence data. Default is 'cdc' (for |
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 data at levels 2-4 for CDC and GFT. |
mod_name |
Named vector of strings specifying the model-level spatial patch. If |
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). |
RegState |
Single element: determines which single region from |
year |
A Number - The starting year of the flu season (Default value is 2017). dice currently has data for years 2003-2015 for CDC and 2003-2014 for GFT. |
nperiodsFit |
A number - the number of data periods the user wants to include in the fit. (Default is to include all available data) |
model |
A number - the model number (currently we support models 1-5 for flu and 4-5 for dengue. Default is model 4 ) |
isingle |
Integer 0 couple the fit-level regions/patched 1 do NOT couple. Default is couple |
db_opts |
A list of database options. $DICE_db Determines which SQL database the data is retrieved from. 'PredSci' is the default SQL database, 'BSVE' is in development. Additional flags are for outside sources of data (currently only the CDC Influenza-Like_Illness (ILI) is supported: $CDC_server=TRUE). |
disease |
String - disease name. Options for modeling are: flu, dengue, yellow$\_$fever, ebola, zika, cholera, chik, plague. To graphically explore the data see: predsci.com/id$\_$data/. A full list of diseases in the DICE database can be found from an R-prompt by following one of the examples below. |
epi_model |
Numeric, 1 == sir (default) 2 == seir. Used to build a filename for output |
method |
String either 'mech' for compartmental mechanistic models or 'stat' for SARIMA models. Used to build a filename for output |
all_years_flag |
TRUE/FALSE, grab all years of incidence data in addition to the specified season. |
all_cad_clim |
TRUE/FALSE, grab all years of climate data that are available. |
fit_name |
A character vector indicating which fit-regions to use. If |
mydata - a list with all available data and auxillary information for both the model and fit data sets.
For both we provide the percent weighted ILI, the number of cases, the weekly averaged specific humidity, precipitation and temerature and the school vacation schedule. For dengue - most of the data is monthly and almost all the data is number of cases. We also provide averaged specific humidity, precipitation and temperature on the same cadence as the dengue data.
The auxillary information, for both data sets, includes the populations, the lon/lat values and all the names describing the region.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | require(DICE)
# Get national and regional CDC mydata
get.DICE.data(data_source = 'cdc', mod_level = 2, fit_level = 3, RegState = 'usa', year = 2015, nperiodsFit = 45, mode = 5)
# Get Region9 and state GFT mydata
get.DICE.data(data_source = 'gft', mod_level = 3, fit_level = 4, RegState = 9 , year = 2013, nperiodsFit = 45, mode = 5)
# Create a 'west coast' region from California, Oregon, Washington
get.DICE.data(data_source = 'gft', mod_level = 3, fit_level = 4, RegState = c('CA','OR','WA'), year = 2013, nperiodsFit = 45, mode = 5)
Dengue data
get.DICE.data(mod_level = 3, fit_level = 3, year = 1010, nperiodsFit = 12, model = 4, isingle = 0,
sql_db = TRUE, disease = 'dengue', RegState = 'BR')
-- Data diseases and data_sources -------
Access the database and list all available diseases:
library(DICE)
myDB = OpenCon()
data_sources = dbReadTable(con=myDB, name="data_sources")
unique(data_sources$disease)
# then list all data sources
str(data_sources)
data_sources$source_abbv
dbDisconnect(myDB)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.