Yara Kyrychenko
commited on
Commit
·
426184d
1
Parent(s):
0f310a2
upd scale
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ df = pd.read_csv('mist_stats.csv')
|
|
12 |
st.header("Misinformation Susceptibility Test Statistics")
|
13 |
st.subheader("Explore misinformation susceptibility profiles across 24 countries!")
|
14 |
|
15 |
-
st.markdown("Data from yourmist.streamlit.app between June 19, 2023, and July 10, 2024, from individuals who completed the MIST and chose to share their score and all sociodemographic data with the researchers. Only countries with more than 250 complete submissions at the time of data collection are included.")
|
16 |
|
17 |
countries = ["All countries"] + sorted(list(df["Country"].unique()))
|
18 |
|
@@ -46,10 +46,10 @@ plot_df = filtered_df.groupby([selected_var]).agg(avg_score=('Score', 'mean')).r
|
|
46 |
plot_df['avg_score'] = plot_df['avg_score'].round(2)
|
47 |
plot_df = plot_df.sort_values(by=selected_var)
|
48 |
|
49 |
-
subtitle_text = [f'In {selected_country} by {selected_var.capitalize()}
|
50 |
f'N={num_obs}, Mean={mean_score}, SD={std_dev}']
|
51 |
|
52 |
-
color_scale = alt.Scale(domain=ordering_dict[selected_var])
|
53 |
|
54 |
chart = alt.Chart(plot_df).mark_bar().encode(
|
55 |
x=alt.X('avg_score', title='Average MIST Score',scale=alt.Scale(domain=[0, 20])),
|
|
|
12 |
st.header("Misinformation Susceptibility Test Statistics")
|
13 |
st.subheader("Explore misinformation susceptibility profiles across 24 countries!")
|
14 |
|
15 |
+
st.markdown("Data from [yourmist.streamlit.app](yourmist.streamlit.app) between June 19, 2023, and July 10, 2024, from individuals who completed the MIST and chose to share their score and all sociodemographic data with the researchers. Only countries with more than 250 complete submissions at the time of data collection are included.")
|
16 |
|
17 |
countries = ["All countries"] + sorted(list(df["Country"].unique()))
|
18 |
|
|
|
46 |
plot_df['avg_score'] = plot_df['avg_score'].round(2)
|
47 |
plot_df = plot_df.sort_values(by=selected_var)
|
48 |
|
49 |
+
subtitle_text = [f'In {selected_country} by {selected_var.capitalize()}',
|
50 |
f'N={num_obs}, Mean={mean_score}, SD={std_dev}']
|
51 |
|
52 |
+
color_scale = alt.Scale(domain=ordering_dict[selected_var], scheme= 'viridis')
|
53 |
|
54 |
chart = alt.Chart(plot_df).mark_bar().encode(
|
55 |
x=alt.X('avg_score', title='Average MIST Score',scale=alt.Scale(domain=[0, 20])),
|