Spaces:
Runtime error
Runtime error
update Merge branch 'main' of https://huggingface.co/spaces/Omdena-Milan/milan-chapter-agrifoods into main
Browse files- app.py +4 -1
- pages/dashboard.py +2 -2
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
from PIL import Image
|
3 |
-
|
|
|
4 |
|
5 |
st.set_page_config(layout="wide")
|
6 |
image = Image.open('data/logo.png')
|
@@ -23,4 +24,6 @@ methods. The team worked on different tasks which are independent of each other
|
|
23 |
project goal. For demonstration, the team integrated all of them into one dashboard with good usability
|
24 |
for non-technical decision-makers.
|
25 |
''')
|
|
|
|
|
26 |
|
|
|
1 |
import streamlit as st
|
2 |
from PIL import Image
|
3 |
+
import folium
|
4 |
+
from streamlit_folium import st_folium
|
5 |
|
6 |
st.set_page_config(layout="wide")
|
7 |
image = Image.open('data/logo.png')
|
|
|
24 |
project goal. For demonstration, the team integrated all of them into one dashboard with good usability
|
25 |
for non-technical decision-makers.
|
26 |
''')
|
27 |
+
map = folium.Map(location=[42.3, 13], zoom_start=5,scrollWheelZoom=False, tiles='CartoDB positron')
|
28 |
+
st_map = st_folium(map, width=700, height= 450)
|
29 |
|
pages/dashboard.py
CHANGED
@@ -49,8 +49,8 @@ def display_map(df, year):
|
|
49 |
data=df,
|
50 |
columns=['region_code', 'Value'],
|
51 |
key_on="feature.properties.ID_1",
|
52 |
-
fill_color='YlGn',
|
53 |
-
highlight=True
|
54 |
).add_to(map)
|
55 |
ch.geojson.add_child(
|
56 |
folium.features.GeoJsonTooltip(['NAME_1'], labels=False)
|
|
|
49 |
data=df,
|
50 |
columns=['region_code', 'Value'],
|
51 |
key_on="feature.properties.ID_1",
|
52 |
+
#fill_color='YlGn',
|
53 |
+
#highlight=True
|
54 |
).add_to(map)
|
55 |
ch.geojson.add_child(
|
56 |
folium.features.GeoJsonTooltip(['NAME_1'], labels=False)
|