Skip to content

Commit

Permalink
take it out again
Browse files Browse the repository at this point in the history
  • Loading branch information
linozen committed Aug 24, 2021
1 parent 23e1462 commit 6174f50
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions explorer/merged.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def render_pie_chart(
df,
values,
names,
labels=None,
color=None,
color_discrete_sequence=px.colors.qualitative.Prism,
color_discrete_map=None,
Expand All @@ -42,6 +43,7 @@ def render_pie_chart(
color,
color_discrete_sequence,
color_discrete_map,
labels,
)


Expand Down Expand Up @@ -970,19 +972,20 @@ def get_merged_ms_df():
)
)

st.write(
"### Who works more than 5 days on surveillance by intelligence agencies? `[hr2]`"
)
df["hr2_more_than_five"] = np.where(df[filter]["hr2"] > 5, True, False)
hr2_more_than_five_counts = df[filter]["hr2_more_than_five"].value_counts()
st.plotly_chart(
render_pie_chart(
hr2_more_than_five_counts,
values=hr2_more_than_five_counts,
names=hr2_more_than_five_counts.index,
color=hr2_more_than_five_counts.index,
)
)
# st.write(
# "### Who works more than 5 days on surveillance by intelligence agencies? `[hr2]`"
# )
# df["hr2_more_than_five"] = np.where(df[filter]["hr2"] > 5, True, False)
# hr2_more_than_five_counts = df[filter]["hr2_more_than_five"].value_counts()
# st.plotly_chart(
# render_pie_chart(
# hr2_more_than_five_counts,
# values=hr2_more_than_five_counts,
# names=hr2_more_than_five_counts.index,
# color=hr2_more_than_five_counts.index,
# labels={"true": ">5 days", "false": "<5 days"},
# )
# )


st.write("## Expertise")
Expand Down

0 comments on commit 6174f50

Please sign in to comment.