Skip to content

Commit

Permalink
minor fixes in all
Browse files Browse the repository at this point in the history
  • Loading branch information
linozen committed Jul 14, 2021
1 parent b19d775 commit 85b55b7
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions explorer/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,13 +650,11 @@ def get_merged_ms_df():
df["expertise1"] = df["expertise1"].replace("<1", 0.5)
df["expertise1"] = pd.to_numeric(df["expertise1"], errors="coerce")

df["foi2"] = df["foi2"].replace({"20+": 20.0, " ca 10": 10.0, "15+": 15.0})
df["foi2"] = df["foi2"].replace(
{"20+": 20.0, " ca 10": 10.0, "several": 3.0, "15+": 15.0}
)
df["foi2"] = pd.to_numeric(df["foi2"], errors="coerce")

# Save a useful snapshot of the merged data
df.to_pickle("./data/all.pkl")
df.to_excel("./data/all.xlsx")

###################################################################################
# Filter logic
###################################################################################
Expand Down Expand Up @@ -702,6 +700,12 @@ def get_merged_ms_df():
###################################################################################
# Provide download links
###################################################################################

# Save a useful snapshot of the merged data
df.to_pickle("./data/all.pkl")
df.to_excel("./data/all.xlsx")


def get_csv_download_link(df):
"""Generates a link allowing the data in a given panda dataframe to be downloaded
in: dataframe
Expand Down Expand Up @@ -918,7 +922,7 @@ def get_excel_download_link(df):
)
st.plotly_chart(foi5_fig)

# Stacked Bar Chart (msprotectops1)
# Stacked Bar Chart (protectops1)
st.write(
"Have you taken any of the following measures to protect your datas from attacks and surveillance? `[protectops1]`"
)
Expand Down

0 comments on commit 85b55b7

Please sign in to comment.