ccm commited on
Commit
9be362b
1 Parent(s): 8856719

Plotting results

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -168,14 +168,19 @@ def make_results():
168
  values=refs.gender_results.values(),
169
  hole=0.5,
170
  )
171
- plt3 = plotly.express.pie(
172
- names=list(refs.gender_results.keys()),
173
- values=refs.gender_results.values(),
174
- hole=0.5,
175
- )
176
  plt1.update_layout(legend=dict(orientation="h"))
177
  plt2.update_layout(legend=dict(orientation="h"))
178
- plt3.update_layout(legend=dict(orientation="h"))
 
 
 
 
 
 
 
 
 
 
179
 
180
  streamlit.plotly_chart(plt1, use_container_width=True)
181
  streamlit.plotly_chart(plt2, use_container_width=True)
 
168
  values=refs.gender_results.values(),
169
  hole=0.5,
170
  )
 
 
 
 
 
171
  plt1.update_layout(legend=dict(orientation="h"))
172
  plt2.update_layout(legend=dict(orientation="h"))
173
+
174
+
175
+ streamlit.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
+ streamlit.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
  streamlit.plotly_chart(plt1, use_container_width=True)
186
  streamlit.plotly_chart(plt2, use_container_width=True)