Refactor resample fused location to filter fused rows earlier
parent
cb2ee1ec82
commit
3947f1ec29
|
@ -10,7 +10,7 @@ timezone <- snakemake@params[["timezone"]]
|
|||
consecutive_threshold <- snakemake@params[["consecutive_threshold"]]
|
||||
time_since_valid_location <- snakemake@params[["time_since_valid_location"]]
|
||||
|
||||
locations <- read_csv(snakemake@input[["locations"]], col_types = cols())
|
||||
locations <- read_csv(snakemake@input[["locations"]], col_types = cols()) %>% filter(provider == "fused")
|
||||
phone_sensed_bins <- read_csv(snakemake@input[["phone_sensed_bins"]], col_types = cols(local_date = col_character()))
|
||||
|
||||
if(nrow(locations) > 0){
|
||||
|
@ -23,7 +23,6 @@ if(nrow(locations) > 0){
|
|||
select(timestamp)
|
||||
|
||||
resampled_locations <- locations %>%
|
||||
filter(provider == "fused") %>%
|
||||
bind_rows(sensed_minute_bins) %>%
|
||||
arrange(timestamp) %>%
|
||||
# We group and therefore, fill in, missing rows that appear after a valid fused location record and exist
|
||||
|
|
Loading…
Reference in New Issue