GenAICoder commited on
Commit
7983139
·
verified ·
1 Parent(s): cbfd6d7

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -0
app.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
+
3
+ import pandas as pd
4
+
5
+ from analytics.monitoring_analysis import (
6
+ generate_monitoring_table
7
+ )
8
+
9
+ from metrics.mix_metrics import (
10
+ calculate_count_mix,
11
+ calculate_limit_mix
12
+ )
13
+
14
+
15
+ acq = pd.read_csv("data/acquisition.csv")
16
+
17
+ perf = pd.read_csv("data/performance.csv")
18
+
19
+
20
+ # Example 1
21
+ channel_mix = calculate_count_mix(
22
+ acq,
23
+ group_col="sourcing_channel"
24
+ )
25
+
26
+ print(channel_mix)
27
+
28
+
29
+ # Example 2
30
+ limit_mix = calculate_limit_mix(
31
+ acq,
32
+ group_col="fico_band"
33
+ )
34
+
35
+ print(limit_mix)
36
+
37
+
38
+ # Example 3
39
+ monitoring_table = generate_monitoring_table(
40
+ perf
41
+ )
42
+
43
+ print(monitoring_table)