From 5302acdd5415a7986df8199085fa754878264e5c Mon Sep 17 00:00:00 2001 From: addelany Date: Mon, 13 Nov 2023 11:14:55 -0600 Subject: [PATCH] add model code to model json --- R/build_model.R | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/R/build_model.R b/R/build_model.R index 938a32d..1dae850 100644 --- a/R/build_model.R +++ b/R/build_model.R @@ -35,7 +35,8 @@ build_model <- function(model_id, thumbnail_image_name, table_schema, table_description, - full_var_df) { + full_var_df, + code_web_link) { preset_keywords <- list("Forecasting", config$project_id) @@ -117,7 +118,13 @@ build_model <- function(model_id, "href" = paste0(model_id,'.json'), "type"= "application/json", "title"= "Model Forecast" - )), + ), + list( + "rel"= "item", + "href" = code_web_link, + "type"= "text/html", + "title"= "Link for Model Code" + )), "assets"= stac4cast::generate_model_assets(full_var_df, aws_download_path)#, #pull_images(theme_id,model_id,thumbnail_image_name) )