rapids/rules/reports.smk

82 lines
3.9 KiB
Plaintext
Raw Permalink Normal View History

rule histogram_phone_data_yield:
input:
"data/processed/features/all_participants/all_sensor_features.csv"
2021-06-17 18:27:32 +02:00
params:
time_segments_type = config["TIME_SEGMENTS"]["TYPE"]
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:
pid = "{pid}",
time_segments_type = config["TIME_SEGMENTS"]["TYPE"]
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:
2021-06-25 19:14:07 +02:00
pid = "{pid}",
sensor_names = config["HEATMAP_SENSOR_ROW_COUNT_PER_TIME_SEGMENT"]["SENSORS"],
time_segments_type = config["TIME_SEGMENTS"]["TYPE"]
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:
2021-06-05 04:58:27 +02:00
participant_files = expand("data/external/participant_files/{pid}.yaml", pid=config["PIDS"]),
time_segments_file = config["TIME_SEGMENTS"]["FILE"],
phone_data_yield = "data/processed/features/all_participants/all_sensor_features.csv",
params:
2021-06-05 04:58:27 +02:00
pids = config["PIDS"],
time = config["HEATMAP_PHONE_DATA_YIELD_PER_PARTICIPANT_PER_TIME_SEGMENT"]["TIME"],
time_segments_type = config["TIME_SEGMENTS"]["TYPE"]
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:
2021-06-16 23:10:08 +02:00
time_segments_type = config["TIME_SEGMENTS"]["TYPE"],
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"