Spaces:
Sleeping
Sleeping
cog ex
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ con = ibis.duckdb.connect()
|
|
23 |
|
24 |
|
25 |
# fixme could create drop-down selection of the 300 cities
|
26 |
-
city_name = st.text_input("Select a city", "
|
27 |
|
28 |
# Extract the specified city
|
29 |
city = (con
|
@@ -34,6 +34,9 @@ city = (con
|
|
34 |
|
35 |
# Render the map
|
36 |
m = leafmap.Map(style="positron")
|
|
|
|
|
37 |
m.add_gdf(city, "fill", paint = {"fill-color": ["get", "fill"], "fill-opacity": 0.8})
|
|
|
38 |
m.to_streamlit()
|
39 |
|
|
|
23 |
|
24 |
|
25 |
# fixme could create drop-down selection of the 300 cities
|
26 |
+
city_name = st.text_input("Select a city", "Oakland")
|
27 |
|
28 |
# Extract the specified city
|
29 |
city = (con
|
|
|
34 |
|
35 |
# Render the map
|
36 |
m = leafmap.Map(style="positron")
|
37 |
+
if city_name == "Oakland":
|
38 |
+
m.add_cog_layer("https://espm-157-f24.github.io/spatial-carl-amanda-tyler/ndvi.tif", name="ndvi", palette = "greens")
|
39 |
m.add_gdf(city, "fill", paint = {"fill-color": ["get", "fill"], "fill-opacity": 0.8})
|
40 |
+
m.add_layer_control()
|
41 |
m.to_streamlit()
|
42 |
|