Version numbers follow Semantic Versioning.
08-21-2024
- Add sNaiveArima, sAutoArima models. The models were skipped.
01-01-2024
- Avoid creating extra folders from relative paths
01-01-2024
- Zipping forecast folder in resources
12-16-2023
- Tests for zip and unszip functions
11-16-2023
- Store forecasts by date using the zip format
- Move from portalPredictions to portal-forecasts due to size limitations.
5-22-2023
5-19-2023
- Using a 3rd party action while docker gets this functionality integrated
- addresses #361
5-18-2023
- thought it was installed, but it isn't in tidyverse, just verse
5-18-2023
- Auto templates for issues and PRs
- Was removed accidentally from dockerfile causing breaks in main repo, seeing if it works to be in the package itself
5-12-2023
- Tightening and improving language in Title and Description fields in DESCRIPTION file
- including a production and a sandbox image
- A simple "can you run
library(portalcasting)
" to start, can use this entry point to expand the testing suite on the image in the future
5-5-2023
- Facilitating the working across different calling styles.
5-4-2023
- Now having a single app.R file in the top level of the directory simplifies the issue around where the files are for the app
- This replaces the global.R, ui.R, and server.R files
5-3-2023
- Previously, we were using default settings for
remotes::install_github
, which actually points to HEAD, when testing the build and push for the docker action. that was fine (although not great) when we were only running that action on tagged version releases, as the main branch was typically up-to-date with the tag and such, but this isn't exact and it also means any testing of the build on a PR was actually still grabbing from main, which is not what we want. - We now use the SHA for the specific event that triggers the build by passing it into the docker file as an ARG
4-26-2023
4-25-2023
- The table was too big as was for github standard, so removing columns of repeated content that can be grabbed from metadata
4-24-2023
4-24-2023
- Shift to bootstrap 5
- Because of the long run time of some of the code, we wrap most documentation examples and vignette code in a way to prevent evaluation in real-time. As a result, much of the documentation code isn't run and therefore would not break builds if it would error.
- To address this, we add two scripts in the new inst/extra_testing folder and a github action runner for each.
- Cites the JOSS paper.
- Improves robustness of building the app (includes code and dependencies in the docker image, allows for unit testing app components, etc.)
- Also allows users to spin-up a local version with
run_web_app()
pointed tomain
- Avoids computing evaluations while generating plots
- The models are now implemented using
cast
on their fit and cast elements in their control lists - Only models the need new functions have them (
meta_tsglm
andfit_runjags
) for fitting forecast
method used generally now forcast
function- introduction of
forecast
methods fortsglm
andrunjags
objects
- introduction of
- need to shift this to level daily so we can manage when a newmoon is split between historic and forecast days
- This is more articulated and allows for finer control to help avoid fitting issues, etc.
cast_date
is not an argument anymore, just filled automaticallydataset
arguments are also being removed as possible to streamline (just pull from model controls)
- To facilitate a lot of downstream functionality, we're breaking up the model functions to operate on the species-level rather than the dataset-level, according to the new control lists
- Species that were failing the nb GARCH models (s or not) have been removed, since that throws a warning and then fits a Poisson version, and we are now fitting Poisson versions of everyone.
- provides a much more general way to produce a forecast that can be integrated in the system, leveraging the metadata files
- species
- to facilitate backwards compatibility, filled with NA for previous tables if missing when loaded
- pevGARCH, nbGARCH, nbsGARCH all get past_mean set to 13
- all models set with lead_time of 13
- sAutoArima
- sNaiveArima
- pGARCH
- psGARCH
update_dir
is an "update-flavored" setup function
- log and crps!
2023-03-03
- including a nicer print_name for rendering the model texts
2023-02-24
2023-02-23
- settings
overwrite
is nowFALSE
by default to manage the version match decision making - the directory resources portalpredictions version is updated to be the correct value (
"latest"
; wasNULL
) - the
overwrite
setting is temporarily removed from the file saving functions to prevent argument name confusion - we need to have an external location of file version to compare
- Model values were not facilitating good chain mixing, updated now
2023-02-21
- Multiple models had the jags_logistic_covariates name being used in the metadata output when that was not correct.
2023-01-24
- Changing dataset controls list input from having
all
for species to listing the species.
2022-11-18
- Following the removal of the
interp
datasets - Now model controls indicate species to which their applied
jags_logistic_competition
jags_logistic_covariates
jags_logistic_competition_covariates
2022-10-27
- Modeling and tracking sigma not tau (sd, not precision)
- No max caps for density or counts (aka removing guardrails)
- No use of
+ 0.1
- 0.1
for logging, managing it differently - Chain increase from 2 to 4, silent jags is now FALSE
- Removal of
jags_SS
wrapper, which limited adaptation of the model
- Removal of the
jags_SS
wrapper eliminates the core of that vignette
- Allows covariates logistic model
2022-05-31
- Vignette now pulls text from the the model list, and loops the model list, rather than have the raw text in the markdown doc.
- This locates the description in a place that is accessible to other content generation (e.g., the portal forecast website)
2022-05-27
- Patching, not all hit with previous release
2022-05-26
- Previously, datasets included, for example
all
andall_interp
. Now, onlyall
exists and models interpolate as needed.
2022-05-12
dfl
arg tox
- Now pulls all datasets using
prefab_datasets
model fits
now back tofits
andmodel scripts
back tomodels
- Flattened version of the generated list of evaluations
- Rather crude options of saving or not and overwriting the whole file or not based on settings
- No file saving occurs when a single cast is evaluated
2022-05-11
- Allows download of larger directory archive without timeout
2022-04-21
- Prevents warnings / errors
2022-04-21
- starting with what is already occurring, but formalizing as such as part of an
evaluate_casts
andevaluate_cast
pair of functions evaluate_casts
function now works automatically to evaluate all the casts usingevaluate_cast
, generating the error table as it does when being used, but nothing is saved out or updated.- there is also no filter on evaluated casts by default, so the output from the forecasts without observations to evaluate is a table with a single row with NaN, and then they get wrapped up into the list.
- no errors, just noteworthy
2022-04-08
- Now includes
type
argument withabbreviation
,Latin
, andtable
options - No more
most_abundant_species
function, as we're not using it on the website.
2022-04-07
time
response
withtype
andlink
evaluate_casts
andevaluate_cast
currently just placeholders
2022-04-07
- No longer used, internal R code (e.g.,
tempdir
) provides needed functionality - Also removing
clear_tmp
2022-04-07
- Facilitates fuller log
2022-04-05
- Moved from source code scripts to
.yaml
files ininst/extdata
read_
andwrite_
functions for both rodent and model controls lists
- "data_set" -> "dataset"
2022-04-01
2022-04-01
setup_dir
now takes asettings
argument that is alist
of the argumentsdirectory_settings
function now quickly and cleanly collapses the settings that go intosetup_dir
- Control lists are now structured for use with
do.call
- No longer concerned about the 80 char line limit
- Long argument lists, etc. are now formatted for quick top-to-bottom reading, via alignment on the
(
and=
- Use of base R functions is sufficient
- Internalized auto-checking relieves user of need to dictate checking
- Need to update with new API
- Also need to add alt-text to all images
2022-03-30
- Argument needed to be removed still
2022-03-28
- Function redesigned to align with
message
directly argument for argument with the addition of thequiet
argument. - Now allows for multiple message arguments via
...
that become pasted together
- Minimize unnecessary functions
2022-03-28
- Now just
create_dir
2022-03-02
- invoked as
jags_logistic
likejags_RW
, applied toDM
controls dataset. - Building upon the jags_RW model, jags_logistic expands upon the "process model" underlying the Poisson observations.
- There are four process parameters: mu (the density of the species at the beginning of the time series) and tau (the precision (inverse variance) of the random walk, which is Gaussian on the log scale) for the starting value and r (growth rate) and K (carrying capacity) of the dynamic population. The observation model has no additional parameters.
2022-01-26
2022-01-26
- Commenting out as needed to prevent build breaks
2022-01-19
2021-12-08
- tagging to update Docker image with portalr 0.3.9
2021-11-30
- adding source and version args to check args
- software context added to ms
- overview added to readme
- updating the getting started vignette to use production to allow for historical uses
2021-11-11
- Shift to default downloading archive from GitHub
- setup_dir does not download archive by default, but setup_production does
- download function being broken out into components -- work is still ongoing, but now have a separate function for each of the portaldata portalpredictions and climate forecasts
- addresses #132 #199
2021-11-10
- the ndvi data stream is not filling in with new content, resulting in NAs for the latter half of 2021
- using a forecast call to fill in the missing values as a temporary patch
2021-11-09
- Previous versions used Hao's fork of the
rEDM
packages, which has been deprecated and now breaks because of the updates in Rcpp - Switching to CRAN version
- Updating
rEDM
to CRAN does not fix the issue, so these models cannot be used in prefab set - Removed from the prefab control list and removed the documentation
- No longer exported from the NAMESPACE
- A few edge case issues arose in test because of fixed moons
- Should be resolved through edits to test scripts without altering functions
2021-11-09
2021-09-17
Skipped
- Including no running of examples (needed to be explicitly stated); addressing 206
- Use RStudio package manager to speed up running; addressing 206
2021-02-11
2021-02-10
2021-02-04
- Missing data from weather stations caused issues
- Now if there is a missing set of data for a month of covariates, the saved covariate forecasts are used
- For use in the basic single-species process models
- Note lowercase name! Using capitals in the actual name of the data set creation will cause problems because
tolower
gets used elsewhere!
2020-10-28
- Addressing issues with updated dplyr
2020-01-23
2020-01-23
2020-01-23
2020-01-23
- For building here
2020-01-16
- Gaussian processes using Empirical Dynamic Modeling
- Actually does this (0.17.0 had a snag)
2020-01-15
- Gaussian processes using Empirical Dynamic Modeling
2020-01-10
- Saving
model_fits
andmodel_casts
out as serialized.json
files now instead of.rData
files - More reliable and generalized.
- Also added functions for reading them in (
read_model_casts
andread_model_fits
). - addresses
2019-12-18
- Due to backwards incompatible changes in portalr and it not being on CRAN yet
2019-12-18
- To address a Zenodo hiccup
2019-10-31
- Added a vignette that describes how to use the JAGS/runjags API within portalcasting.
- addresses
- Use of it from
DesignLibrary
causes a problematic dependency chain with the docker image building
- Wasn't using the species name function, and so was pulling in the traps column, which was causing a break in plotting.
2019-10-24
2019-10-12
- Previously, the controls list for the files in the model scripts was taken from the environment in which the script was run, which opens the script to everything, which is undesirable.
- After the need to include a control list for runjags models forced an explicit writing of the list inputs, the code was available to transfer to the files control list.
- This does mean that the function calls in the scripts are now super long and explicit, but that's ok.
- To avoid super long model script lines (where event default inputs are repeated in the list functions), a function
control_list_arg
was made to generalize what was coded up from the runjags list for use also with the files control list. This function writes a script component that only includes arguments to the list function that are different from the formal definition.
2019-10-12
- rmarkdown v1.16.0 has some issues with rendering images, so forcing use of v1.16.1 for now.
- Inclusion of new functions in reference list.
2019-10-11
- Previously, if you changed any controls of a prefab model, you had to manually re-write the models using
fill_models
before runningportalcast
. - Using
fill_models
would result in hand-made scripts being overwritten, so a specific function (update_models
) for updating the models was created. update_models
by default only updates the models listed in thecontrols_model
input, to avoid overwriting model scripts. To change this behavior and also update all of the prefab models' scripts, setupdate_prefab_models = TRUE
. This is particularly handy when changing a global (with respect to model scripts) argument:main
,quiet
,verbose
, orarg_checks
.- addresses
- Indication now made that a component of the directory is missing and suggestion is made to run
create_dir
. - addresses
- There was a bug with matching the interpolated to the non interpolated data sets within the ensembling, which has been fixed.
- addresses
- Moved most of the messaging into tidied functions.
- Now there is no
start_moon
argument, and all of the data prior toend_moon
are returned. - This aligns the rodents prep functions with the other (moons, covariates) prep functions.
- Facilitates use of data prior to
start_moon
in forecasting models (e.g., for distributions of starting state variables). - Requires that model functions now explicitly trim the rodents table being used. This has been added to all prefab models.
- Previous targets were restrictively high due to earlier near-perfect coverage.
- A codecov.yml file is now included in the repo (and ignored for the R build) which sets the target arbitrarily at the still-quite-high-but-not-restrictively-so 95%.
- It can be changed if needed in the future.
- Using the runjags package, with extensive access to the API of
run.jags
via acontrol_runjags
list
(seerunjags_control
). - Currently in place with a very simple random walk model.
- addresses
- Expanded back in time to the start.
- Added effort columns (all default options in
prefab_rodents_controls
haveeffort = TRUE
).
- Added section at the end about just extending existing models to new data sets.
- addresses
2019-09-14
- Associated with the reconfiguration of portalcasting from v0.8.1 to 0.9.0, ensembling was removed temporarily.
- A basic ensemble is reintroduced, now as an unweighted average across all selected models, allowing us to have an ensemble but not have it be tied to AIC weighting (because AIC weighting is no longer possible with the split between interpolated and non-interpolated data for model fitting).
- In a major departure from v0.8.1 and earlier, the ensemble's output is not saved like the actual models'. Rather, it is only calculated when needed on the fly.
- In plotting, it is now the default to use the ensemble for
plot_cast_ts
andplot_cast_point
and for the ensemble to be included inplot_casts_err_lead
andplot_casts_cov_RMSE
.
- Function used to select the most common species.
- Now uses the actual data and not the casts to determine the species.
2019-09-13
- Were removed with the updated version from 0.8.1 to 0.9.0 to allow time to develop the code with the new infrastructure.
- Model evaluation happens within the cast tab output as before.
- Associated with the evaluation.
- Plotting of error as a function of lead time for multiple species and multiple models. Now has a fall-back arrangement that works for a single species-model combination.
- Plotting RMSE and coverage within species-model combinations.
- For sandboxing with existing models, it is useful to be able to change a parameter in the model's controls, such as the data sets. Previously, that would require a lot of hacking around. Now, it's as simple as inputting the desired controls and flipping
arg_checks = FALSE
.
2019-09-06
- Moved key arguments to focal top-level inputs, rather than nested within control options list. Allows full control, but with default settings working cleanly. addresses
- Restructuring of the controls lists, retained usage in situations where necessary: model construction, data set construction, file naming, climate data downloading.
- Openness for new
setup
functions, in particularsetup_sandbox
. addresses - Simplification of model naming inputs. Just put the names in you need, only use the
model_names
functions when you need to (usually in coding inside of functions or for setting default argument levels). addresses
dirtree
was removedbase
(both as a function and a concept) was removed. To make that structure usemain = "./name"
.- "PortalData" has been removed as a sub and replaced with "raw", which includes all raw versions of files (post unzipping) downloaded: Portal Data and Portal Predictions and covariate forecasts (whose saving is also new here).
- Expanded use of
quiet
andverbose
connected throughout the pipeline. - Additional messaging functions to reduce code clutter.
- Formatting of messages to reduce clutter and highlight the outline structure.
- Flexible interface to downloading capacity through a url, with generalized and flexible functions for generating Zenodo API urls (for retrieving the raw data and historical predictions) and NMME API urls (for retrieving weather forecasts) to port into the
download
function. addresses and addresses and addresses
- Substantial reduction in effort for users who wish to add models (i.e. anyone who is sandboxing). You can even just plunk your own R script (which could be a single line calling out to an external program if desired) without having to add any model script writing controls, and just add the name of the model to the models argument in
portalcast
and it will run it with everything else. - Outlined in the updated Getting Started and Adding a Model/Data vignettes.
- Users adding models to the prefab suite should now permanently add their model's control options to the source code in
model_script_controls
rather than write their own control functions. - Users adding models to the prefab suite should permanently add their model's function code to the
prefab_models
script (reusing and adding to the documentation inprefab_model_functions
), rather than to its own script. - Users should still add their model's name to the source code in
model_names
.
- Models are no longer forced to use interpolated data.
- Models are no longer required to output a rigidly formatted data-table. Presently, the requirement is just a list, but soon some specifications will be added to improve reliability.
- Outlined in the updated Adding a Model/Data vignette.
- Generalized cast output is now tracked using a unique id in the file name associated with the cast, which is related to a row in a metadata table, newly included here. addresses and addresses and addresses
- Additional control information (like data set setup) is sent to the model metadata and saved out.
- Directory setting up configuration information is now tracked in a
dir_config.yaml
file, which is pulled from to save information about what was used to create, setup, and run the particular casts.
Changes for users interested in analyzing their own data sets not in the standard data set configuration
- Users are now able to define rodent observation data sets that are not part of the standard data set ("all" and "controls", each also with interpolation of missing data) by giving the name in the
data_sets
argument and the controls defining the data set (used by portalr'ssummarize_rodent_data
function) in thecontrols_rodents
argument. - In order to actualize this, a user will need to flip off the argument checking (the default in a sandbox setting, if using a standard or production setting, set
arg_checks = FALSE
in the relevant function). - Users interested in permanently adding the treatment level to the available data sets should add the source code to the
rodents_controls
function, just like with the models. - addresses
- Internal code points the pipeline to the files named via the data set inputs. The other data files are pointed to using the
control_files
(seefile_controls
) input list, which allows for some general flexibility with respect to what files the pipeline is reading in from thedata
subdirectory.
- The prefab
all
andcontrols
were both default being interpolated for all models because of the use of AIC for model comparison and ensemble building. That forced all models to use interpolated data. - Starting in this version, the models are not required to have been fit in the same fashion (due to generalization of comparison and post-processing code), and so interpolation is not required if not needed, and we have split out the data to standard and interpolated versions.
write_model
andmodel_template
have adata_sets
argument that is used to write the code out, replacing the hard code requirement of analyzing "all" and "controls" for every model. Now, users who wish to analyze a particular data component can easily add it to the analysis pipeline.
- Throughout the codebase, terminology has been generalized from "fcast"/"forecast"/"hindcast" to "cast" except where a clear distinction is needed (here primarily due to where the covariate values used come from).
- Nice benefits: highlights commonality between the two (see next section) and reduces code volume.
start_newmoon
is nowstart_moon
likeend_moon
- addresses
- In the codebase now, "hindcasting" is functionally "forecasting" with a forecast origin (
end_moon
) that is not the most recently occurring moon. - Indeed, "hindcast" is nearly entirely removed from the codebase and "forecast" is nearly exclusively retained in documentation (and barely in the code itself), with both functionally being replaced with the generalized (and shorter) "cast".
cast_type
is retained in the metadata file for posterity, but functionality is more generally checked by consideringend_moon
andlast_moon
in combination, whereend_moon
is the forecast origin andlast_moon
is the most recent- Rather than the complex machinery used to iterate through multiple forecasts ("hindcasting") that involved working backwards and skipping certain moons (which didn't need to be skipped anymore due to updated code from a while back that allows us to forecast fine even without the most recent samples yet), a simple for loop is able to manage iterating. This is also facilitated by the downloading of the raw portalPredictions repository from Zenodo and critically its retention in the "raw" subdirectory, which allows quick re-calculation of historic predictions of covariates. addresses
cast_type
has been removed as an input, it's auto determined now based onend_moon
and the last moon available (if they're equal it's a "forecast", if not it's a "hindcast").
- Within
cast
, the model scripts are now sourced within a for-loop (rather than sapply) to allow for simple error catching of each script. addresses
- Arg checking is now considerably tighter, code-wise.
- Each argument is either recognized and given a set of attributes (from an internally defined list) or unrecognized and stated to the user that it's not being checked (to help notify anyone building in the code that there's a new argument).
- The argument's attributes define the logical checking flow through a series of pretty simple options.
- There is also now a
arg_checks
logical argument that goes intocheck_args
to turn off all of the underlying code, enabling the user to go off the production restrictions that would otherwise through errors, even though they might technically work under the hood.
- Done in general to update with the present version of the codebase.
- Broke the
adding a model or data
vignette into "working locally" and "adding to the pipeline", also added checklists and screen shots. addresses - Reorganized the
getting started
vignette to an order that makes sense. addresses
drop_spp
is now changed tospecies
(so focus on inclusion, not exclusion). addresses- Improved examples, also now as
\donttest{}
. addresses - Tightened testing with
skip_on_cran
used judiciously. addresses - No longer building the AIC-based ensemble. addresses
- Default confidence limit is now the more standard 0.95.
2019-07-11
Inclusion of json file and some minor editing of documentation, but no functional coding changes
2019-03-21
- If
cast_dates = NULL
(the default), the plot only uses the most recent -cast to avoid swamping more current -casts with historic -casts.
- There's a bit of leeway with respect to argument validity, in particular around
model names (to facilitate users making new models with new names, we don't want
to hardwire a naming scheme in
check_arg
), so now there are checks to see if the tables returned fromselect_casts
have any rows or not.
- The trimming of the data sets for model function testing (happens in the AutoArima test script) now includes addition of some dummy values for edge cases (all 0 observations and nearly-all-0 observations), which allows better coverage of testing for the -GARCH model functions in particular.
- There was a mismatch between
fcast
andforecast
for one of the edge cases.
2019-03-21
- In
nbGARCH
and then extended intonbsGARCH
, the models fall back to a Poisson distribution if the negative binomial fit fails. Previously (with onlynbGARCH
) the Poisson fit always succeeded in those back-ups, but now (withnbsGARCH
) that sometimes isn't the case (because the predictor model is more complex) and even the Poisson fit can fail. So now for both models, if that fit fails, we follow what occurs inpevGARCH
which is to use thefcast0
forecast of 0s and an arbitrarily high AIC (1e6
).
2019-03-20
pevGARCH()
was not set up to leverage thecovariate_forecasts
file.- It's now set up with a toggle based on the
cast_type
in the metadata list (which has replaced the formerly namedfilename_suffix
element) to load thecovariate_forecasts
file (using a newread_covariate_forecasts
function) and then select the specific hindcast based on thesource
anddate_made
columns as selected by new elements in the metadata list (covariate_source
andcovariate_date_made
).
2019-03-19
- Model
nbsGARCH
has been added to the base set of models.
foy()
calculates the fraction of the year for a given date or set of dates.
2019-03-19
- To aid with stability, we're now using the CRAN release of portalr
- Provides a simple way to list the scripts in the
models
subdirectory.
- Including a simple message to report the version of portalcasting loaded in top level functions.
- Adding plot (from pre-constructed images) to the how-to vignette.
- There was a lingering old name from the argument switch over that was
causing model templates to be written with a
""
argument for themodel
model name input intosave_forecast_output
.
2019-03-16
- Introduction of
check_args
andcheck_arg
which collaborate to check the validity of function arguments using a standardized set of requirements based on the argument names, thereby helping to unify and standardize the use of the codebase's arguments.
prep_rodents
is nowprep_rodents_list
rodents_data
is nowprep_rodents
update_rodents
is nowupdate_rodents_list
read_data
has been split out intoread_all
,read_controls
,read_covariates
,read_moons
, andread_metadata
model_path
is nowmodel_paths
sub_path
andsub_paths
have been merged intosub_paths
, which returns all ifspecific_subs
is NULLlag_data
is nowlag_covariates
- In multiple functions
data
has been replaced withrodents
to be specific. CI_level
is now subsumed byconfidence_level
name
is now subsumed bymodel
set
is not split intospecies_set
andmodel_set
- The order of arguments in
model_names
is now back tomodel_set
,add
. - The default
subs_type
forsubdirs
is now"portalcasting"
. - The four model functions have a reduced set of inputs to leverage the directory tree, and the script generation is updated to match.
- Updating the
cast
argument tocast_to_check
incast_is_valid
and removing theverbose
argument fromverify_cast
to allowcheck_arg
to leveragecheck_arg
forverify_cast
.
- The
models
class has been removed. - The
subdirs
class has been removed.
messageq
function is added to tidy code around messages being printed based on thequiet
arguments.
- Produces the
prefab
list with an"Ensemble"
entry added, to allow for that simply without using theNULL
options, which collects all model names. - This facilitated addition of
models
as an argument in the evaluations plots.
2019-03-12
plot_cast_ts
did not cleanly plot time series where observations had been made after the start of the prediction window.- The function has been set up to now split observations that occurred during the prediction window out, execute the plot as if they didn't exist, then add them on top.
- Functionality has now been added to allow the toggling on and off of
those points via the
add_obs
input (defaults toTRUE
).
2019-03-04
plot_cast
is nowplot_cast_ts
and is now fully vetted and testedplotcastts_ylab
andplotcastts_xaxis
provide tidied functions for producing the y label and x axis (respectively) forplot_cast_ts
.plot_cast_point
is now added to replaceplot_species_forecast
.plotcastpoint_yaxis
provides tidied functionality for the y axis ofplot_cast_point
.select_most_ab_spp
allows for a simple selection of the most abundant species from a -cast.plot_err_lead_spp_mods
andplot_cov_RMSE_mod_spp
now added to replace the raw code in the evaluation page.
read_casts
(old) is nowread_cast
and specifically works for only one -cast.read_casts
(new) reads in multiple -casts.select_cast
is nowselect_casts
and allows a more flexible selection by default.make_ensemble
now returns a set of predictions with non-NA
bounds when only one model is included (it returns that model as the ensemble).most_recent_cast
returns the date of the most recent -cast. Can be dependent on the presence of a census.verify_cast
andcast_is_valid
replaceforecast_is_valid
from the repo codebase.verify_cast
is a logical wrapper oncast_is_valid
that facilitates a pipeline integration.cast_is_valid
does the major set of checks of the cast data frame.append_observed_to_cast
is provided to add the observed data to the forecasts and add columns for the raw error, in-forecast-window, and lead time as well.measure_cast_error
allows for summarization of errors at the -cast level.
most_recent_census
returns the date of the most recent census.
- Argument order in
models
is reversed (add
thenset
) and defaults in general are nowNULL
andNULL
, butset = "prefab"
within the options functions, to make it easy to run a novel model set. - Argument order in
subdirs
is reversed (subs
thentype
) and defaults in general are nowNULL
andNULL
, buttype = "portalcasting"
within options functions anddirtree
to make it easier to manage a single subdirectory. fdate
argument has been replaced throughout withcast_date
for generality.
na_conformer
provides tidy functionality for converting non-characterNA
entries (can get read in from the data due to the"NA"
species) to"NA"
. Works for both vectors and data frames.
2019-02-12
plot_cast
is developed but not yet fully vetted and tested, nor integrated in the main repository. It will replaceforecast_viz
as a main plotting function.
read_data
's options have been expanded to include"moons"
.- Not fully implemented everywhere, but now available.
interpolate_data
was usingrodent_spp
in a way that assumed the"NA"
species was coded as"NA."
, which it wasn't.- Expansion of
rodent_spp
to include annadot
logical argument, with default value ofFALSE
.
2019-02-12
read_data
was reading the All rodents file for Controls as well, which caused the forecasts for the Controls to be duplicated of the All forecasts.- Simple correction here.
2019-02-04
- All of the code is now tested via
testthat
. - Test coverage is tracked via Codecov.
- The only functionality not covered in testing on Codecov is associated with
download_predictions()
, which intermittently hangs on Travis. Testing is available, but requires manual toggling of thetest_location
value to"local"
in the relevant test scripts (02-directory and 12-prepare_predictions).
- Most of the functions previously did not have any checks on input argument classes, sizes, etc.
- Now all functions specifically check each argument's value for validity and throw specific errors.
- All of the functions have fleshed out documentation that specify argument requirements, link to each other and externally, and include more information.
- To smooth checking of different data structures, we now define data
objects with classes in addition to their existing (
data.frame
orlist
) definitions. rodents
,rodents_list
,covariates
,metadata
,moons
- These classes do not presently have any specified methods or functions.
- To smooth checking of different list structures, we now define the options
list objects with classes in addition to their existing
list
definitions. all_options
,dir_options
,PortalData_options
,data_options
,moons_options
,rodents_options
,covariates_options
,metadata_options
,predictions_options
,models_options
, andcast_options
- Each of these classes is created by a function of that name.
- These classes do not presently have any specified methods or functions that operate on them.
classy()
allows for easy application of classes to objects in a%>%
pipelineread_data()
provides simple interface for loading and applying classes to model-ready data files.remove_incompletes()
removes any incomplete entries in a table, as defined by anNA
in a specific column.check_options_args()
provides a tidy way to check the input arguments (wrt class, length, numeric limitations, etc.) to the options functions.
- Three vignettes were added:
- current models vignette was brought from the forecasting website.
- codebase vignette was created from the earlier
README.md
file. - adding a model vignette was constructed based on two pages from the Portal Predictions repository wiki (1 and 2) and with substantial additional text added.
- Previous versions retained only one covariate forecast per newmoon.
- We now enable retention of multiple covariate forecasts per newmoon and tag the forecast date with a time stamp as well.
- Added a website driven by pkgdown.
- Developed this changelog as part of the package.
- Added code of conduct and contribution guidelines to the repository.
2019-01-13
- Setting default back to the Zenodo link via updated portalr function.
- Updated
fill_PortalData()
and newPortalData_options()
allow for control over download source.
true code edits 2018-12-14, version number updated 2019-01-02
- Code was brought over from the forecasting repository to be housed in its own package.
- Multiple updates to the codebase were included, but intentionally just "under the hood", meaning little or no change to the output and simplification of the input.
- A major motivation here was also to facilitate model development, which requires being able to set up a local version of the repository to play with in what we might consider a "sandbox". This will allow someone to develop and test new forecasting models in a space that isn't the forecasting repo itself (or a clone or a fork), but a truly novel location. At this point, the sandbox setup isn't fully robust from within this package, but rather requires some additional steps (to be documented).
- The previous implementation of the R codebase driving the forecasting (housed within the portalPredictions repo) was a mix of functions and loose code and hard-coded to the repo.
- The package implementation generalizes the functionality and organizes the code into a set of hierarchical functions that drive creation and use of the code within the repo or elsewhere.
- See the codebase vignette for further details.
- To facilitate portability of the package (a necessity for smooth sandboxing and the development of new models), we now include explicit, controllable definition of the forecasting directory tree.
- See the codebase vignette for further details.
- To facilitate simple control via defaults argument inputs and flexibility to changes to inputs throughout the code hierarchy, we include a set of functions that default options for all aspects of the codebase.
- See the codebase vignette for further details.
2018-11-06
- This is the last iteration of the code that now exists in portalcasting in its previous home within the portalPredictions repo.
- It was not referred to by the name portalcasting at the time.