Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@
|
|
| 4 |
import streamlit as st
|
| 5 |
import pandas as pd
|
| 6 |
import folium
|
|
|
|
| 7 |
from streamlit_folium import st_folium
|
| 8 |
|
| 9 |
APP_TITLE = ''
|
|
@@ -30,7 +31,7 @@ def display_map(df, year, quarter):
|
|
| 30 |
df = df[(df['Year'] == year) & (df['Quarter'] == quarter)]
|
| 31 |
|
| 32 |
map = folium.Map(location=[-43.346200009, 172.23381214 ], zoom_start=10, scrollWheelZoom=False, tiles='CartoDB positron')
|
| 33 |
-
|
| 34 |
choropleth = folium.Choropleth(
|
| 35 |
geo_data='data/us-state-boundaries.geojson',
|
| 36 |
data=df,
|
|
@@ -51,7 +52,7 @@ def display_map(df, year, quarter):
|
|
| 51 |
folium.features.GeoJsonTooltip(['name', 'population', 'per_100k'], labels=False)
|
| 52 |
)
|
| 53 |
|
| 54 |
-
st_map = st_folium(
|
| 55 |
|
| 56 |
state_name = ''
|
| 57 |
if st_map['last_active_drawing']:
|
|
|
|
| 4 |
import streamlit as st
|
| 5 |
import pandas as pd
|
| 6 |
import folium
|
| 7 |
+
import geemap.foliumap as geemap
|
| 8 |
from streamlit_folium import st_folium
|
| 9 |
|
| 10 |
APP_TITLE = ''
|
|
|
|
| 31 |
df = df[(df['Year'] == year) & (df['Quarter'] == quarter)]
|
| 32 |
|
| 33 |
map = folium.Map(location=[-43.346200009, 172.23381214 ], zoom_start=10, scrollWheelZoom=False, tiles='CartoDB positron')
|
| 34 |
+
Map = geemap.Map(center=[-43.346200009, 172.23381214], zoom=10, height=600)
|
| 35 |
choropleth = folium.Choropleth(
|
| 36 |
geo_data='data/us-state-boundaries.geojson',
|
| 37 |
data=df,
|
|
|
|
| 52 |
folium.features.GeoJsonTooltip(['name', 'population', 'per_100k'], labels=False)
|
| 53 |
)
|
| 54 |
|
| 55 |
+
st_map = st_folium(Map, width=700, height=450)
|
| 56 |
|
| 57 |
state_name = ''
|
| 58 |
if st_map['last_active_drawing']:
|