Merge pull request #1 from zcash-hackworks/add-Dockerfile-update-zmetric-data

Added Dockerfile, jupyter notebook and updated data
This commit is contained in:
Ben Wilson 2020-05-11 13:05:11 -04:00 committed by GitHub
commit bccf238d77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2474649 additions and 323 deletions

4
Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM jupyter/scipy-notebook
ADD --chown=1000 ./data/example-with-bokeh.ipynb /home/jovyan/
ADD ./data/zcashmetrics.json /home/jovyan/

View File

@ -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
}

File diff suppressed because it is too large Load Diff