rapids/rules/reports.smk

74 lines
3.6 KiB
Plaintext
Raw Normal View History

rule histogram_phone_data_yield:
input:
"data/processed/features/all_participants/all_sensor_features.csv"
output:
"reports/data_exploration/histogram_phone_data_yield.html"
script:
"../src/visualization/histogram_phone_data_yield.py"
2020-12-04 03:00:32 +01:00
rule heatmap_sensors_per_minute_per_time_segment:
2019-10-25 17:12:55 +02:00
input:
2020-12-04 03:00:32 +01:00
phone_data_yield = "data/interim/{pid}/phone_yielded_timestamps_with_datetime.csv",
participant_file = "data/external/participant_files/{pid}.yaml",
time_segments_labels = "data/interim/time_segments/{pid}_time_segments_labels.csv"
2020-07-22 22:47:32 +02:00
params:
2020-12-04 03:00:32 +01:00
pid = "{pid}"
2020-07-22 22:47:32 +02:00
output:
2020-12-04 03:00:32 +01:00
"reports/interim/{pid}/heatmap_sensors_per_minute_per_time_segment.html"
2020-07-22 22:47:32 +02:00
script:
2020-12-04 03:00:32 +01:00
"../src/visualization/heatmap_sensors_per_minute_per_time_segment.py"
2020-07-22 22:47:32 +02:00
2020-12-04 03:00:32 +01:00
rule merge_heatmap_sensors_per_minute_per_time_segment:
2020-07-22 22:47:32 +02:00
input:
2020-12-04 03:00:32 +01:00
heatmap_sensors_per_minute_per_time_segment = expand("reports/interim/{pid}/heatmap_sensors_per_minute_per_time_segment.html", pid=config["PIDS"])
2020-07-22 22:47:32 +02:00
output:
2020-12-04 03:00:32 +01:00
"reports/data_exploration/heatmap_sensors_per_minute_per_time_segment.html"
2020-07-22 22:47:32 +02:00
script:
2020-12-04 03:00:32 +01:00
"../src/visualization/merge_heatmap_sensors_per_minute_per_time_segment.Rmd"
2020-07-22 22:47:32 +02:00
2020-12-04 03:00:32 +01:00
rule heatmap_sensor_row_count_per_time_segment:
2020-07-22 22:47:32 +02:00
input:
2020-12-04 03:00:32 +01:00
all_sensors = expand("data/raw/{{pid}}/{sensor}_with_datetime.csv", sensor = map(str.lower, config["HEATMAP_SENSOR_ROW_COUNT_PER_TIME_SEGMENT"]["SENSORS"])),
phone_data_yield = "data/processed/features/{pid}/phone_data_yield.csv",
participant_file = "data/external/participant_files/{pid}.yaml",
time_segments_labels = "data/interim/time_segments/{pid}_time_segments_labels.csv"
params:
pid = "{pid}"
2019-10-25 17:12:55 +02:00
output:
2020-12-04 03:00:32 +01:00
"reports/interim/{pid}/heatmap_sensor_row_count_per_time_segment.html"
2019-10-25 17:12:55 +02:00
script:
2020-12-04 03:00:32 +01:00
"../src/visualization/heatmap_sensor_row_count_per_time_segment.py"
2020-12-04 03:00:32 +01:00
rule merge_heatmap_sensor_row_count_per_time_segment:
input:
2020-12-04 03:00:32 +01:00
heatmap_sensor_row_count_per_time_segment = expand("reports/interim/{pid}/heatmap_sensor_row_count_per_time_segment.html", pid=config["PIDS"])
output:
2020-12-04 03:00:32 +01:00
"reports/data_exploration/heatmap_sensor_row_count_per_time_segment.html"
script:
2020-12-04 03:00:32 +01:00
"../src/visualization/merge_heatmap_sensor_row_count_per_time_segment.Rmd"
2020-07-22 22:47:32 +02:00
2020-12-04 03:00:32 +01:00
rule heatmap_phone_data_yield_per_participant_per_time_segment:
2020-07-22 22:47:32 +02:00
input:
2020-12-04 03:00:32 +01:00
phone_data_yield = expand("data/processed/features/{pid}/phone_data_yield.csv", pid=config["PIDS"]),
participant_file = expand("data/external/participant_files/{pid}.yaml", pid=config["PIDS"]),
time_segments_labels = expand("data/interim/time_segments/{pid}_time_segments_labels.csv", pid=config["PIDS"])
params:
time = config["HEATMAP_PHONE_DATA_YIELD_PER_PARTICIPANT_PER_TIME_SEGMENT"]["TIME"]
2020-07-22 22:47:32 +02:00
output:
2020-12-04 03:00:32 +01:00
"reports/data_exploration/heatmap_phone_data_yield_per_participant_per_time_segment.html"
2020-07-22 22:47:32 +02:00
script:
2020-12-04 03:00:32 +01:00
"../src/visualization/heatmap_phone_data_yield_per_participant_per_time_segment.py"
2020-12-04 03:00:32 +01:00
rule heatmap_feature_correlation_matrix:
input:
2020-12-04 03:00:32 +01:00
all_sensor_features = "data/processed/features/all_participants/all_sensor_features.csv" # before data cleaning
params:
2020-12-04 03:00:32 +01:00
min_rows_ratio = config["HEATMAP_FEATURE_CORRELATION_MATRIX"]["MIN_ROWS_RATIO"],
corr_threshold = config["HEATMAP_FEATURE_CORRELATION_MATRIX"]["CORR_THRESHOLD"],
corr_method = config["HEATMAP_FEATURE_CORRELATION_MATRIX"]["CORR_METHOD"]
output:
2020-12-04 03:00:32 +01:00
"reports/data_exploration/heatmap_feature_correlation_matrix.html"
script:
2020-12-04 03:00:32 +01:00
"../src/visualization/heatmap_feature_correlation_matrix.py"