Spaces:
Runtime error
Runtime error
Commit
·
4fbc672
1
Parent(s):
45bf9cf
V3 12
Browse files- localisation.py +7 -4
localisation.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
from folium import Map, Marker, Icon, Popup
|
| 2 |
from streamlit_folium import folium_static
|
| 3 |
import streamlit as st
|
|
@@ -6,7 +7,7 @@ from data_manager import get_data
|
|
| 6 |
def display_map():
|
| 7 |
data, total_hits = get_data()
|
| 8 |
if data:
|
| 9 |
-
# Ajout des titres en haut de l'écran
|
| 10 |
st.markdown("## OPEN DATA RSE")
|
| 11 |
st.markdown("### Localiser les organisations engagées RSE de Bordeaux Métropole")
|
| 12 |
|
|
@@ -27,9 +28,11 @@ def display_map():
|
|
| 27 |
if lat and lon:
|
| 28 |
popup_html = f"""
|
| 29 |
<div style="width:300px;">
|
| 30 |
-
<b>{item.get('nom_courant_denomination', 'Sans nom')}</b><br>
|
| 31 |
<b>Action RSE:</b><br>
|
| 32 |
-
{item.get('action_rse', 'Non spécifiée')}
|
|
|
|
|
|
|
| 33 |
</div>
|
| 34 |
"""
|
| 35 |
popup = Popup(popup_html, max_width=500)
|
|
@@ -40,4 +43,4 @@ def display_map():
|
|
| 40 |
folium_static(m)
|
| 41 |
|
| 42 |
if __name__ == "__main__":
|
| 43 |
-
display_map()
|
|
|
|
| 1 |
+
|
| 2 |
from folium import Map, Marker, Icon, Popup
|
| 3 |
from streamlit_folium import folium_static
|
| 4 |
import streamlit as st
|
|
|
|
| 7 |
def display_map():
|
| 8 |
data, total_hits = get_data()
|
| 9 |
if data:
|
| 10 |
+
# Ajout des titres en haut de l'écran
|
| 11 |
st.markdown("## OPEN DATA RSE")
|
| 12 |
st.markdown("### Localiser les organisations engagées RSE de Bordeaux Métropole")
|
| 13 |
|
|
|
|
| 28 |
if lat and lon:
|
| 29 |
popup_html = f"""
|
| 30 |
<div style="width:300px;">
|
| 31 |
+
<b>{item.get('nom_courant_denomination', 'Sans nom')}</b><br><br>
|
| 32 |
<b>Action RSE:</b><br>
|
| 33 |
+
{item.get('action_rse', 'Non spécifiée')}<br><br><br>
|
| 34 |
+
<b>Secteur d'activité:</b> {item.get('libelle_section_naf', 'Non spécifié')}<br>
|
| 35 |
+
<b>Taille de l'entreprise:</b> {item.get('tranche_effectif_entreprise', 'Non spécifiée')}
|
| 36 |
</div>
|
| 37 |
"""
|
| 38 |
popup = Popup(popup_html, max_width=500)
|
|
|
|
| 43 |
folium_static(m)
|
| 44 |
|
| 45 |
if __name__ == "__main__":
|
| 46 |
+
display_map()
|