diegoellissoto commited on
Commit
895a3bf
·
1 Parent(s): 1a5b889
Files changed (1) hide show
  1. app.py +37 -0
app.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import leafmap.maplibregl as leafmap
3
+ import ibis
4
+ from ibis import _
5
+
6
+
7
+ x = st.slider('Select a value')
8
+ st.write(x, 'squared is', x * x)
9
+
10
+ st.title('Select a redlined city')
11
+
12
+
13
+ con = ibis.duckdb.connect()
14
+
15
+
16
+ # LOAD RED LINING
17
+ redlines = con.read_geo("/vsicurl/https://dsl.richmond.edu/panorama/redlining/static/mappinginequality.gpkg")
18
+
19
+ option = st.selectbox(
20
+ "Select a city",
21
+ ("San Francisco", "Berkeley", "Oakland"),
22
+ index=None,
23
+ placeholder="Select contact method...",
24
+ )
25
+
26
+ city = redlines.filter(_.city == option)
27
+
28
+ st.write("You selected:", option)
29
+
30
+
31
+
32
+ # Next select code from our exersizes
33
+
34
+ m = leafmap.Map()
35
+
36
+ m.to_streamlit()
37
+