DavMelchi commited on
Commit
3f8b341
·
1 Parent(s): ec011bb

Add Parameters distributions App

Browse files
Files changed (5) hide show
  1. Changelog.md +1 -0
  2. README.md +3 -0
  3. app.py +6 -1
  4. apps/parameters_distribution.py +43 -0
  5. requirements.txt +0 -0
Changelog.md CHANGED
@@ -5,6 +5,7 @@
5
 
6
  - upgrade streamlit version to 1.44
7
  - Adding theme
 
8
 
9
  ## [0.2.7] - 2025-03-22
10
 
 
5
 
6
  - upgrade streamlit version to 1.44
7
  - Adding theme
8
+ - Adding parameters distributions App
9
 
10
  ## [0.2.7] - 2025-03-22
11
 
README.md CHANGED
@@ -45,6 +45,9 @@ You can access the hosted version of the app at [https://davmelchi-db-query.hf.s
45
  - [x] Check TCH from MAL sheet
46
  - [x] Add Analitic dashboards for each database (Count of NE)
47
  - [x] Add kml generation
 
48
  - [ ] Improve Dashboard
49
  - [ ] Add the ability to select columns
50
  - [ ] Error handling
 
 
 
45
  - [x] Check TCH from MAL sheet
46
  - [x] Add Analitic dashboards for each database (Count of NE)
47
  - [x] Add kml generation
48
+ - [x] Parameters Distribution App
49
  - [ ] Improve Dashboard
50
  - [ ] Add the ability to select columns
51
  - [ ] Error handling
52
+ - [ ] Symetric neighbours checkin
53
+ - [ ] frequency distribution GSM
app.py CHANGED
@@ -6,7 +6,7 @@ st.set_page_config(
6
  layout="wide",
7
  initial_sidebar_state="expanded",
8
  menu_items={
9
- "About": "**📡 NPO DB Query v0.2.7**",
10
  },
11
  )
12
 
@@ -14,6 +14,7 @@ st.set_page_config(
14
  pages = {
15
  "Apps": [
16
  st.Page("apps/database_page.py", title="🏡Generate Databases"),
 
17
  st.Page("apps/core_dump_page.py", title="📠Parse dump core"),
18
  st.Page("apps/gps_converter.py", title="🧭GPS Converter"),
19
  st.Page("apps/distance.py", title="🛰Distance Calculator"),
@@ -32,6 +33,10 @@ pages = {
32
  "apps/kpi_analysis/wbts_capacty.py",
33
  title=" 📊 WBTS Capacity BB and CE Analysis",
34
  ),
 
 
 
 
35
  ],
36
  "Documentations": [
37
  st.Page("documentations/database_doc.py", title="📚Databases Documentation"),
 
6
  layout="wide",
7
  initial_sidebar_state="expanded",
8
  menu_items={
9
+ "About": "**📡 NPO DB Query v0.2.8**",
10
  },
11
  )
12
 
 
14
  pages = {
15
  "Apps": [
16
  st.Page("apps/database_page.py", title="🏡Generate Databases"),
17
+ st.Page("apps/parameters_distribution.py", title="📊Parameters distribution"),
18
  st.Page("apps/core_dump_page.py", title="📠Parse dump core"),
19
  st.Page("apps/gps_converter.py", title="🧭GPS Converter"),
20
  st.Page("apps/distance.py", title="🛰Distance Calculator"),
 
33
  "apps/kpi_analysis/wbts_capacty.py",
34
  title=" 📊 WBTS Capacity BB and CE Analysis",
35
  ),
36
+ st.Page(
37
+ "apps/kpi_analysis/gsm_capacity.py",
38
+ title=" 📊 GSM Capacity Analysis",
39
+ ),
40
  ],
41
  "Documentations": [
42
  st.Page("documentations/database_doc.py", title="📚Databases Documentation"),
apps/parameters_distribution.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import streamlit as st
3
+ from pyxlsb import open_workbook
4
+
5
+ st.title("📊 Parameters distribution Analyzer")
6
+
7
+ uploaded_file = st.file_uploader("Upload an .xlsb Dump file", type="xlsb")
8
+
9
+ if uploaded_file:
10
+ # Get sheet names
11
+ with open_workbook(uploaded_file) as wb:
12
+ sheet_names = wb.sheets
13
+
14
+ # Dropdown for Object Class (sheet)
15
+ object_class = st.selectbox("Select Object Class (Sheet)", sheet_names)
16
+
17
+ if object_class:
18
+ # Read the selected sheet, skip first row
19
+ df: pd.DataFrame = pd.read_excel(
20
+ uploaded_file, sheet_name=object_class, skiprows=[0], engine="calamine"
21
+ )
22
+
23
+ if df.empty:
24
+ st.warning("The selected sheet is empty or couldn't be read.")
25
+ else:
26
+
27
+ parameters = st.multiselect("Select Parameter(s)", df.columns)
28
+
29
+ if parameters:
30
+ for param in parameters:
31
+ st.markdown(f"---\n### 🔹 {param}")
32
+ col1, col2 = st.columns(2)
33
+
34
+ # Distribution table
35
+ with col1:
36
+ dist = df[param].value_counts(dropna=False).reset_index()
37
+ dist.columns = [param, "Count"]
38
+ st.dataframe(dist, use_container_width=True)
39
+
40
+ # Bar chart
41
+ with col2:
42
+ chart_data = dist.set_index(param)
43
+ st.bar_chart(chart_data, use_container_width=True)
requirements.txt CHANGED
Binary files a/requirements.txt and b/requirements.txt differ