Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ st.markdown("""
|
|
19 |
}
|
20 |
.block-container {
|
21 |
background-color: gray !important;
|
22 |
-
color: #
|
23 |
}
|
24 |
section[data-testid="stSidebar"] > div:first-child {
|
25 |
background-color: #808080 !important;
|
@@ -237,15 +237,15 @@ if fetch_data:
|
|
237 |
completeness_table = completeness.round(1).to_frame(name="Completeness (%)")
|
238 |
|
239 |
# Render stats summary in sidebar
|
240 |
-
stats_html = f"""
|
241 |
-
<div class="sidebar-stats">
|
242 |
-
<h3 style="color: lightgray;">Quick Stats</h3>
|
243 |
-
<p style="color:lightgray;">Total Records: <b>{len(metadata_df)}</b></p>
|
244 |
-
<p style="color:lightgray;">Incomplete Records: <b>{incomplete_count}</b></p>
|
245 |
-
<p style="color:lightgray;">Overall Metadata Completeness: <b>{overall_percent:.1f}%</b></p>
|
246 |
-
</div>
|
247 |
-
"""
|
248 |
stats_placeholder.markdown(stats_html, unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
|
250 |
|
251 |
# Utility functions for deeper metadata quality analysis
|
|
|
19 |
}
|
20 |
.block-container {
|
21 |
background-color: gray !important;
|
22 |
+
color: #1A1A1A!important;
|
23 |
}
|
24 |
section[data-testid="stSidebar"] > div:first-child {
|
25 |
background-color: #808080 !important;
|
|
|
237 |
completeness_table = completeness.round(1).to_frame(name="Completeness (%)")
|
238 |
|
239 |
# Render stats summary in sidebar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
stats_placeholder.markdown(stats_html, unsafe_allow_html=True)
|
241 |
+
|
242 |
+
# Render collapsible green completeness table in sidebar
|
243 |
+
with st.sidebar.expander("📊 Field Completeness Breakdown", expanded=True):
|
244 |
+
st.dataframe(
|
245 |
+
completeness_table.style.background_gradient(cmap="Greens").format("{:.1f}%"),
|
246 |
+
use_container_width=True,
|
247 |
+
height=240
|
248 |
+
)
|
249 |
|
250 |
|
251 |
# Utility functions for deeper metadata quality analysis
|