File size: 696 Bytes
54b9841
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import streamlit as st
import ibis
from ibis import _
import leafmap.maplibregl as leafmap


st.title("_Streamlit_ is :blue[cool] :sunglasses:")

city_name = st.text_input("Which City?", "Oakland")



con = ibis.duckdb.connect(extensions=["spatial"])
redlines = con.read_geo("/vsicurl/https://dsl.richmond.edu/panorama/redlining/static/mappinginequality.json")
city = redlines.filter(_.city == city_name).execute()


m = leafmap.Map()
m.add_cog_layer("https://espm-157-f24.github.io/spatial-carl-amanda-tyler/ndvi.tif",  palette = "greens")
m.add_gdf(city, paint = {
        "fill-color": ["get", "fill"], # color by the column called "fill"
        "fill-opacity": 0.8,
    })
m.to_streamlit()