Skip to content

Commit

Permalink
add new pie chart
Browse files Browse the repository at this point in the history
  • Loading branch information
linozen committed Aug 24, 2021
1 parent ad43b61 commit 23e1462
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions explorer/merged.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,24 @@ 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("## Expertise")

# TODO Show distribution/average for the three countries
st.write(
"### How many years have you spent working on surveillance by intelligence agencies? `[expertise1]`"
)
Expand Down

0 comments on commit 23e1462

Please sign in to comment.