Skip to content

Commit

Permalink
[USGS-R#57] download metabolism estimates
Browse files Browse the repository at this point in the history
  • Loading branch information
jsadler2 committed Mar 14, 2022
1 parent a83ba2a commit 3c9c6bf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions 1_fetch.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,27 @@ p1_targets_list <- list(
tar_target(
p1_ntw_adj_matrix,
read_csv(p1_ntw_adj_matrix_csv,show_col_types = FALSE)
),

# Download and unzip metabolism estimates
tar_target(
p1_metab_tsv,
{
metab_file <- download_sb_file(sb_id = "59eb9c0ae4b0026a55ffe389",
file_name = "daily_predictions.zip",
out_dir="1_fetch/out")
unzip(zipfile=metab_file, exdir = dirname(metab_file), overwrite=TRUE)
file.path(dirname(metab_file), "daily_predictions.tsv")
},
format="file"
),

# Download and unzip metabolism estimates
tar_target(
p1_metab,
{
read_tsv(p1_metab_tsv, show_col_types = FALSE)
}
)


Expand Down

0 comments on commit 3c9c6bf

Please sign in to comment.