|
| 1 | +import time |
| 2 | +start = time.time() |
1 | 3 | import streamlit as st
|
2 |
| -import settings |
3 |
| -from rich import print as rprint |
4 |
| -from millify import prettify |
5 |
| -import ui_components as uic |
| 4 | +from settings import initialize |
| 5 | +from ui_components import create_funnels |
6 | 6 | import ui_widgets as ui
|
7 | 7 | import users
|
8 |
| -import metrics |
9 |
| -from settings import get_logger |
| 8 | +from metrics import get_user_cohort_list |
10 | 9 |
|
11 |
| -settings.initialize() |
| 10 | +st.write("Imports done", time.time() - start) |
| 11 | +initialize() |
12 | 12 |
|
13 | 13 | ui.display_definitions_table("Data Notes",ui.data_notes)
|
14 | 14 | countries_list = users.get_country_list()
|
15 | 15 |
|
16 | 16 | ui.colorize_multiselect_options()
|
17 | 17 |
|
18 |
| -logger = settings.get_logger() |
19 |
| - |
20 | 18 | # --- Filter Row ---
|
21 | 19 | col_date, col_lang, col_country = st.columns((1, 1, 1), gap="large")
|
22 | 20 |
|
|
56 | 54 | if len(daterange) == 2 and countries_list:
|
57 | 55 |
|
58 | 56 | # --- Get user cohorts ---
|
59 |
| - user_cohort_list_unity = metrics.get_user_cohort_list( |
| 57 | + user_cohort_list_unity = get_user_cohort_list( |
60 | 58 | daterange=daterange,
|
61 | 59 | languages=language,
|
62 | 60 | countries_list=countries_list,
|
63 | 61 | app="Unity"
|
64 | 62 | )
|
65 |
| - user_cohort_list_cr = metrics.get_user_cohort_list( |
| 63 | + user_cohort_list_cr = get_user_cohort_list( |
66 | 64 | daterange=daterange,
|
67 | 65 | languages=language,
|
68 | 66 | countries_list=countries_list,
|
|
73 | 71 |
|
74 | 72 | # --- Funnel Charts ---
|
75 | 73 | with col1:
|
76 |
| - uic.create_funnels( |
| 74 | + create_funnels( |
77 | 75 | countries_list=countries_list,
|
78 | 76 | daterange=daterange,
|
79 | 77 | app="Unity",
|
|
83 | 81 | )
|
84 | 82 |
|
85 | 83 | with col2:
|
86 |
| - uic.create_funnels( |
| 84 | + create_funnels( |
87 | 85 | countries_list=countries_list,
|
88 | 86 | daterange=daterange,
|
89 | 87 | app="CR",
|
|
0 commit comments