Software
Thanks to rigorous data standards, our software works on any hub.
Full list of hubverse software
The hubverse has a wide range of software packages designed to help you administer hubs, validate and evaluate model outputs, access hub data, ensemble and visualize models.
Hub Access
hubUtils hubData Accessing data from a hub
You can connect to any hub with the hubUtils and hubData R packages and be assured that all the data within the hub are validated against the hub data standards.
- connect to hub data with
hubData::connect_hub()
- connect to a hub on S3 with
hubData::s3_bucket()
- transform your existing data with
hubUtils::as_model_out_tbl()
The hubUtils R package provides utilities that give you useful information about a hub:
- fetch a hub configuration file with
hubUtils::read_config()
- get the submission timezone with
hubUtils::get_hub_timezone()
- find out what the submission rounds are with
hubUtils::get_round_ids()
- task ID names with
hubUtils::get_task_id_names()
Do more
You should contact the hubverse administrator before submitting your model to a hub. They will ask you to provide metadata for your model.
Useful tools are available in the hubValidations R package.
- Create a submission template with
hubValidations::submission_tmpl()
- Validate your submission with
hubValidaitons::validate_submission()
Model metadata Writing model output to a hub Validate model submission
A modelling hub hosted on GitHub will grow in size over time and it often can take up several hundreds of megabytes or several gigabytes of space. To reduce the size of a hub on your local machine, you can use git sparse checkout. Here’s an example using the FluSight Forecast Hub, but only checking out the model outputs for the FluSight-baseline
model:
git init FluSight-Forecast-Hub
cd FluSight-Forecast-Hub
git remote add origin https://github.com/cdcepi/FluSight-Forecast-Hub.git
git sparse-checkout set --no-cone '/*' 'model-output/FluSight-baseline*' '!/model-output'
git pull origin main
Now when you run git status
, you will see that you only have a fraction of the files on your local machine:
git status
# On branch main
# You are in a sparse checkout with 14% of tracked files present.
#
# nothing to commit, working tree clean
You can use the hubEnsembles, hubEvals, and hubVis R packages to do any of the following:
- create a simple ensemble with
hubEnsembles::simple_ensemble()
- create a linear pool ensemble with
hubEnsembles::linear_pool()
- evaluate model performance with
hubEvals::score_model_out()
- visualize model projections with
hubVis::plot_step_ahead_model()
Creating a hub
quickstart Setting up a hub Defining model tasks
To create a hub, you can start with the hubTemplate.
- Click the “Use this template” in the top right corner of the page and choose a name for your hub.
- Modify the
hub-config/admin.json
file with general information about the hub - Modify the
hub-config/tasks.json
file with information about the model tasks - Update the
README.md
with general hub data access information - Update the
model-outputs/README.md
with instructions for modelers
Setting up a dashboard
To set up a dashboard, follow the instructions in the hub dashboard template.
hubUtils hubDevs Developer Guide
If you want to help contribute code to the hubverse, it is important to consult the developer guide.
Contributing to existing software
To contribute to exisiting software packages, be sure to read the contribution guide for the package you want to contribute to. You can find this guide in the CONTRIBUTING.html
page of any R package website. Most of these are identical, but there are caveats, For example the hubUtils contributing guide has a section on synchronizing with the schemas and the hubValidations contributing guide has a section on submitting new check functions.
Creating new packages
The hubDevs
package provides tools to help you get started creating a hubverse package.
Note that nearly all hubverse R packages depend on the hubUtils
package in some way.
- create a new package with
hubDevs::create_hubdev_pkg()
- set up a COC and contribution guide with
hubDevs::use_hubdev_community()
- set up a documentation site with
hubDevs::use_hubdev_pkgdown()
- set up a github repository with
hubDevs::use_hubdev_github()