Validate data and metadata for a given model/folder
validate_model(
model_name,
data_folder = "data-processed",
metadata_folder = "model-metadata",
data_schema = "schema-data.yml",
metadata_schema = "schema-metadata.yml"
)
Path to the folder containing the model data
The path to the folder containing forecasts
The path to the folder containing metadata
Path to the .yml
schema file
Path to the .yml
schema file
validate_model(
"example-model",
system.file("testdata", "data-processed",
package = "HubValidations"),
system.file("testdata", "model-metadata",
package = "HubValidations"),
system.file("testdata", "schema-data.yml",
package = "HubValidations"),
system.file("testdata", "schema-metadata.yml",
package = "HubValidations")
)
#> ✔ example-model: There is exactly one metadata file
#>
#> ✔ 2021-07-19-example-model.csv: Folder name is identical to model name in data file
#>
#> ✔ 2021-07-26-example-model.csv: Folder name is identical to model name in data file
#>
#> ✔ example-model.yml: Metadata file is using the `.yml` extension
#>
#> ✔ example-model.yml: Metadata filename is the same as `model_abbr`
#>
#> ✔ example-model.yml: Metadata file is consistent with schema specifications
#>
#> ✔ 2021-07-19-example-model.csv: Filename is formed of a date and a model name, separated by an hyphen
#>
#> ✔ 2021-07-19-example-model.csv: `forecast_date` column is identical to the date in filename
#>
#> ✔ 2021-07-19-example-model.csv: Data is formed of the expected columns with correct type
#>
#> ✔ 2021-07-26-example-model.csv: Filename is formed of a date and a model name, separated by an hyphen
#>
#> ✔ 2021-07-26-example-model.csv: `forecast_date` column is identical to the date in filename
#>
#> ✔ 2021-07-26-example-model.csv: Data is formed of the expected columns with correct type
#>