1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# Run app # streamlit run "R:/Mijn Drive/@Jupyter Notebook/Projecten/Vitalokaal/myApp.py" # # IMPORT MODULES # import pandas as pd import os import glob import numpy as np import streamlit as st import sqlite3 as db\\questionair_vitalokaal.db import plotly.express as px import plotly.graph_objects as go # set number displayed columns pd.set_option('display.max_columns', 500) pd.set_option('display.max_rows', 500) import warnings warnings.filterwarnings('ignore') # --- Configurations --- # # --- page --- st.set_page_config(page_title="Haalbaarheidsonderzoek Vitalokaal", page_icon=":grapes:", layout="wide") # webfx.com/tools/emoji-cheat-sheet/ # --- collect data --- con = db.connect('questionair_vitalokaal.db') df_vragen = pd.read_sql_query('select * from vragen', con) df_vragen = df_vragen.drop(['index'], axis=1, errors='ignore') # --- SIDEBAR ---- st.sidebar.header("Creeër een filter voor de vragenlijst") instelling = st.sidebar.multiselect( "Selecteer de zorginstelling:", options=df_vragen['zorginstelling'].unique(), default=df_vragen['zorginstelling'].unique() ) functie_medewerker = st.sidebar.multiselect( "Selecteer functie medewerker:", options=df_vragen['functie'].unique(), default=df_vragen['functie'].unique() ) df_selection = df_vragen.query( 'zorginstelling == @instelling & functie == @functie_medewerker' ) # --- Variabelen --- columns = df_selection.columns.to_list() # --- Hoofdpagina --- st.title(":grapes: Vitalokaal") st.subheader("Data Analyse Vragenlijst") st.markdown('##') # --- Data Presentation --- st.markdown("#### Tabel met antwoorden") st.dataframe(df_selection) st.markdown("---") ### # # Algemene informatie ############################################################################################################# # ### col1, col2, col3 = st.columns(3) ## --- Weergave zorginstellingen --- fig_zorginstellingen = px.bar (df_selection['zorginstelling'].value_counts(), y=df_selection['zorginstelling'].value_counts(), orientation="v", template="plotly_white", width=300, height=300, #title = "<b> Aantal respondenten per instelling </b>", ) fig_zorginstellingen.update_layout(xaxis_title=None, yaxis_title=None) ## --- Weergave functies --- fig_functies = px.bar (df_selection['functie'].value_counts(), y=df_selection['functie'].value_counts(), template="plotly_white", width=300, height=300) fig_functies.update_layout(xaxis_title=None, yaxis_title=None) ## --- Weergave kennisbehoefte --- fig_kennisbehoefte = px.pie (df_selection['behoefte aan kennis voeding'].value_counts(), values=df_selection['behoefte aan kennis voeding'].value_counts(), template="plotly_white", width=300, height=300) fig_kennisbehoefte.update_layout(xaxis_title=None, yaxis_title=None) # +++ with col1: st.subheader("Zorginstelling") st.plotly_chart(fig_zorginstellingen) st.metric(label="Aantal zorginstellingen", value=(df_selection['zorginstelling'].unique().size)) with col2: st.subheader("Functies") st.plotly_chart(fig_functies) st.metric(label="Functies", value=(df_selection['functie'].unique().size)) with col3: st.subheader("Behoeft aan kennis") st.plotly_chart(fig_kennisbehoefte) st.metric(label="Aantal Respondenten", value=(df_selection['functie'].value_counts().sum())) st.markdown("---") ### # # Doelgroepen en correlatiematrix ############################################################################################################# # ### col1, col2 = st.columns([1,2]) ## --- Weergave doelgroepen --- fig_doelgroep = px.bar (df_selection['met welke doelgroep werk je vooral'].value_counts(), y=df_selection['met welke doelgroep werk je vooral'].value_counts(), template="plotly_white", width=300, height=300) fig_doelgroep.update_layout(xaxis_title=None, yaxis_title=None) # --- Weergave Correlation matrix --- cor = df_selection.select_dtypes(include = ["float", "integer"]).corr() fig_correlation = px.imshow(cor, x = cor.index ,y = cor.columns, color_continuous_scale='RdBu_r', text_auto=True) fig_correlation.update_layout(width = 600, height = 400, title = "Correlation matrix") fig_correlation.update_layout(title={"x":0.5,"y":0.95}) with col1: st.subheader("Doelgroepen") st.plotly_chart(fig_doelgroep) with col2: st.plotly_chart(fig_correlation) st.markdown("---") ### # # Inzichten ############################################################################################################# # ### col1, col2, col3, col4 = st.columns([2,3,3,3]) ## --- Weergave ranking --- ranking_aandacht_voeding = round(df_selection['aandacht voor voeding in dagelijks werk'].mean(),1) star_ranking_aandacht_voeding = ":star:" * int(round(ranking_aandacht_voeding, 0)) ranking_goede_voeding = round(df_selection['vind je gezonde voeding belangrijk'].mean(),1) star_ranking_goede_voeding = ":star:" * int(round(ranking_goede_voeding, 0)) ranking_kennis_voeding = round(df_selection['cijfer kennis voeding'].mean(),1) star_ranking_kennis_voeding = ":star:" * int(round(ranking_kennis_voeding, 0)) ## --- Weergave algemene vragen --- fig_visie_op_voeding = px.pie (df_selection['bekend met visie op voeding'].value_counts(), values=df_selection['bekend met visie op voeding'].value_counts(), template="plotly_white", width=250, height=200) fig_vragen_over_voeding= px.pie (df_selection['heb je vragen over voeding'].value_counts(), values=df_selection['heb je vragen over voeding'].value_counts(), template="plotly_white", width=250, height=200) fig_informatie_over_voeding=px.pie (df_selection['kun je makkelijk informatie vinden over bereiden voeding'].value_counts(), values=df_selection['kun je makkelijk informatie vinden over bereiden voeding'].value_counts(), template="plotly_white", width=250, height=200) fig_duidelijkheid_informatie=px.pie (df_selection['is de informatie duidelijk en makkelijk toe te passen'].value_counts(), values=df_selection['is de informatie duidelijk en makkelijk toe te passen'].value_counts(), template="plotly_white", width=250, height=200) fig_herkennen_knelpunten=px.pie (df_selection['herkenning belemmering op voeding op werk'].value_counts(), values=df_selection['herkenning belemmering op voeding op werk'].value_counts(), template="plotly_white", width=250, height=200) fig_problematiek=px.pie (df_selection['ervaren cliënten problematiek rondom voeding'].value_counts(), values=df_selection['ervaren cliënten problematiek rondom voeding'].value_counts(), template="plotly_white", width=250, height=200) fig_signalen_ongezonde_voeding=px.pie (df_selection['worden signalen van ongezonde voeding bij cliënten herkend'].value_counts(), values=df_selection['worden signalen van ongezonde voeding bij cliënten herkend'].value_counts(), template="plotly_white", width=250, height=200) ## --- Weergave Vragen --- fig_vragen_bereiden = px.bar (df_selection['vragen over voeding of bereiding'].value_counts(), y=df_selection['vragen over voeding of bereiding'].value_counts(), template="plotly_white", width=300, height=300) fig_vragen_bereiden.update_layout(xaxis_title=None, yaxis_title=None, margin=dict(l=10, r=10, t=10, b=10)) with col1: st.subheader("Inzicht voeding") st.markdown("Aandacht voor voeding") st.write(f" {ranking_aandacht_voeding} {star_ranking_aandacht_voeding}") st.markdown("Belang van voeding") st.write(f" {ranking_goede_voeding} {star_ranking_goede_voeding}") st.markdown("Kennis van voeding") st.write(f" {ranking_kennis_voeding} {star_ranking_kennis_voeding}") with col2: st.markdown("Bekend met visie op voeding") st.plotly_chart(fig_visie_op_voeding, use_container_width=False) st.markdown("Heb je weleens vragen over voeding") st.plotly_chart(fig_vragen_over_voeding, use_container_width=False) st.markdown("Herken je knelpunten en belemmeringen") st.plotly_chart(fig_herkennen_knelpunten, use_container_width=False) with col3: st.markdown("Kun je gemakkelijk informatie vinden") st.plotly_chart(fig_informatie_over_voeding, use_container_width=True) st.markdown("Is de informatie duidelijk en gemakelijk") st.plotly_chart(fig_duidelijkheid_informatie, use_container_width=False) st.markdown("Heb je vragen over bereiden van voeding") st.plotly_chart(fig_vragen_bereiden, use_container_width=False) with col4: st.markdown("Worden signalen ongezonde voeding herkend") st.plotly_chart(fig_signalen_ongezonde_voeding, use_container_width=False) st.markdown("Herken je problematiek bij clënten") st.plotly_chart(fig_problematiek, use_container_width=False) st.markdown("---") ### # # Detail overzichten ############################################################################################################# # ### col1, col2 = st.columns(2) ## Col1 # --- Weergave Knelpunten --- knelpunten = df_selection['knelpunten belemmering rondom voeding'].str.split(', ', expand=True) fig_knelpunten=px.bar(knelpunten.stack().value_counts(),template="plotly_white", width=400, height=400) fig_knelpunten.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) voeding_nodig = df_selection['wat is nodig om voeding onderdeel te maken van het dagelijks werken'].str.split(', ', expand=True) fig_voeding_onderdeel_werk = px.bar(voeding_nodig.stack().value_counts(),template="plotly_white", width=400, height=400) fig_voeding_onderdeel_werk.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) wat_is_nodig = df_selection['wat heb je nodig om beter met voeding aan de slag te kunnen'].str.split(', ', expand=True) fig_wat_is_nodig = px.bar(wat_is_nodig.stack().value_counts(),template="plotly_white", width=400, height=400) fig_wat_is_nodig.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) voedings_expert = df_selection['wat kan een exteren voedingsexpert voor jou of team betekenen'].str.split(', ', expand=True) fig_voedingsexpert = px.bar(voedings_expert.stack().value_counts(),template="plotly_white", width=400, height=400) fig_voedingsexpert.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) wie_benarderd = df_selection['wat wordt gedaan met signalen over ongezonde voeding en tips'].str.split(', ', expand=True) df_acties = wie_benarderd.stack().value_counts() ## Col2 bereiding_voeding=df_selection['vragen over voeding of bereiding'].str.split(', ', expand=True) fig_bereiding_voedsel=px.bar(bereiding_voeding.stack().value_counts(),template="plotly_white", width=400, height=400) fig_bereiding_voedsel.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) informatie_voeding=df_selection['gebruikte bronnen mbt voeding'].str.split(', ', expand=True) fig_info_voeding=px.bar(informatie_voeding.stack().value_counts(),template="plotly_white", width=400, height=400) fig_info_voeding.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) informatie_betrouwbaarheid=df_selection['controle betrouwbaarheid informatie over voeding'].str.split(', ', expand=True) fig_informatie_btrw = px.bar(informatie_betrouwbaarheid.stack().value_counts(),template="plotly_white", width=400, height=400) fig_informatie_btrw.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) # --- weergave acties naar signaleren fig_acties_signalen = go.Figure(data=[go.Table( header = dict(values=["Acties"], align='left', font=dict(family='Arial Black', color="#061620", size=16)), cells = dict(values=[df_acties.index], align='left', font=dict(family='Arial',color="#061620", size=14), fill_color='white')) ]) fig_acties_signalen.update_layout( # title="Wat wordt gedaan met signalen", width=600, height=400, margin=dict(l=10, r=10, t=20, b=10), ) with col1: st.markdown("###### Welke knelpunten of belemmeringen ervaar je") st.plotly_chart(fig_knelpunten, use_container_width=False) st.markdown('###### Wat is nodig om voeding onderdeel te maken van het dagelijks werken') st.plotly_chart(fig_voeding_onderdeel_werk, use_container_width=False) st.markdown('###### Wat heb je nodig om beter met voeding aan de slag te kunnen') st.plotly_chart(fig_wat_is_nodig, use_container_width=False) st.markdown('###### Wat kan een exteren voedingsexpert voor jou of team betekenen') st.plotly_chart(fig_voedingsexpert, use_container_width=False) with col2: st.markdown('###### Heb je vragen over voeding of bereiding') st.plotly_chart(fig_bereiding_voedsel, use_container_width=False) st.markdown('###### Waar zoek je informatie') st.plotly_chart(fig_info_voeding, use_container_width=False) st.markdown('###### Hoe weet je of informatie over voeding betrouwbaar is') st.plotly_chart(fig_informatie_btrw, use_container_width=False) st.markdown('###### Welke acties worden opgepakt na signalering') st.plotly_chart(fig_acties_signalen, use_container_width=False) st.markdown("---") #### # st.subheader('Plot data') # x_column = st.selectbox('Selecteer x-as', columns) # y_column = st.selectbox('Selecteer y-as', columns) # fig_scatter = px.scatter(df_selection, x=x_column, y=y_column) # st.plotly_chart(fig_scatter)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# Run app # streamlit run "R:/Mijn Drive/@Jupyter Notebook/Projecten/Vitalokaal/myApp.py" # # IMPORT MODULES # import pandas as pd import os import glob import numpy as np import streamlit as st import sqlite3 as db\\questionair_vitalokaal.db import plotly.express as px import plotly.graph_objects as go # set number displayed columns pd.set_option('display.max_columns', 500) pd.set_option('display.max_rows', 500) import warnings warnings.filterwarnings('ignore') # --- Configurations --- # # --- page --- st.set_page_config(page_title="Haalbaarheidsonderzoek Vitalokaal", page_icon=":grapes:", layout="wide") # webfx.com/tools/emoji-cheat-sheet/ # --- collect data --- con = db.connect('questionair_vitalokaal.db') df_vragen = pd.read_sql_query('select * from vragen', con) df_vragen = df_vragen.drop(['index'], axis=1, errors='ignore') # --- SIDEBAR ---- st.sidebar.header("Creeër een filter voor de vragenlijst") instelling = st.sidebar.multiselect( "Selecteer de zorginstelling:", options=df_vragen['zorginstelling'].unique(), default=df_vragen['zorginstelling'].unique() ) functie_medewerker = st.sidebar.multiselect( "Selecteer functie medewerker:", options=df_vragen['functie'].unique(), default=df_vragen['functie'].unique() ) df_selection = df_vragen.query( 'zorginstelling == @instelling & functie == @functie_medewerker' ) # --- Variabelen --- columns = df_selection.columns.to_list() # --- Hoofdpagina --- st.title(":grapes: Vitalokaal") st.subheader("Data Analyse Vragenlijst") st.markdown('##') # --- Data Presentation --- st.markdown("#### Tabel met antwoorden") st.dataframe(df_selection) st.markdown("---") ### # # Algemene informatie ############################################################################################################# # ### col1, col2, col3 = st.columns(3) ## --- Weergave zorginstellingen --- fig_zorginstellingen = px.bar (df_selection['zorginstelling'].value_counts(), y=df_selection['zorginstelling'].value_counts(), orientation="v", template="plotly_white", width=300, height=300, #title = "<b> Aantal respondenten per instelling </b>", ) fig_zorginstellingen.update_layout(xaxis_title=None, yaxis_title=None) ## --- Weergave functies --- fig_functies = px.bar (df_selection['functie'].value_counts(), y=df_selection['functie'].value_counts(), template="plotly_white", width=300, height=300) fig_functies.update_layout(xaxis_title=None, yaxis_title=None) ## --- Weergave kennisbehoefte --- fig_kennisbehoefte = px.pie (df_selection['behoefte aan kennis voeding'].value_counts(), values=df_selection['behoefte aan kennis voeding'].value_counts(), template="plotly_white", width=300, height=300) fig_kennisbehoefte.update_layout(xaxis_title=None, yaxis_title=None) # +++ with col1: st.subheader("Zorginstelling") st.plotly_chart(fig_zorginstellingen) st.metric(label="Aantal zorginstellingen", value=(df_selection['zorginstelling'].unique().size)) with col2: st.subheader("Functies") st.plotly_chart(fig_functies) st.metric(label="Functies", value=(df_selection['functie'].unique().size)) with col3: st.subheader("Behoeft aan kennis") st.plotly_chart(fig_kennisbehoefte) st.metric(label="Aantal Respondenten", value=(df_selection['functie'].value_counts().sum())) st.markdown("---") ### # # Doelgroepen en correlatiematrix ############################################################################################################# # ### col1, col2 = st.columns([1,2]) ## --- Weergave doelgroepen --- fig_doelgroep = px.bar (df_selection['met welke doelgroep werk je vooral'].value_counts(), y=df_selection['met welke doelgroep werk je vooral'].value_counts(), template="plotly_white", width=300, height=300) fig_doelgroep.update_layout(xaxis_title=None, yaxis_title=None) # --- Weergave Correlation matrix --- cor = df_selection.select_dtypes(include = ["float", "integer"]).corr() fig_correlation = px.imshow(cor, x = cor.index ,y = cor.columns, color_continuous_scale='RdBu_r', text_auto=True) fig_correlation.update_layout(width = 600, height = 400, title = "Correlation matrix") fig_correlation.update_layout(title={"x":0.5,"y":0.95}) with col1: st.subheader("Doelgroepen") st.plotly_chart(fig_doelgroep) with col2: st.plotly_chart(fig_correlation) st.markdown("---") ### # # Inzichten ############################################################################################################# # ### col1, col2, col3, col4 = st.columns([2,3,3,3]) ## --- Weergave ranking --- ranking_aandacht_voeding = round(df_selection['aandacht voor voeding in dagelijks werk'].mean(),1) star_ranking_aandacht_voeding = ":star:" * int(round(ranking_aandacht_voeding, 0)) ranking_goede_voeding = round(df_selection['vind je gezonde voeding belangrijk'].mean(),1) star_ranking_goede_voeding = ":star:" * int(round(ranking_goede_voeding, 0)) ranking_kennis_voeding = round(df_selection['cijfer kennis voeding'].mean(),1) star_ranking_kennis_voeding = ":star:" * int(round(ranking_kennis_voeding, 0)) ## --- Weergave algemene vragen --- fig_visie_op_voeding = px.pie (df_selection['bekend met visie op voeding'].value_counts(), values=df_selection['bekend met visie op voeding'].value_counts(), template="plotly_white", width=250, height=200) fig_vragen_over_voeding= px.pie (df_selection['heb je vragen over voeding'].value_counts(), values=df_selection['heb je vragen over voeding'].value_counts(), template="plotly_white", width=250, height=200) fig_informatie_over_voeding=px.pie (df_selection['kun je makkelijk informatie vinden over bereiden voeding'].value_counts(), values=df_selection['kun je makkelijk informatie vinden over bereiden voeding'].value_counts(), template="plotly_white", width=250, height=200) fig_duidelijkheid_informatie=px.pie (df_selection['is de informatie duidelijk en makkelijk toe te passen'].value_counts(), values=df_selection['is de informatie duidelijk en makkelijk toe te passen'].value_counts(), template="plotly_white", width=250, height=200) fig_herkennen_knelpunten=px.pie (df_selection['herkenning belemmering op voeding op werk'].value_counts(), values=df_selection['herkenning belemmering op voeding op werk'].value_counts(), template="plotly_white", width=250, height=200) fig_problematiek=px.pie (df_selection['ervaren cliënten problematiek rondom voeding'].value_counts(), values=df_selection['ervaren cliënten problematiek rondom voeding'].value_counts(), template="plotly_white", width=250, height=200) fig_signalen_ongezonde_voeding=px.pie (df_selection['worden signalen van ongezonde voeding bij cliënten herkend'].value_counts(), values=df_selection['worden signalen van ongezonde voeding bij cliënten herkend'].value_counts(), template="plotly_white", width=250, height=200) ## --- Weergave Vragen --- fig_vragen_bereiden = px.bar (df_selection['vragen over voeding of bereiding'].value_counts(), y=df_selection['vragen over voeding of bereiding'].value_counts(), template="plotly_white", width=300, height=300) fig_vragen_bereiden.update_layout(xaxis_title=None, yaxis_title=None, margin=dict(l=10, r=10, t=10, b=10)) with col1: st.subheader("Inzicht voeding") st.markdown("Aandacht voor voeding") st.write(f" {ranking_aandacht_voeding} {star_ranking_aandacht_voeding}") st.markdown("Belang van voeding") st.write(f" {ranking_goede_voeding} {star_ranking_goede_voeding}") st.markdown("Kennis van voeding") st.write(f" {ranking_kennis_voeding} {star_ranking_kennis_voeding}") with col2: st.markdown("Bekend met visie op voeding") st.plotly_chart(fig_visie_op_voeding, use_container_width=False) st.markdown("Heb je weleens vragen over voeding") st.plotly_chart(fig_vragen_over_voeding, use_container_width=False) st.markdown("Herken je knelpunten en belemmeringen") st.plotly_chart(fig_herkennen_knelpunten, use_container_width=False) with col3: st.markdown("Kun je gemakkelijk informatie vinden") st.plotly_chart(fig_informatie_over_voeding, use_container_width=True) st.markdown("Is de informatie duidelijk en gemakelijk") st.plotly_chart(fig_duidelijkheid_informatie, use_container_width=False) st.markdown("Heb je vragen over bereiden van voeding") st.plotly_chart(fig_vragen_bereiden, use_container_width=False) with col4: st.markdown("Worden signalen ongezonde voeding herkend") st.plotly_chart(fig_signalen_ongezonde_voeding, use_container_width=False) st.markdown("Herken je problematiek bij clënten") st.plotly_chart(fig_problematiek, use_container_width=False) st.markdown("---") ### # # Detail overzichten ############################################################################################################# # ### col1, col2 = st.columns(2) ## Col1 # --- Weergave Knelpunten --- knelpunten = df_selection['knelpunten belemmering rondom voeding'].str.split(', ', expand=True) fig_knelpunten=px.bar(knelpunten.stack().value_counts(),template="plotly_white", width=400, height=400) fig_knelpunten.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) voeding_nodig = df_selection['wat is nodig om voeding onderdeel te maken van het dagelijks werken'].str.split(', ', expand=True) fig_voeding_onderdeel_werk = px.bar(voeding_nodig.stack().value_counts(),template="plotly_white", width=400, height=400) fig_voeding_onderdeel_werk.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) wat_is_nodig = df_selection['wat heb je nodig om beter met voeding aan de slag te kunnen'].str.split(', ', expand=True) fig_wat_is_nodig = px.bar(wat_is_nodig.stack().value_counts(),template="plotly_white", width=400, height=400) fig_wat_is_nodig.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) voedings_expert = df_selection['wat kan een exteren voedingsexpert voor jou of team betekenen'].str.split(', ', expand=True) fig_voedingsexpert = px.bar(voedings_expert.stack().value_counts(),template="plotly_white", width=400, height=400) fig_voedingsexpert.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) wie_benarderd = df_selection['wat wordt gedaan met signalen over ongezonde voeding en tips'].str.split(', ', expand=True) df_acties = wie_benarderd.stack().value_counts() ## Col2 bereiding_voeding=df_selection['vragen over voeding of bereiding'].str.split(', ', expand=True) fig_bereiding_voedsel=px.bar(bereiding_voeding.stack().value_counts(),template="plotly_white", width=400, height=400) fig_bereiding_voedsel.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) informatie_voeding=df_selection['gebruikte bronnen mbt voeding'].str.split(', ', expand=True) fig_info_voeding=px.bar(informatie_voeding.stack().value_counts(),template="plotly_white", width=400, height=400) fig_info_voeding.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) informatie_betrouwbaarheid=df_selection['controle betrouwbaarheid informatie over voeding'].str.split(', ', expand=True) fig_informatie_btrw = px.bar(informatie_betrouwbaarheid.stack().value_counts(),template="plotly_white", width=400, height=400) fig_informatie_btrw.update_layout(xaxis_title=None, yaxis_title=None,showlegend=False, margin=dict(l=10, r=10, t=10, b=10)) # --- weergave acties naar signaleren fig_acties_signalen = go.Figure(data=[go.Table( header = dict(values=["Acties"], align='left', font=dict(family='Arial Black', color="#061620", size=16)), cells = dict(values=[df_acties.index], align='left', font=dict(family='Arial',color="#061620", size=14), fill_color='white')) ]) fig_acties_signalen.update_layout( # title="Wat wordt gedaan met signalen", width=600, height=400, margin=dict(l=10, r=10, t=20, b=10), ) with col1: st.markdown("###### Welke knelpunten of belemmeringen ervaar je") st.plotly_chart(fig_knelpunten, use_container_width=False) st.markdown('###### Wat is nodig om voeding onderdeel te maken van het dagelijks werken') st.plotly_chart(fig_voeding_onderdeel_werk, use_container_width=False) st.markdown('###### Wat heb je nodig om beter met voeding aan de slag te kunnen') st.plotly_chart(fig_wat_is_nodig, use_container_width=False) st.markdown('###### Wat kan een exteren voedingsexpert voor jou of team betekenen') st.plotly_chart(fig_voedingsexpert, use_container_width=False) with col2: st.markdown('###### Heb je vragen over voeding of bereiding') st.plotly_chart(fig_bereiding_voedsel, use_container_width=False) st.markdown('###### Waar zoek je informatie') st.plotly_chart(fig_info_voeding, use_container_width=False) st.markdown('###### Hoe weet je of informatie over voeding betrouwbaar is') st.plotly_chart(fig_informatie_btrw, use_container_width=False) st.markdown('###### Welke acties worden opgepakt na signalering') st.plotly_chart(fig_acties_signalen, use_container_width=False) st.markdown("---") #### # st.subheader('Plot data') # x_column = st.selectbox('Selecteer x-as', columns) # y_column = st.selectbox('Selecteer y-as', columns) # fig_scatter = px.scatter(df_selection, x=x_column, y=y_column) # st.plotly_chart(fig_scatter)