Spaces:
Running
Running
| 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() | |