Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Supporting automated forecasting of rodent populations

R-CMD-check-release Docker Codecov test coverage Lifecycle:maturing License DOI NSF-1929730


The portalcasting package contains the functions used for continuous analysis and forecasting of Portal rodent populations (code repository, output website, Zenodo archive).

portalcasting's functions are also portable, allowing users to set up a fully-functional replica repository on a local or remote machine. This facilitates development and testing of new models via a sandbox approach.

Status: Deployed, Active Development

The portalcasting package is deployed for use within the Portal Predictions repository, providing the underlying R code to populate the directory with up-to-date data, analyze the data, produce new forecasts, generate new output figures, and render a new version of the website. All of the code underlying the forecasting functionality has been migrated over from the predictions repository, which contains the code executed by the continuous integration. Having relocated the code here, the portalcasting package is the location for active development of the model set and additional functionality.

We leverage a software container to enable reproducibility of the predictions repository. Presently, we use a Docker image of the software environment to create a container for running the code. The image is automatically rebuilt when there is a new portalcasting release, tagged with both the latest and version-specific (vX.X.X) tags, and pushed to DockerHub.

Because the latest image is updated with releases, the current master branch code in portalcasting is not necessarily always being executed within the predictions repository. Rather, the most recent release is what is currently being executed. Presently, the latest image is built using portalcasting v0.18.3.

A development image (dev) is built from the master branch of portalcasting at every push to facilitate testing and should not be considered stable.

The API is moderately well defined at this point, but is still evolving.


You can install the R package from github:


Production environment

If you wish to spin up a local container from the latest portalcasting image (to ensure that you are using a copy of the current production environment for implementation of the portalcasting pipeline), you can run

sudo docker pull weecology/portalcasting

from a shell on a computer with Docker installed. A tutorial on using the image to spin up a container is forthcoming.


Get started with the "how to set up a Portal Predictions directory" vignette

If you are interested in adding a model to the preloaded set of models, see the "adding a model" vignette.


The motivating study—the Portal Project—has been funded nearly continuously since 1977 by the National Science Foundation, most recently by DEB-1622425 to S. K. M. Ernest. Much of the computational work was supported by the Gordon and Betty Moore Foundation’s Data-Driven Discovery Initiative through Grant GBMF4563 to E. P. White.

We thank Henry Senyondo for help with continuous integration, Heather Bradley for logistical support, John Abatzoglou for assistance with climate forecasts, and James Brown for establishing the Portal Project.

Author Contributions

All authors conceived the ideas, designed methodology, and developed the automated forecasting system. J. L. Simonis led the transition of code from the Portal Predictions repo to portalcasting. S. K. M. Ernest coded the NaiveArima model, H. Ye coded the simplexEDM model, and J. L. Simonis coded the jags_RW model.