Skip to content

Commit

Permalink
add metrics on overview
Browse files Browse the repository at this point in the history
  • Loading branch information
linozen committed Aug 30, 2021
1 parent d90cfed commit 21694ad
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 93 deletions.
13 changes: 10 additions & 3 deletions explorer/civsoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ def get_cs_df():
"AO03": "Independent expert bodies",
"AO04": "Data protection authorities",
"AO05": "Audit courts",
"AO06": "Civil society organisations",
"AO06": "The media",
}
)
# Here, FR is coded differently
Expand All @@ -1113,7 +1113,7 @@ def get_cs_df():
"AO03": "Independent expert bodies",
"AO04": "Data protection authorities",
"AO07": "Audit courts",
"AO06": "Civil society organisations",
"AO06": "Media organisations",
}
)

Expand Down Expand Up @@ -1229,6 +1229,13 @@ def get_cs_df():
merged_markdown = read_markdown_file("explorer/markdown/media.md")
st.markdown(merged_markdown, unsafe_allow_html=True)

col1, col2 = st.columns(2)
col1.metric("Civil Society Representatives", len(df[filter].index))
col2.metric(
"Cumulative years spent working on SBIA",
int(df[filter]["CSexpertise1"].sum()),
)

st.write("### Country `[country]`")
country_counts = df[filter]["country"].value_counts()
st.plotly_chart(
Expand Down Expand Up @@ -3247,7 +3254,7 @@ def get_cs_df():
"Independent expert bodies",
"Data protection authorities",
"Audit courts",
"CSOs | The media",
"The media",
]

st.write(
Expand Down
Loading

0 comments on commit 21694ad

Please sign in to comment.