2020-08-28 23:50:49 +02:00
|
|
|
source("renv/activate.R")
|
|
|
|
source("src/features/utils/utils.R")
|
2020-10-23 16:41:00 +02:00
|
|
|
library("dplyr",warn.conflicts = F)
|
2020-08-28 23:50:49 +02:00
|
|
|
library("tidyr")
|
|
|
|
|
2020-10-08 00:11:06 +02:00
|
|
|
sensor_data_files <- snakemake@input
|
|
|
|
sensor_data_files$day_segments_labels <- NULL
|
|
|
|
day_segments_file <- snakemake@input[["day_segments_labels"]]
|
|
|
|
|
2020-08-28 23:50:49 +02:00
|
|
|
provider <- snakemake@params["provider"][["provider"]]
|
|
|
|
provider_key <- snakemake@params["provider_key"]
|
2020-10-08 00:11:06 +02:00
|
|
|
sensor_key <- snakemake@params["sensor_key"]
|
2020-08-28 23:50:49 +02:00
|
|
|
|
2020-10-08 00:11:06 +02:00
|
|
|
sensor_features <- fetch_provider_features(provider, provider_key, sensor_key, sensor_data_files, day_segments_file)
|
2020-08-28 23:50:49 +02:00
|
|
|
|
2020-10-08 00:11:06 +02:00
|
|
|
write.csv(sensor_features, snakemake@output[[1]], row.names = FALSE)
|