watanabe3tipapa commited on
Commit
ab087fa
1 Parent(s): d75b320

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +37 -0
app.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ import numpy as np
4
+ import pydeck as pdk
5
+
6
+ chart_data = pd.DataFrame(
7
+ np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],
8
+ columns=['lat', 'lon'])
9
+
10
+ st.pydeck_chart(pdk.Deck(
11
+ map_style=None,
12
+ initial_view_state=pdk.ViewState(
13
+ latitude=43.2,
14
+ longitude=141.0,
15
+ zoom=11,
16
+ pitch=50,
17
+ ),
18
+ layers=[
19
+ pdk.Layer(
20
+ 'HexagonLayer',
21
+ data=chart_data,
22
+ get_position='[lon, lat]',
23
+ radius=200,
24
+ elevation_scale=4,
25
+ elevation_range=[0, 1000],
26
+ pickable=True,
27
+ extruded=True,
28
+ ),
29
+ pdk.Layer(
30
+ 'ScatterplotLayer',
31
+ data=chart_data,
32
+ get_position='[lon, lat]',
33
+ get_color='[200, 30, 0, 160]',
34
+ get_radius=200,
35
+ ),
36
+ ],
37
+ ))