hexagon software logo, light grey blue background, basic lettering at the top says portalcasting, main image is a drawn all black rodent standing on two feet with a fishing rod in hand and a brown fishing hat on head, standing next to a tan and green tackle box.

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


The portalcasting package provides a model development, deployment, and evaluation system for forecasting how ecological systems change through time, with a focus on a widely used long-term study of mammal population and community dynamics, the Portal Project. It combines the Portal Data Repository and portalr data management package in a pipeline to automate weekly forecasting. Forecasts are archived on GitHub and Zenodo. The Portal Forecasting website provides a dynamic view of the results.

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. 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 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.


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.

Developer and Contributor notes

We welcome any contributions in form of models or pipeline changes.

For the workflow, please checkout the contribution and code of conduct pages.


This project is developed in active collaboration with DAPPER Stats.

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 Heather Bradley for logistical support, John Abatzoglou for assistance with climate forecasts, and James Brown for establishing the Portal Project.