Compose parts of and complete directory settings controls lists.
Most users will not want or need to change the directory folders and file names, but it is helpful to have them be flexible for certain circumstances, and directory_files
, directory_subdirectories
, and directory_settings
gather them into a set of lists for pipeline functionality. directory_resources
dictates the source
and version
(and any other specialized arguments) for each of the raw resources collected for the directory. time_settings
collates the temporal aspects of the data, and can be used to set up alternate forecast timelines for specialized projects and sandboxing.
Usage
directory_settings(
files = directory_files(),
subdirectories = directory_subdirectories(),
resources = directory_resources(),
time = time_settings(),
confidence_level = 0.95,
nsamples = 10000,
save = TRUE,
overwrite = TRUE,
force = FALSE,
unzip_pause = 30,
download_timeout = getOption("timeout")
)
time_settings(
timeseries_start = as.Date("1995-01-01"),
origin = Sys.Date(),
forecast_date = Sys.Date(),
lead_time = 365,
max_lag = 365,
lag_buffer = 60,
lead_time_buffer = 30
)
directory_files(
directory_configuration = "directory_configuration.yaml",
app = "app.R",
newmoons = "newmoons.csv",
covariates = "covariates.csv",
datasets_controls = "datasets_controls.yaml",
models_controls = "models_controls.yaml",
forecasts_evaluations = "forecasts_evaluations.csv",
forecasts_results = "forecasts_results.csv",
forecasts_metadata = "forecasts_metadata.csv",
metadata = "metadata.yaml",
about_md = "about.md",
models_html = "models.html",
models_rmd = "models.Rmd",
rodents_profiles_html = "rodents_profiles.html",
rodents_profiles_csv = "rodents_profiles.csv",
species_names = "species_names.csv"
)
directory_subdirectories(
forecasts = "forecasts",
fits = "fits",
models = "models",
resources = "resources",
data = "data",
www = "www"
)
directory_resources(
PortalData = list(source = "github", version = "latest"),
portalPredictions = list(source = "github", version = NULL),
climate_forecasts = list(source = "NMME", version = as.character(Sys.Date()), data =
list(mintemp = "tasmin", meantemp = "tasmean", maxtemp = "tasmax", precipitation =
"pr"))
)
production_settings(download_timeout = max(getOption("timeout"), 600))
sandbox_settings()
Arguments
- files
list
ofcharacter
names of standard files, seedirectory_files
.- subdirectories
list
ofcharacter
names of standard subdirectories, seedirectory_subdirectories
.- resources
character
name for the resources subdirectory.- time
list
of time settings, seetime_settings
.- confidence_level
numeric
confidence level used in summarizing model output. Must be between0
and1
.- nsamples
integer
(or integernumeric
) number of samples used to summarizing model output of sample-based estimates.- save
logical
indicator controlling if the output should be saved out.- overwrite
logical
indicator of whether or not file writing should occur even if a local copy already exists.- force
logical
indicator of whether or not existing files or folders (such as the archive) should be over-written if an up-to-date copy exists (most users should leave asFALSE
).- unzip_pause
Positive
integer
or integernumeric
seconds for pausing during steps around unzipping that require time delay.- download_timeout
Positive
integer
or integernumeric
seconds for timeout on downloads. Temporarily overrides the"timeout"
option inbase::options
.- timeseries_start
Date
after which historic samples are included in the timeseries fit. Default value is1995-01-01
, corresponding to moon 217.- origin
Date
forecast origin. Default is today's date (set usingSys.Date
).- forecast_date
Date
of when the forecasts are occurring. Default is today's date (set usingSys.Date
).- lead_time
integer
(or integernumeric
) value for the number of calendar days forward a forecast will cover.
As of version 0.51.0, default is now365
, which when divided by 29.5 (duration of a lunar month), gives 13. The previous value was previously 12. We are now using 13 to align with the timestep being a lunar month, and 13 lunar months covers a full calendar year.- max_lag
integer
(or integernumeric
) maximum number of calendar days that any covariate is lagged for prediction in a model.
Default is365
for the logistic covariate models.- lag_buffer
integer
(or integernumeric
) additional number of calendar days back in time to add to the maximum lag.
Default value of60
corresponds to two additional lunar months.- lead_time_buffer
integer
(or integernumeric
) additional number of calendar days forward in time to forecast.
Default value of30
corresponds to one additional lunar month.- directory_configuration
character
name for the directory configuration YAML.- app
character
name for the application R file.- newmoons
character
name for the lunar data csv.- covariates
character
name for the combined historical and forecast covariates csv.- datasets_controls
character
name for the YAML of datasets control list(s).- models_controls
character
name for the YAML of models controls list(s).- forecasts_evaluations
character
name for the forecast evaluations csv.- forecasts_results
character
name for the forecast combination results csv.- forecasts_metadata
character
name for the forecast metadata csv.- metadata
character
name for the Forecast metadata YAML.- about_md
character
name for the md file for the about page of the app.- models_html
character
name for the html file where the models page will be saved for the app.- models_rmd
character
name for the Rmd file for the models page of the app.- rodents_profiles_html
character
name for the html file where the rodents profiles page will be saved for the app.- rodents_profiles_csv
character
name for the csv file containing content for the rodents profiles table for the app.- species_names
character
name for the csv file containing the output fromportalr::rodent_species
, withset = "forecasting"
,type = "table"
, andtotal = TRUE
.- forecasts
character
name for the forecasts subdirectory.- fits
character
name for the fits subdirectory.- models
character
name for the models subdirectory.- data
character
name for the data subdirectory.- www
character
name for the application www helpers subdirectory.- PortalData
list
ofsource
andversion
elements ofcharacter
values for the Portal Data download. Default values retrieve the latest data from github- portalPredictions
list
ofsource
andversion
elements ofcharacter
values for the archive download. Default values point to github, butverison = NULL
indicates no download.- climate_forecasts
list
ofsource
,version
, anddata
elements ofcharacter
values for the climate forecasts download. Default values retrieve the current day's forecast of min, mean, and max temperature and precipitation from the Northwest Knowledge Network's North American Multi-Model Ensemble (NMME) climate forecasts.
Value
Named list
of settings for the directory (for directory_settings
) or list
of settings components (for directory_files
, directory_subdirectories
, and directory_resources
).
See also
Directory orchestration functions:
directory configuration file
,
directory creation
,
directory filling
,
directory paths