Spaces:
Sleeping
Sleeping
testing
Browse files
app.py
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import ibis
|
3 |
+
from ibis import _
|
4 |
+
import leafmap.maplibregl as leafmap
|
5 |
+
|
6 |
+
|
7 |
+
st.title("_Streamlit_ is :blue[cool] :sunglasses:")
|
8 |
+
|
9 |
+
city_name = st.text_input("Which City?", "Oakland")
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
con = ibis.duckdb.connect(extensions=["spatial"])
|
14 |
+
redlines = con.read_geo("/vsicurl/https://dsl.richmond.edu/panorama/redlining/static/mappinginequality.json")
|
15 |
+
city = redlines.filter(_.city == city_name).execute()
|
16 |
+
|
17 |
+
|
18 |
+
m = leafmap.Map()
|
19 |
+
m.add_cog_layer("https://espm-157-f24.github.io/spatial-carl-amanda-tyler/ndvi.tif", palette = "greens")
|
20 |
+
m.add_gdf(city, paint = {
|
21 |
+
"fill-color": ["get", "fill"], # color by the column called "fill"
|
22 |
+
"fill-opacity": 0.8,
|
23 |
+
})
|
24 |
+
m.to_streamlit()
|
25 |
+
|