Merge pull request #1 from zcash-hackworks/add-Dockerfile-update-zmetric-data
Added Dockerfile, jupyter notebook and updated data
This commit is contained in:
commit
bccf238d77
|
@ -0,0 +1,4 @@
|
|||
FROM jupyter/scipy-notebook
|
||||
|
||||
ADD --chown=1000 ./data/example-with-bokeh.ipynb /home/jovyan/
|
||||
ADD ./data/zcashmetrics.json /home/jovyan/
|
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"with open(\"zcashmetrics.json\", \"r\") as file:\n",
|
||||
" fileData = file.read()\n",
|
||||
"zcashmetrics = json.loads(fileData)\n",
|
||||
"print(zcashmetrics[0])\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd \n",
|
||||
"df = pd.DataFrame(zcashmetrics)\n",
|
||||
"print(df.iloc[0])\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from bokeh.plotting import figure\n",
|
||||
"from bokeh.io import show, output_notebook\n",
|
||||
"from bokeh.models import ColumnDataSource\n",
|
||||
"source = ColumnDataSource(df)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"p = figure(title = \"Value Pools\", x_axis_label = \"Block Height\")\n",
|
||||
"p.line(x='height', y='sapling_value_pool', source=source, color = 'red')\n",
|
||||
"p.line(x='height', y='sprout_value_pool', source=source, color = 'blue')\n",
|
||||
"\n",
|
||||
"output_notebook()\n",
|
||||
"show(p)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
2474885
data/zcashmetrics.json
2474885
data/zcashmetrics.json
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue