-
Notifications
You must be signed in to change notification settings - Fork 4
/
middecens.py
146 lines (107 loc) · 2.72 KB
/
middecens.py
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
import streamlit as st
import plotly
import plotly.express as px
import pandas as pd
import json
st.title("ENS mid december")
query_id = "a8ece130-7ad1-4cf4-a260-14d83fb03c49"
df = pd.read_json(
f"https://api.flipsidecrypto.com/api/v2/queries/{query_id}/data/latest",
convert_dates=["TIMESTAMP_NTZ"],
)
t_f = False
st.sidebar.write("Choose y-axis scale")
check = st.sidebar.checkbox("Linear/Log")
if check:
t_f = True
#-------------------------------------------------------
st.markdown("""
ENS CLAIMS
""")
df = px.bar(
df, #this is the dataframe you are trying to plot
x = "DAYZ",
y = "AMT",
orientation = "v",
# color = "TO_ADDRESS_NAME",
template = "plotly_white",
width = 1000,
height = 600,
log_y = t_f
)
st.plotly_chart(df)
query_id = "36c75b7e-b89e-4c73-ac9a-a9a214e093c5"
df = pd.read_json(
f"https://api.flipsidecrypto.com/api/v2/queries/{query_id}/data/latest",
convert_dates=["TIMESTAMP_NTZ"],
)
st.markdown("""
ENS PRICE""")
df = px.scatter(
df, #this is the dataframe you are trying to plot
x = "HOUR",
y = "PRICE",
orientation = "v",
# color = "TO_ADDRESS_NAME",
template = "plotly_white",
width = 1000,
height = 600,
log_y = t_f
)
st.plotly_chart(df)
query_id = "54293e31-e10c-4677-bfbf-5b8af31aa52e"
df = pd.read_json(
f"https://api.flipsidecrypto.com/api/v2/queries/{query_id}/data/latest",
convert_dates=["TIMESTAMP_NTZ"],
)
st.markdown("""
NEW REGISTRATIONS
""")
df = px.bar(
df, #this is the dataframe you are trying to plot
x = "DAYZ",
y = "COUNT(DISTINCT(TX_ID))",
orientation = "v",
# color = "TO_ADDRESS_NAME",
template = "plotly_white",
width = 1000,
height = 600,
log_y = t_f
)
st.plotly_chart(df)
query_id = "40388abb-c656-4fab-b7bd-8a32d3aeea18"
df = pd.read_json(
f"https://api.flipsidecrypto.com/api/v2/queries/{query_id}/data/latest",
convert_dates=["TIMESTAMP_NTZ"],
)
st.markdown("""
GAS FEE vs REGISTRATION FEE""")
df = px.scatter(
df, #this is the dataframe you are trying to plot
x = "DAYZ",
y = ["SUM(AMOUNT_USD)","SUM(FEE_USD)"],
orientation = "v",
# color = "TO_ADDRESS_NAME",
template = "plotly_white",
width = 1000,
height = 600,
log_y = t_f
)
st.plotly_chart(df)
# query_id = "2ca64776-431b-42ff-b0e6-7f324b4aed35"
# df = pd.read_json(
# f"https://api.flipsidecrypto.com/api/v2/queries/{query_id}/data/latest",
# convert_dates=["TIMESTAMP_NTZ"],
# )
# df = px.bar(
# df, #this is the dataframe you are trying to plot
# x = "HOURZ",
# y = "WETH",
# orientation = "v",
# # color = "TO_ADDRESS_NAME",
# template = "plotly_white",
# width = 1000,
# height = 600,
# log_y = t_f
# )
# st.plotly_chart(df)