This repository is a template example for generating a forecast that is automated through GitHub actions.
- Click "Use This Template" to copy this example to your Github account.
- Modify forecast_model.Rto make your forecast model . Many of the components you need to generate the forecast, including downloading NOAA weather forecasts, downloading target data, generating forecast files, generating metadata, validating files, and submitting forecasts. Avoid running theneon4cast::submit()function at the end offorecast_model.Runtil you are ready to submit a forecast to the Challenge. It is important that you do NOT change the name of the file. GitHub Actions (below) is looking for this file name. Be sure to change yourteam_nameandteam_list
- Commit and push the changes to forecast_model.Rto Github.
Ready to submit a forecast?
- Uncomment the line with the function neon4cast::submit(forecast_file = forecast_file,metadata = metadata_file, ask = FALSE)
- Commit and push the changes to forecast_model.Rto Github.
- Under the actions tab, click on ".github/workflows/do_prediction.yml" on the left side.
- Click "Run workflow", then the green "Run workflow" button.
The forecast in this repository is designed to run daily at 20:00 UTC.  The execution of the forecast occurs on GitHub's servers, so your local computer does not need to be turned on.  In ".github/workflow/do_prediction.yml", the lines -cron: "* 20 * *" define the time that the forecast is run.  In this case it is run each day at 20:00:00 UTC (note all GitHub timings are on UTC).  You can update this to run on a different schedule based on timing codes found in https://crontab.guru
To start the automated forecast generation
- go to the "Actions" tab
- Find the ".githb/workflows/do_predic..." option and click on it
- Click on "Enable Workflow"
A video describing how to use GitHub actions for automated forecast generation can be found here: https://youtu.be/dMrUlXi4_Bo
You can run this repo as a "binder". The mybinder.org project will convert the repository into an interactive Rstudio sesson for you. To create a binder. Use the link below but replace "eco4cast/neon4cast-example.git" with your repository. This is the exact R configuration that GitHub will be using to run your forecast. The use of mybinder is primarily for testing.
https://mybinder.org/v2/gh/eco4cast/neon4cast-example.git/HEAD?urlpath=rstudio