Update app.py
Browse files
app.py
CHANGED
@@ -2,26 +2,5 @@ import streamlit as st
|
|
2 |
import pandas as pd
|
3 |
import numpy as np
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
'lat' : [41.868171, 44.979840, 38.257972, 39.030575],
|
8 |
-
'lon' : [-87.667458, -93.272474, -85.765187, -95.702548]
|
9 |
-
})
|
10 |
-
|
11 |
-
# Adding code so we can have map default to the center of the data
|
12 |
-
midpoint = (np.average(data['lat']), np.average(data['lon']))
|
13 |
-
|
14 |
-
st.deck_gl_chart(
|
15 |
-
viewport={
|
16 |
-
'latitude': midpoint[0],
|
17 |
-
'longitude': midpoint[1],
|
18 |
-
'zoom': 4
|
19 |
-
},
|
20 |
-
layers=[{
|
21 |
-
'type': 'ScatterplotLayer',
|
22 |
-
'data': data,
|
23 |
-
'radiusScale': 250,
|
24 |
-
'radiusMinPixels': 5,
|
25 |
-
'getFillColor': [248, 24, 148],
|
26 |
-
}]
|
27 |
-
)
|
|
|
2 |
import pandas as pd
|
3 |
import numpy as np
|
4 |
|
5 |
+
dal = pd.DataFrame( np.random.randn(1, 1) / [50, 50] + [33.1032, -96.6706], columns=['lat', 'lon'])
|
6 |
+
st.map(dal)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|