Skip to content

Commit

Permalink
catch divide_ids for enriched data extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejohnson51 committed May 27, 2024
1 parent 65d745c commit 6d4cc81
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/get_subset.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@ get_subset = function(id = NULL,

net = open_dataset(net_hook) %>%
filter(vpuid == origin$vpuid) %>%
select(id, toid) %>%
select(any_of(c('id', 'toid', 'divide_id'))) %>%
distinct() %>%
collect()

subset = suppressWarnings({ get_sorted(net, outlets = origin$id) })

if(origin$topo == "fl-fl"){
all_ids = na.omit(unique(c(subset$id, subset$toid[-nrow(subset)])))
} else {
all_ids = na.omit(unique(c(subset$id, subset$toid)))
}
subset$toid[nrow(subset)] <- NA
}

all_ids = na.omit(unique(as.vector(as.matrix(subset))))

extract_data(hook = hook,
vpu = origin$vpuid,
Expand Down

0 comments on commit 6d4cc81

Please sign in to comment.