Update surveycaa.py
Browse files- surveycaa.py +28 -4
surveycaa.py
CHANGED
@@ -341,10 +341,34 @@ async def surveyRh():
|
|
341 |
df1['Participation_evenements_anterieurs'] = df1['Participation_evenements_anterieurs'].str.split(';')
|
342 |
df1 = df1.explode('Participation_evenements_anterieurs')
|
343 |
df_participation = df1.groupby('Participation_evenements_anterieurs').size().reset_index(name='obs')
|
344 |
-
fig_participation = px.bar(df_participation, x='obs', y='Participation_evenements_anterieurs', orientation='h', color='obs', title="Objectifs principaux à atteindre lors du séminaire", labels={'obs':'nombre'}, color_continuous_scale="Teal", text_auto=True).update_layout(font=dict(size=10,color="RebeccaPurple")).update_traces(showlegend=False)
|
345 |
-
elements.append(cl.Plotly(name="chart_participation", figure=fig_participation, display="inline", size="
|
346 |
-
await cl.Message(content="Datavisualisation de l'enquête pour le séminaire RH", elements=elements).send()
|
347 |
-
|
348 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
|
|
|
350 |
return fileSurvey
|
|
|
341 |
df1['Participation_evenements_anterieurs'] = df1['Participation_evenements_anterieurs'].str.split(';')
|
342 |
df1 = df1.explode('Participation_evenements_anterieurs')
|
343 |
df_participation = df1.groupby('Participation_evenements_anterieurs').size().reset_index(name='obs')
|
344 |
+
fig_participation = px.bar(df_participation, x='obs', y='Participation_evenements_anterieurs', orientation='h', color='obs', title="Objectifs principaux à atteindre lors du séminaire", labels={'obs':'nombre', 'Participation_evenements_anterieurs':'Objectifs principaux'}, color_continuous_scale="Teal", text_auto=True).update_layout(font=dict(size=10,color="RebeccaPurple")).update_traces(showlegend=False)
|
345 |
+
elements.append(cl.Plotly(name="chart_participation", figure=fig_participation, display="inline", size="medium"))
|
|
|
|
|
346 |
|
347 |
+
df_articulation = df.groupby('Améliorer_articulation_différents_métiers_RH').size().reset_index(name='obs')
|
348 |
+
df_comprendre = df.groupby('comprendre_attentes_services_université_service_RH').size().reset_index(name='obs')
|
349 |
+
df_reflechir = df.groupby('Réfléchir_solutions_défis_secteur_public').size().reset_index(name='obs')
|
350 |
+
df_renforcer = df.groupby('Renforcer_sentiment_appartenance_service_mission_éducative').size().reset_index(name='obs')
|
351 |
+
fig_contribution = make_subplots(rows=4, cols=1, shared_xaxes=True)
|
352 |
+
fig_contribution.add_trace(
|
353 |
+
go.Bar(x=df_articulation.obs, y=df_articulation.Améliorer_articulation_différents_métiers_RH, orientation='h', textposition='inside', textangle=0, textfont_color='white', name="Améliorer l'articulation entre les différents métiers RH (paie, gestion de carrière, formation, recrutement)", marker_color='rgb(136, 204, 238)'), 1, 1
|
354 |
+
)
|
355 |
+
fig_contribution.add_trace(
|
356 |
+
go.Bar(x=df_comprendre.obs, y=df_comprendre.comprendre_attentes_services_université_service_RH, orientation='h', textposition='inside', textangle=0, textfont_color='white', name="Mieux comprendre les attentes des autres services de l'université", marker_color='rgb(204, 102, 119)'),
|
357 |
+
2,
|
358 |
+
1,
|
359 |
+
)
|
360 |
+
fig_contribution.add_trace(
|
361 |
+
go.Bar(x=df_reflechir.obs, y=df_reflechir.Réfléchir_solutions_défis_secteur_public, orientation='h', textposition='inside', textangle=0, textfont_color='white', name="Réfléchir collectivement à des solutions pour les défis spécifiques du secteur public (budgétaires, réglementaires)", marker_color='rgb(221, 204, 119)'),
|
362 |
+
3,
|
363 |
+
1,
|
364 |
+
)
|
365 |
+
fig_contribution.add_trace(
|
366 |
+
go.Bar(x=df_renforcer.obs, y=df_renforcer.Renforcer_sentiment_appartenance_service_mission_éducative, orientation='h', textposition='inside', textangle=0, textfont_color='white', name="Renforcer le sentiment d'appartenance à un service qui contribue à la mission éducative", marker_color='rgb(17, 119, 51)'),
|
367 |
+
4,
|
368 |
+
1,
|
369 |
+
)
|
370 |
+
fig_contribution.update_layout(title='Activités d\'un CAA junior', xaxis_tickfont_size=10, yaxis_tickfont_size=10, autosize=False, width=600, height=600)
|
371 |
+
elements.append(cl.Plotly(name="chart_activites_autonomie", figure=fig_contribution, display="inline", size="medium"))
|
372 |
|
373 |
+
await cl.Message(content="Datavisualisation de l'enquête pour le séminaire RH", elements=elements).send()
|
374 |
return fileSurvey
|