Skip to content

adding some labels and tweaks #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion data-fetch/src/Index.res
Original file line number Diff line number Diff line change
@@ -9,6 +9,11 @@ let client = ClientConfig.createInstance(
(),
)

// let client = ClientConfig.createInstance(
// ~graphqlEndpoint="https://api.thegraph.com/subgraphs/name/skofman/chainlink",
// (),
// )

Comment on lines +12 to +16
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use this graph if we are looking for mainnet data instead of matic data

%%raw(`var Promise = require('bluebird');`)

let promiseWhile: (unit => bool, unit => JsPromise.t<unit>) => JsPromise.t<unit> = %raw(`
@@ -48,7 +53,9 @@ let _getAllFeeds = client.query(~query=module(Query.GetAllFeeds), ())->JsPromise
~query=module(Query.GetFeedData),
Query.GetFeedData.makeVariables(~offset=offset.contents, ~feedId, ()),
)->JsPromise.map(result => {
Js.log(`making another query, with parameters offset=${offset.contents->Int.toString} and feedId=${feedId}`)
Js.log(
`making another query, with parameters offset=${offset.contents->Int.toString} and feedId=${feedId}`,
)
switch result {
| Ok({data: {feed: Some({rounds})}}) =>
let _processRound = rounds->Array.map(({number, unixTimestamp, value}) => {
2,723 changes: 2,723 additions & 0 deletions data-viz/ETH--USD--MAINNET.csv

Large diffs are not rendered by default.

6,001 changes: 6,001 additions & 0 deletions data-viz/ETH--USD--MATIC.csv

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions data-viz/data-viz.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,8 @@

# read in the data
headers = ['number', 'timestamp', 'value']
df = pd.read_csv('../rawData/MATIC--USD.csv', names=headers)
# df = pd.read_csv('./ETH--USD--MAINNET.csv', names=headers)
df = pd.read_csv('./ETH--USD--MATIC.csv', names=headers)
"""
Analysis of heartbeat
(Time and frequency between updates.)
@@ -22,6 +23,8 @@

s = pd.DataFrame(mylist)
ax = s.boxplot() # box plot analysis
ax.axes.set_ylabel("Minutes between price updates")
ax.axes.set_xlabel("ETH/USD Polygon Price Feed")
plt.show()
"""
Analysis of percentage changes
@@ -34,7 +37,8 @@
# ax = pecentage_changes.plot.kde()

ax = pecentage_changes.plot.hist(bins=150, alpha=0.5)

ax.axes.set_ylabel("Frequency")
ax.axes.set_xlabel("Percentage change between price update")
# ax = df.boxplot()

plt.show()