Closed jwildfire closed 2 years ago
for (snapshot_date in clindata::config_schedule$snapshot_date) {
print(snapshot_date)
out_path <- paste0(as.character(snapshot_date), '/')
if (!file.exists(out_path))
dir.create(out_path)
data <- snapshot_all(snapshot_date)
snapshot <- Make_Snapshot(lData = data) # assessment <- Study_Assess(data)
iwalk(snapshot, function(value, key) {
data.table::fwrite(
value,
paste0(out_path, key, '.csv')
)
})
#jsonlite::toJSON(snapshot, auto_unbox = TRUE, pretty = TRUE) %>%
# writeLines(paste0(out_path, 'gsm_snapshot.json')) # stack_attack(snapshot$assessment, data$snapshot_date)
}
Update snapshot workflow to create a single snapshot on a given date. Something like this will be used in conjuction with GSM: