Skip to content

Commit

Permalink
Update API WB VBA to point to new endpoints
Browse files Browse the repository at this point in the history
See ccao-data/api-res-avm#2 for actual API
refactor. Workbooks now select their run ID/target endpoint from cell
B1.
  • Loading branch information
dfsnow committed May 14, 2024
1 parent 571157b commit 7b36c7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Binary file modified misc/model_api_template.xlsm
Binary file not shown.
6 changes: 4 additions & 2 deletions pipeline/08-api.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ for (town in towns) {

# Load workbook and styles
wb <- loadWorkbook(here("misc", "model_api_template.xlsm"))
pin_sheet_header <- paste0("Run ID: ", run_id)
pin_sheet_header <- run_id
pin_row_range <- 6:(nrow(card_data_town) + 7)
style_price <- createStyle(numFmt = "$#,##0")
csht <- "Cards"
Expand Down Expand Up @@ -165,7 +165,9 @@ for (town in towns) {
"output", "api_workbook",
glue(
year,
str_replace(town_convert(town), " ", "_"),
town_get_triad(town, name = TRUE),
str_replace(town_convert(town), " ", "-"),
pin_sheet_header,
"API_Workbook.xlsm",
.sep = "_"
)
Expand Down

0 comments on commit 7b36c7b

Please sign in to comment.