Releases: weecology/portalcasting
Releases · weecology/portalcasting
hookup to zenodo
identical to v0.8.0 release
just created to trigger the integration with zenodo
v0.8.0
plot_cov_RMSE_mod_spp
now only plots the most recent -cast by default
- If
cast_dates = NULL
(the default), the plot only uses the most recent -cast
to avoid swamping more current -casts with historic -casts.
Added specific checks for no casts returned in plot functions
- 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 incheck_arg
), so now there are checks to see if
the tables returned fromselect_casts
have any rows or not.
Handling the edge cases in model function testing
- 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.
v0.7.0
Addressing nbGARCH
and nbsGARCH
when even the Poisson fallback fails
- 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
).
v0.6.0
Addressing covariate forecasts in pevGARCH
under hindcasting
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
and
covariate_date_made
).
v0.5.0
Adding nbsGARCH
- Model
nbsGARCH
has been added to the base set of models.
foy
function
foy()
calculates the fraction of the year for a given date or set
of dates.
v0.4.1
Move to usage of CRAN portalr
- To aid with stability, we're now using the CRAN release of portalr
model_scripts
function
- Provides a simple way to list the scripts in the
models
subdirectory.
Including the package version message in setup_dir
and portalcast
- Including a simple message to report the version of portalcasting
loaded in top level functions.
Vignette updates
- Adding plot (from pre-constructed images) to the how-to vignette.
Patching a bug in model_template
- 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
.
v0.4.0
Tidied functionality for checking function arguments
- Introduction of
check_args
andcheck_arg
which collaborate to
check the validity of function arguments using a standardized set
of requirments based on the argument names, thereby helping to unify
and standardize the use of the codebase's arguments. - This is a much more robust and generalized function than
check_options_args()
was.
Updated function names
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
Updated argument (names to leverage check_args
, etc.)
- 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
.
Removal of classes
- The
models
class has been removed. - The
subdirs
class has been removed.
messageq
function
messageq
function is added to tidy code around messages being printed
based on thequiet
arguments.
Inclusion of "wEnsemble"
as an option in model_names
- 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.
v0.3.0
Completed migration of plotting code
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 of
plot_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.
Processing of forecasts
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.
Processing of data
most_recent_census
returns the date of the most recent census.
Minor changes
- 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.
Utilities
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.