CCockrum commited on
Commit
674637d
Β·
verified Β·
1 Parent(s): 27712af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -123,6 +123,17 @@ search_query = collections[selected]
123
  # Define the collection URL
124
  collection_url = f"https://www.loc.gov/search/?q={search_query}&fo=json"
125
 
 
 
 
 
 
 
 
 
 
 
 
126
  # Create an empty placeholder for Quick Stats
127
  stats_placeholder = st.sidebar.empty()
128
 
 
123
  # Define the collection URL
124
  collection_url = f"https://www.loc.gov/search/?q={search_query}&fo=json"
125
 
126
+ # πŸ“Š Field Completeness Breakdown (green-styled, placed above links)
127
+ st.sidebar.markdown("### πŸ“Š Field Completeness Breakdown", unsafe_allow_html=True)
128
+
129
+ try:
130
+ styled_table = completeness_table.style.background_gradient(cmap="Greens").format("{:.1f}%")
131
+ st.sidebar.dataframe(styled_table, use_container_width=True, height=200)
132
+ except Exception as e:
133
+ st.sidebar.warning("Could not style completeness table.")
134
+ st.sidebar.dataframe(completeness_table)
135
+
136
+
137
  # Create an empty placeholder for Quick Stats
138
  stats_placeholder = st.sidebar.empty()
139