2019-10-25 17:12:55 +02:00
|
|
|
rule heatmap_rows:
|
|
|
|
input:
|
2020-02-20 16:16:03 +01:00
|
|
|
sensor = "data/raw/{pid}/{sensor}_with_datetime.csv",
|
|
|
|
pid_file = "data/external/{pid}"
|
2019-10-25 17:12:55 +02:00
|
|
|
params:
|
|
|
|
table = "{sensor}",
|
2020-02-07 17:14:19 +01:00
|
|
|
pid = "{pid}",
|
|
|
|
bin_size = config["PHONE_VALID_SENSED_DAYS"]["BIN_SIZE"]
|
2019-10-25 17:12:55 +02:00
|
|
|
output:
|
|
|
|
"reports/figures/{pid}/{sensor}_heatmap_rows.html"
|
|
|
|
script:
|
2019-11-01 19:26:51 +01:00
|
|
|
"../src/visualization/heatmap_rows.py"
|
|
|
|
|
|
|
|
rule compliance_heatmap:
|
|
|
|
input:
|
2020-02-20 16:16:03 +01:00
|
|
|
sensor = "data/interim/{pid}/phone_sensed_bins.csv",
|
|
|
|
pid_file = "data/external/{pid}"
|
2019-11-01 19:26:51 +01:00
|
|
|
params:
|
2019-12-05 17:07:40 +01:00
|
|
|
pid = "{pid}",
|
|
|
|
bin_size = config["PHONE_VALID_SENSED_DAYS"]["BIN_SIZE"]
|
2019-11-01 19:26:51 +01:00
|
|
|
output:
|
|
|
|
"reports/figures/{pid}/compliance_heatmap.html"
|
|
|
|
script:
|
|
|
|
"../src/visualization/compliance_heatmap.py"
|
2019-11-08 18:18:21 +01:00
|
|
|
|
2020-02-25 19:27:17 +01:00
|
|
|
rule overall_compliance_heatmap:
|
|
|
|
input:
|
|
|
|
phone_sensed_bins = expand("data/interim/{pid}/phone_sensed_bins.csv", pid=config["PIDS"]),
|
|
|
|
phone_valid_sensed_days = expand("data/interim/{pid}/phone_valid_sensed_days.csv", pid=config["PIDS"]),
|
|
|
|
pid_files = expand("data/external/{pid}", pid=config["PIDS"])
|
|
|
|
params:
|
|
|
|
local_timezone = config["READABLE_DATETIME"]["FIXED_TIMEZONE"],
|
|
|
|
bin_size = config["PHONE_VALID_SENSED_DAYS"]["BIN_SIZE"],
|
|
|
|
min_bins_per_hour = config["PHONE_VALID_SENSED_DAYS"]["MIN_BINS_PER_HOUR"]
|
|
|
|
output:
|
|
|
|
"reports/figures/overall_compliance_heatmap.html"
|
|
|
|
script:
|
|
|
|
"../src/visualization/overall_compliance_heatmap.py"
|
|
|
|
|
2019-11-08 18:18:21 +01:00
|
|
|
rule battery_consumption_rates_barchart:
|
|
|
|
input:
|
2020-02-20 16:16:03 +01:00
|
|
|
sensor = "data/processed/{pid}/battery_daily.csv",
|
|
|
|
pid_file = "data/external/{pid}"
|
2019-11-08 18:18:21 +01:00
|
|
|
params:
|
|
|
|
pid = "{pid}"
|
|
|
|
output:
|
|
|
|
"reports/figures/{pid}/battery_consumption_rates_barchart.html"
|
|
|
|
script:
|
|
|
|
"../src/visualization/battery_consumption_rates_barchart.py"
|
2019-12-18 21:23:42 +01:00
|
|
|
|
2020-06-23 17:33:34 +02:00
|
|
|
PHONE_SENSORS = []
|
|
|
|
PHONE_SENSORS.extend([config["MESSAGES"]["DB_TABLE"], config["CALLS"]["DB_TABLE"], config["BARNETT_LOCATION"]["DB_TABLE"], config["BLUETOOTH"]["DB_TABLE"], config["BATTERY"]["DB_TABLE"], config["SCREEN"]["DB_TABLE"], config["LIGHT"]["DB_TABLE"], config["ACCELEROMETER"]["DB_TABLE"], config["APPLICATIONS_FOREGROUND"]["DB_TABLE"],config["WIFI"]["DB_TABLE"]])
|
|
|
|
|
2019-12-18 21:23:42 +01:00
|
|
|
rule compliance_report:
|
|
|
|
input:
|
2020-06-23 17:33:34 +02:00
|
|
|
sensor_heatmaps = expand("reports/figures/{{pid}}/{sensor}_heatmap_rows.html", sensor=PHONE_SENSORS),
|
2019-12-18 21:23:42 +01:00
|
|
|
compliance_heatmap = rules.compliance_heatmap.output
|
|
|
|
output:
|
|
|
|
"reports/compliance/{pid}/compliance_report.html",
|
|
|
|
script:
|
|
|
|
"../src/visualization/compliance_report.Rmd"
|