-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (21 loc) · 725 Bytes
/
main.py
File metadata and controls
29 lines (21 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import pandas as pd
import argparse
import os
import matplotlib.pyplot as plt
from data_loader import load_data
from data_analyzer import validate_data
from data_analyzer import compute_metrics
from data_plot import plot
from data_report import save_outputs
from arg_parser import parse_arguments
def main():
args = parse_arguments()
df, individual_dfs = load_data(args.input)
validate_data(df)
df, avg_delP, max_delP, category_averages = compute_metrics(df)
save_outputs(df, category_averages, avg_delP, max_delP, args.output)
# Generate plots per dataset
for case_name, case_df in individual_dfs.items():
plot(case_df, case_name, args.output)
if __name__ == "__main__":
main()