Spaces:
Sleeping
Sleeping
Plotting results
Browse files
app.py
CHANGED
@@ -171,17 +171,28 @@ def make_results():
|
|
171 |
plt1.update_layout(legend=dict(orientation="h"))
|
172 |
plt2.update_layout(legend=dict(orientation="h"))
|
173 |
|
174 |
-
|
175 |
-
|
176 |
len(refs.raw_results[refs.raw_results['Most Likely Ethnicity'].str.contains('known')]) /
|
177 |
len(refs.raw_results)
|
178 |
)
|
179 |
|
180 |
-
|
181 |
len(refs.raw_results[refs.raw_results['Most Likely Gender'].str.contains('known|Hard')]) /
|
182 |
len(refs.raw_results)
|
183 |
)
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
streamlit.plotly_chart(plt1, use_container_width=True)
|
186 |
streamlit.plotly_chart(plt2, use_container_width=True)
|
187 |
|
|
|
171 |
plt1.update_layout(legend=dict(orientation="h"))
|
172 |
plt2.update_layout(legend=dict(orientation="h"))
|
173 |
|
174 |
+
col1, col2, col3, col4 = streamlit.columns(3)
|
175 |
+
col1.metric("Ethnicity Unknown",
|
176 |
len(refs.raw_results[refs.raw_results['Most Likely Ethnicity'].str.contains('known')]) /
|
177 |
len(refs.raw_results)
|
178 |
)
|
179 |
|
180 |
+
col2.metric("Gender Unknown",
|
181 |
len(refs.raw_results[refs.raw_results['Most Likely Gender'].str.contains('known|Hard')]) /
|
182 |
len(refs.raw_results)
|
183 |
)
|
184 |
|
185 |
+
col2.metric("At Least One Unknown",
|
186 |
+
len(refs.raw_results[refs.raw_results['Most Likely Gender'].str.contains('known|Hard') or refs.raw_results['Most Likely Ethnicity'].str.contains('known')]) /
|
187 |
+
len(refs.raw_results)
|
188 |
+
)
|
189 |
+
|
190 |
+
col2.metric("Both Unknown",
|
191 |
+
len(refs.raw_results[refs.raw_results['Most Likely Gender'].str.contains('known|Hard') and refs.raw_results['Most Likely Ethnicity'].str.contains('known')]) /
|
192 |
+
len(refs.raw_results)
|
193 |
+
)
|
194 |
+
|
195 |
+
|
196 |
streamlit.plotly_chart(plt1, use_container_width=True)
|
197 |
streamlit.plotly_chart(plt2, use_container_width=True)
|
198 |
|