| import streamlit as st |
| import data_manager |
|
|
| def display_actions_rse(): |
| |
| data, total_hits = data_manager.get_data() |
| |
| if total_hits > 0: |
| |
| st.markdown("## OPEN DATA Bordeaux Métropole RSE") |
| st.markdown("### Découvrer les actions RSE des organisations engagées de Bordeaux Métropole") |
| |
| secteurs = sorted({record.get("libelle_section_naf") for record in data if record.get("libelle_section_naf")}) |
| secteur_selectionne = st.selectbox("Filtre par secteur d'activité :", ["Tous"] + secteurs) |
| |
| |
| actions_filtrees = [ |
| record for record in data |
| if record.get("libelle_section_naf") == secteur_selectionne or secteur_selectionne == "Tous" |
| ] |
| |
| |
| if actions_filtrees: |
| for action in actions_filtrees: |
| |
| st.markdown(f":green_heart: **Entreprise**: {action.get('nom_courant_denomination')}\n\n**Action**: {action.get('action_rse')}", unsafe_allow_html=True) |
| else: |
| st.write("Aucune action RSE correspondante trouvée.") |
| |
| |
| st.markdown(f"**Total des actions RSE :** {len(actions_filtrees)}") |
| |
| else: |
| st.write("Erreur lors de la récupération des données.") |
|
|