{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Subplots with table and traces with different realtive position ##" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/vnd.plotly.v1+html": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from plotly.offline import download_plotlyjs, init_notebook_mode, iplot, plot\n", "init_notebook_mode(connected=True)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import pandas as pd\n", "import datetime" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DateNumber-transactionsOutput-volume(BTC)Market-priceHash-rateCost-per-trans-USDMining-revenue-USDTransaction-fees-BTC
02017-04-29 00:00:003413194.488916e+063.119179e+064.488916e+069.4607963.119179e+06256.376481
12017-04-30 00:00:002814893.918072e+062.720216e+063.918072e+0610.0304462.720216e+06199.307639
22017-05-01 00:00:002947863.892124e+062.878278e+063.892124e+0610.1088882.878278e+06227.748866
32017-05-02 00:00:003331614.099704e+063.149553e+064.099704e+069.7964723.149553e+06272.679662
42017-05-03 00:00:002951493.425069e+062.760373e+063.425069e+069.6913472.760373e+06247.343677
\n", "
" ], "text/plain": [ " Date Number-transactions Output-volume(BTC) Market-price \\\n", "0 2017-04-29 00:00:00 341319 4.488916e+06 3.119179e+06 \n", "1 2017-04-30 00:00:00 281489 3.918072e+06 2.720216e+06 \n", "2 2017-05-01 00:00:00 294786 3.892124e+06 2.878278e+06 \n", "3 2017-05-02 00:00:00 333161 4.099704e+06 3.149553e+06 \n", "4 2017-05-03 00:00:00 295149 3.425069e+06 2.760373e+06 \n", "\n", " Hash-rate Cost-per-trans-USD Mining-revenue-USD Transaction-fees-BTC \n", "0 4.488916e+06 9.460796 3.119179e+06 256.376481 \n", "1 3.918072e+06 10.030446 2.720216e+06 199.307639 \n", "2 3.892124e+06 10.108888 2.878278e+06 227.748866 \n", "3 4.099704e+06 9.796472 3.149553e+06 272.679662 \n", "4 3.425069e+06 9.691347 2.760373e+06 247.343677 " ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df=pd.read_excel('Mining-BTC-180.xls')\n", "df.head()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Index([u'Date', u'Number-transactions', u'Output-volume(BTC)', u'Market-price',\n", " u'Hash-rate', u'Cost-per-trans-USD', u'Mining-revenue-USD',\n", " u'Transaction-fees-BTC'],\n", " dtype='object')" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.columns" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Convert each string in `df['Date']` to a datetime.date element. " ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": true }, "outputs": [], "source": [ "df['Date']=map(lambda x: x.date(),[pd.to_datetime(dr) for dr in df['Date']])" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Index([u'Date', u'Number-transactions', u'Output-volume(BTC)', u'Market-price',\n", " u'Hash-rate', u'Cost-per-trans-USD', u'Mining-revenue-USD',\n", " u'Transaction-fees-BTC'],\n", " dtype='object')" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.columns" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": true }, "outputs": [], "source": [ "table_trace1=dict(type = 'table',\n", " domain=dict(x= [0.0, 0.5],\n", " y= [0, 1.0]),\n", " \n", " columnwidth= [30]+[ 33, 35, 33],\n", " columnorder=[0, 1, 2, 3, 4],\n", " header = dict(height = 50,\n", " values = [['Date'],['Hash Rate, TH/sec'], \n", " ['Mining revenue'], ['Transaction fees']], \n", " \n", " line = dict(color='rgb(50,50,50)'),\n", " align = ['left']*5,\n", " font = dict(color=['rgb(45,45,45)']*5, size=14),\n", " fill = dict( color = '#d562be' )#fill color for header\n", " ),\n", " cells = dict(values = [df['Date'][-20:], df['Hash-rate'][-20:], df['Mining-revenue-USD'][-20:],\n", " df['Transaction-fees-BTC'][-20:],\n", " ],\n", " line = dict(color='#506784'),\n", " align = ['left']*5,\n", " font = dict(color=['rgb(40,40,40)']*5, size=12),\n", " format = [None]+ [\",.2f\"]*2+[',.4f'], \n", " prefix = [None]*2+['$', u'\\u20BF'],\n", " suffix=[None]*4,\n", " height = 27,\n", " fill = dict( color = ['rgb(235,193, 238', 'rgba(228, 222,249, 0.65)'] )\n", " )\n", " )\n" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": true }, "outputs": [], "source": [ "trace1=dict(type='scatter',\n", " x=df['Date'],\n", " y=df['Hash-rate'],\n", " xaxis='x1',\n", " yaxis='y1',\n", " mode='lines',\n", " line=dict(width=2, color='#9748a1'),\n", " name='hash-rate-TH/s')\n", "\n", "trace2=dict(type='scatter',\n", " x=df['Date'],\n", " y=df['Mining-revenue-USD'],\n", " xaxis='x2',\n", " yaxis='y2',\n", " mode='lines',\n", " line=dict(width=2, color='#b04553'),\n", " name='mining revenue')\n", "\n", "trace3=dict(type='scatter',\n", " x=df['Date'],\n", " y=df['Transaction-fees-BTC'],\n", " xaxis='x3',\n", " yaxis='y3',\n", " mode='lines',\n", " line=dict(width=2, color='#af7bbd'),\n", " name='transact-fee')" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": true }, "outputs": [], "source": [ "axis=dict(showline=True, zeroline=False, showgrid=True, mirror=True, \n", " ticklen=4, gridcolor='#ffffff', tickfont=dict(size=10))" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": true }, "outputs": [], "source": [ "layout1 = dict(width=950, height=800, autosize=False, title='Bitcoin mining stats for 180 days',\n", " margin = dict(t=100,l=0,r=0,b=100),\n", " showlegend=False, \n", " xaxis1=dict(axis, **dict(domain=[0.55,0.98], anchor= 'y1', showticklabels=False)),\n", " xaxis2=dict(axis, **dict(domain=[0.55,0.98], anchor= 'y2', showticklabels=False)), \n", " xaxis3=dict(axis, **dict(domain=[0.55,0.98], anchor= 'y3')), \n", " yaxis1=dict(axis, **dict(domain=[0.68,1], anchor= 'x1', hoverformat='.2f')), \n", " yaxis2=dict(axis, **dict(domain=[0.34,0.66], anchor= 'x2', tickprefix='$', hoverformat='.2f')),\n", " yaxis3=dict(axis, **dict(domain=[0.0,0.32], anchor= 'x3', tickprefix=u'\\u20BF', hoverformat='.2f')), \n", " plot_bgcolor='rgba(228, 222,249, 0.65)' ,\n", " annotations=[dict(showarrow=False, \n", " text='The last 20 records', \n", " xref='paper', \n", " yref='paper', \n", " x=0.2, \n", " y=1.01, \n", " xanchor='left', \n", " yanchor='bottom', \n", " font=dict(\n", " size=15 ))] \n", ")\n", "\n", "fig1 = dict(data=[table_trace1, trace1, trace2, trace3], layout=layout1)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "cells": { "align": [ "left", "left", "left", "left", "left" ], "fill": { "color": [ "rgb(235,193, 238", "rgba(228, 222,249, 0.65)" ] }, "font": { "color": [ "rgb(40,40,40)", "rgb(40,40,40)", "rgb(40,40,40)", "rgb(40,40,40)", "rgb(40,40,40)" ], "size": 12 }, "format": [ null, ",.2f", ",.2f", ",.4f" ], "height": 27, "line": { "color": "#506784" }, "prefix": [ null, null, "$", "₿" ], "suffix": [ null, null, null, null ], "values": [ [ "2017-10-05", "2017-10-06", "2017-10-07", "2017-10-08", "2017-10-09", "2017-10-10", "2017-10-11", "2017-10-12", "2017-10-13", "2017-10-14", "2017-10-15", "2017-10-16", "2017-10-17", "2017-10-18", "2017-10-19", "2017-10-20", "2017-10-21", "2017-10-22", "2017-10-23", "2017-10-24" ], [ 6983443.366344132, 8882939.961989732, 8827072.415058982, 10167893.541397054, 8994675.05585124, 8938807.508920489, 7765589.023374672, 8547734.680405214, 7597986.382582414, 7877324.117236177, 11601113.065304575, 10351762.427502545, 9756833.55235872, 8983426.014671747, 10589733.977560073, 10649226.865074456, 9102411.789700512, 10827705.527617602, 10173283.7649594, 9935312.214901865 ], [ 7204663.745999998, 8954115.668333333, 8787392.866666667, 10645075.68315, 9983563.752925, 10009312.04, 8773873.838216666, 10754101.414991666, 10610179.122633332, 11022592.087366667, 14217107.120833335, 13050105.405333335, 12204886.78332, 11106217.64025, 13368296.589000002, 13875336.558720002, 12037733.180825, 14108349.168900002, 13224117.739933334, 12165126.45045 ], [ 160.34424031, 149.02120217, 108.21556432, 111.79647505, 149.34098656, 167.25820990000003, 148.17289183, 174.41451469999998, 281.53458216, 227.59563891, 162.70732819999998, 193.41946089, 209.13726138, 192.2026716, 191.51239568, 161.97244556, 167.76730117, 155.33193023, 185.64433949, 199.79056912 ] ] }, "columnorder": [ 0, 1, 2, 3, 4 ], "columnwidth": [ 30, 33, 35, 33 ], "domain": { "x": [ 0, 0.5 ], "y": [ 0, 1 ] }, "header": { "align": [ "left", "left", "left", "left", "left" ], "fill": { "color": "#d562be" }, "font": { "color": [ "rgb(45,45,45)", "rgb(45,45,45)", "rgb(45,45,45)", "rgb(45,45,45)", "rgb(45,45,45)" ], "size": 14 }, "height": 50, "line": { "color": "rgb(50,50,50)" }, "values": [ [ "Date" ], [ "Hash Rate, TH/sec" ], [ "Mining revenue" ], [ "Transaction fees" ] ] }, "type": "table" }, { "line": { "color": "#9748a1", "width": 2 }, "mode": "lines", "name": "hash-rate-TH/s", "type": "scatter", "x": [ "2017-04-29", "2017-04-30", "2017-05-01", "2017-05-02", "2017-05-03", "2017-05-04", "2017-05-05", "2017-05-06", "2017-05-07", "2017-05-08", "2017-05-09", "2017-05-10", "2017-05-11", "2017-05-12", "2017-05-13", "2017-05-14", "2017-05-15", "2017-05-16", "2017-05-17", "2017-05-18", "2017-05-19", "2017-05-20", "2017-05-21", "2017-05-22", "2017-05-23", "2017-05-24", "2017-05-25", "2017-05-26", "2017-05-27", "2017-05-28", "2017-05-29", "2017-05-30", "2017-05-31", "2017-06-01", "2017-06-02", "2017-06-03", "2017-06-04", "2017-06-05", "2017-06-06", "2017-06-07", "2017-06-08", "2017-06-09", "2017-06-10", "2017-06-11", "2017-06-12", "2017-06-13", "2017-06-14", "2017-06-15", "2017-06-16", "2017-06-17", "2017-06-18", "2017-06-19", "2017-06-20", "2017-06-21", "2017-06-22", "2017-06-23", "2017-06-24", "2017-06-25", "2017-06-26", "2017-06-27", "2017-06-28", "2017-06-29", "2017-06-30", "2017-07-01", "2017-07-02", "2017-07-03", "2017-07-04", "2017-07-05", "2017-07-06", "2017-07-07", "2017-07-08", "2017-07-09", "2017-07-10", "2017-07-11", "2017-07-12", "2017-07-13", "2017-07-14", "2017-07-15", "2017-07-16", "2017-07-17", "2017-07-18", "2017-07-19", "2017-07-20", "2017-07-21", "2017-07-22", "2017-07-23", "2017-07-24", "2017-07-25", "2017-07-26", "2017-07-27", "2017-07-28", "2017-07-29", "2017-07-30", "2017-07-31", "2017-08-01", "2017-08-02", "2017-08-03", "2017-08-04", "2017-08-05", "2017-08-06", "2017-08-07", "2017-08-08", "2017-08-09", "2017-08-10", "2017-08-11", "2017-08-12", "2017-08-13", "2017-08-14", "2017-08-15", "2017-08-16", "2017-08-17", "2017-08-18", "2017-08-19", "2017-08-20", "2017-08-21", "2017-08-22", "2017-08-23", "2017-08-24", "2017-08-25", "2017-08-26", "2017-08-27", "2017-08-28", "2017-08-29", "2017-08-30", "2017-08-31", "2017-09-01", "2017-09-02", "2017-09-03", "2017-09-04", "2017-09-05", "2017-09-06", "2017-09-07", "2017-09-08", "2017-09-09", "2017-09-10", "2017-09-11", "2017-09-12", "2017-09-13", "2017-09-14", "2017-09-15", "2017-09-16", "2017-09-17", "2017-09-18", "2017-09-19", "2017-09-20", "2017-09-21", "2017-09-22", "2017-09-23", "2017-09-24", "2017-09-25", "2017-09-26", "2017-09-27", "2017-09-28", "2017-09-29", "2017-09-30", "2017-10-01", "2017-10-02", "2017-10-03", "2017-10-04", "2017-10-05", "2017-10-06", "2017-10-07", "2017-10-08", "2017-10-09", "2017-10-10", "2017-10-11", "2017-10-12", "2017-10-13", "2017-10-14", "2017-10-15", "2017-10-16", "2017-10-17", "2017-10-18", "2017-10-19", "2017-10-20", "2017-10-21", "2017-10-22", "2017-10-23", "2017-10-24" ], "xaxis": "x1", "y": [ 4488916.480472251, 3918071.610123178, 3892124.116016402, 4099704.0688706087, 3425069.2220944343, 4359179.00993837, 3347226.7397741056, 4359179.00993837, 4333231.515831593, 4670548.939219682, 4021861.586550282, 4119773.00240534, 3757901.0494913575, 4286790.826827179, 4398136.043108403, 4565153.867530242, 4732171.69195208, 3674392.1372804386, 4314627.130897485, 3952755.177983502, 4565153.867530242, 4592990.171600549, 4091936.698335034, 4064100.3942647283, 4976737.781652192, 4562009.633181176, 4828620.585769686, 4532386.194004675, 4976737.781652192, 4887867.464122688, 4473139.315651673, 5302595.612593705, 4858244.024946185, 5035984.660005195, 4325022.119769167, 5687700.321888219, 5432357.041848144, 5533581.086106182, 5094943.560988008, 5567322.4341921965, 5567322.4341921965, 5094943.560988008, 4757530.080127876, 4926236.820557944, 4959978.168643956, 4757530.080127876, 4723788.732041863, 5162426.257160036, 4993719.5167299695, 5129905.644295609, 5129905.644295609, 5342177.601990599, 4882255.026984787, 4953012.346216449, 4917633.686600618, 5660585.538533085, 5165284.303911441, 4316196.473131477, 5023769.6654481115, 4634604.409673964, 5554449.55968559, 4245439.153899814, 5448313.5808380935, 5802100.176996413, 6622798.79067395, 5988701.034120061, 5389830.9307080535, 5248920.318140525, 5002326.746147344, 5213692.664998642, 5812562.768410647, 4861416.133579817, 6939847.668950894, 6094383.993545709, 6235294.606113241, 5530741.543275587, 5559049.844066968, 5079131.871917302, 6518885.788366299, 5918988.323179216, 6598872.117057911, 5958981.4875250235, 6478892.624020495, 6158947.30925405, 6398906.295328883, 6878824.267478547, 7118783.253553381, 5918988.323179216, 5878995.158833412, 6585327.485297888, 6414280.0181472935, 6713613.085660834, 6285994.417784347, 6200470.6842090525, 6371518.151359645, 6499803.751722589, 5901137.61669551, 7654374.154989103, 7568850.421413807, 5986661.350270805, 6542565.61851024, 7012946.153174372, 6333394.737368573, 6149818.078314411, 6608759.725949816, 6195712.243077952, 6792336.385003977, 5966241.41926025, 6975913.0440581385, 5966241.41926025, 8215055.49267373, 6838230.5497675175, 6930018.8792945985, 5966241.41926025, 5277828.947807143, 4084580.6639550943, 7297172.1974029215, 4459277.507650397, 4459277.507650397, 4635882.557458333, 6843445.680057538, 5695512.856305951, 6578538.105345633, 7417412.091933332, 7196655.779673412, 7682319.666645237, 7240807.042125395, 6799294.417605555, 7726470.929097221, 8697798.703040872, 7430760.765994303, 8072925.276635787, 8027056.383018538, 7751843.021315045, 6329907.319180332, 7981187.489401288, 8623352.000042772, 8715089.78727727, 7981187.489401288, 8256400.851104781, 7751843.021315045, 8072925.276635787, 6965995.451677618, 8556655.830407152, 6417491.8728053635, 9653662.988151658, 7624199.746324318, 9105159.409279406, 7953301.893647673, 6856294.735903166, 7569349.388437095, 8063002.609422122, 9708513.346038884, 9269710.48294108, 7569349.388437095, 7130546.525339292, 8380132.039612957, 10223761.08832781, 7486251.288720908, 6983443.366344132, 8882939.961989732, 8827072.415058982, 10167893.541397054, 8994675.05585124, 8938807.508920489, 7765589.023374672, 8547734.680405214, 7597986.382582414, 7877324.117236177, 11601113.065304575, 10351762.427502545, 9756833.55235872, 8983426.014671747, 10589733.977560073, 10649226.865074456, 9102411.789700512, 10827705.527617602, 10173283.7649594, 9935312.214901865 ], "yaxis": "y1" }, { "line": { "color": "#b04553", "width": 2 }, "mode": "lines", "name": "mining revenue", "type": "scatter", "x": [ "2017-04-29", "2017-04-30", "2017-05-01", "2017-05-02", "2017-05-03", "2017-05-04", "2017-05-05", "2017-05-06", "2017-05-07", "2017-05-08", "2017-05-09", "2017-05-10", "2017-05-11", "2017-05-12", "2017-05-13", "2017-05-14", "2017-05-15", "2017-05-16", "2017-05-17", "2017-05-18", "2017-05-19", "2017-05-20", "2017-05-21", "2017-05-22", "2017-05-23", "2017-05-24", "2017-05-25", "2017-05-26", "2017-05-27", "2017-05-28", "2017-05-29", "2017-05-30", "2017-05-31", "2017-06-01", "2017-06-02", "2017-06-03", "2017-06-04", "2017-06-05", "2017-06-06", "2017-06-07", "2017-06-08", "2017-06-09", "2017-06-10", "2017-06-11", "2017-06-12", "2017-06-13", "2017-06-14", "2017-06-15", "2017-06-16", "2017-06-17", "2017-06-18", "2017-06-19", "2017-06-20", "2017-06-21", "2017-06-22", "2017-06-23", "2017-06-24", "2017-06-25", "2017-06-26", "2017-06-27", "2017-06-28", "2017-06-29", "2017-06-30", "2017-07-01", "2017-07-02", "2017-07-03", "2017-07-04", "2017-07-05", "2017-07-06", "2017-07-07", "2017-07-08", "2017-07-09", "2017-07-10", "2017-07-11", "2017-07-12", "2017-07-13", "2017-07-14", "2017-07-15", "2017-07-16", "2017-07-17", "2017-07-18", "2017-07-19", "2017-07-20", "2017-07-21", "2017-07-22", "2017-07-23", "2017-07-24", "2017-07-25", "2017-07-26", "2017-07-27", "2017-07-28", "2017-07-29", "2017-07-30", "2017-07-31", "2017-08-01", "2017-08-02", "2017-08-03", "2017-08-04", "2017-08-05", "2017-08-06", "2017-08-07", "2017-08-08", "2017-08-09", "2017-08-10", "2017-08-11", "2017-08-12", "2017-08-13", "2017-08-14", "2017-08-15", "2017-08-16", "2017-08-17", "2017-08-18", "2017-08-19", "2017-08-20", "2017-08-21", "2017-08-22", "2017-08-23", "2017-08-24", "2017-08-25", "2017-08-26", "2017-08-27", "2017-08-28", "2017-08-29", "2017-08-30", "2017-08-31", "2017-09-01", "2017-09-02", "2017-09-03", "2017-09-04", "2017-09-05", "2017-09-06", "2017-09-07", "2017-09-08", "2017-09-09", "2017-09-10", "2017-09-11", "2017-09-12", "2017-09-13", "2017-09-14", "2017-09-15", "2017-09-16", "2017-09-17", "2017-09-18", "2017-09-19", "2017-09-20", "2017-09-21", "2017-09-22", "2017-09-23", "2017-09-24", "2017-09-25", "2017-09-26", "2017-09-27", "2017-09-28", "2017-09-29", "2017-09-30", "2017-10-01", "2017-10-02", "2017-10-03", "2017-10-04", "2017-10-05", "2017-10-06", "2017-10-07", "2017-10-08", "2017-10-09", "2017-10-10", "2017-10-11", "2017-10-12", "2017-10-13", "2017-10-14", "2017-10-15", "2017-10-16", "2017-10-17", "2017-10-18", "2017-10-19", "2017-10-20", "2017-10-21", "2017-10-22", "2017-10-23", "2017-10-24" ], "xaxis": "x2", "y": [ 3119178.52111875, 2720215.54725, 2878277.9821875, 3149553.4675875, 2760373.225428572, 3500746.022125, 2779169.8169642854, 3610789.2028, 3505619.688214285, 4062173.2011, 3715393.610828572, 3665040.51375, 3468076.5262812492, 3731717.8665, 3885820.5874125, 4018027.923, 4090703.349625, 3356331.71175, 4241263.69915625, 3986174.9808625, 4746879.57975, 4862316.831693751, 4331490.18988125, 4499105.2965, 5668946.092425, 5524488.081, 5871333.859714285, 5119620.435857143, 5121736.6836375, 5262057.4295999985, 5260813.81305, 6132063.831414285, 5808558.0762, 6245228.673728572, 5437774.586957143, 7190853.406164088, 5967104.608285715, 6586584.0163125, 6705146.001529675, 7060707.825193752, 6905690.49109375, 6408509.0314500015, 5916952.856428573, 6255384.1416, 5779114.42340625, 5967683.913628573, 5217092.61125, 5540766.447125, 5304593.5203428585, 5461151.4595, 5066179.983957529, 5761788.39289375, 5639440.4777500015, 5729387.77125, 5791396.09454375, 6125531.765714286, 5333679.66825, 4323782.377714285, 5067818.1988571435, 4893544.702614286, 5859693.929421429, 4529057.7655, 5463199.2318750005, 5415823.244062499, 6165436.660142858, 5975338.924857142, 5536124.68895625, 5284210.787311146, 5092047.08025, 5027244.05042857, 5589288.0402437495, 4618491.1051875, 6117732.904357143, 5418689.756978571, 5595773.274285715, 4943867.783291667, 4133223.0875833333, 3915180.1334, 4114452.06615, 4307537.8817625, 5135590.6003749985, 4503486.59445, 6303559.8062499985, 5613834.8937125, 5890365.480285713, 5998934.926383334, 6381472.965257144, 4978579.95, 4829127.82765, 5348202.5, 5563273.166666666, 5536229.74975, 5226926.135624999, 5550844.9225, 5102352.597999998, 5295684.411233334, 5009853.065983333, 6553817.395541668, 7255240.305075, 5802571.5594666675, 6700311.56775, 7395323.699, 6117048.548966668, 6163927.560000001, 7130610.586666668, 7067966.946257142, 8147957.339500002, 7782196.464000002, 9146734.444671428, 8320553.070685714, 10849951.008825, 8775119.921633335, 8768358.087964285, 7392849.383266668, 6787387.377, 5749751.915025, 10230714.975, 6929315.6381583335, 7153227.770775, 7319121.6020249985, 9642615.804166667, 8451775.682825001, 10384095.211575, 11046350.7914, 11260486.7325, 12131997.841166666, 10374577.6422, 9700709.885216668, 10527922.270441666, 11928773.77205, 10290919.41095, 11050159.279, 10028960.301525, 9554034.21192, 7845878.46, 9592187.257633332, 10193192.465866668, 9617966.635466667, 7489085.279999998, 8227898.3176666675, 8161423.06774, 8368699.789966666, 6960684.991666667, 8091884.16, 6147321.555833332, 8287404.385249998, 6520223.320874998, 7983281.9066, 6815446.316325001, 6522957.247500001, 7065925.441683332, 8033183.850641668, 9528010.170875, 9047637.343333332, 7690943.393766668, 7369621.813666668, 8729898.6625, 10134350.2293, 7436308, 7204663.745999998, 8954115.668333333, 8787392.866666667, 10645075.68315, 9983563.752925, 10009312.04, 8773873.838216666, 10754101.414991666, 10610179.122633332, 11022592.087366667, 14217107.120833335, 13050105.405333335, 12204886.78332, 11106217.64025, 13368296.589000002, 13875336.558720002, 12037733.180825, 14108349.168900002, 13224117.739933334, 12165126.45045 ], "yaxis": "y2" }, { "line": { "color": "#af7bbd", "width": 2 }, "mode": "lines", "name": "transact-fee", "type": "scatter", "x": [ "2017-04-29", "2017-04-30", "2017-05-01", "2017-05-02", "2017-05-03", "2017-05-04", "2017-05-05", "2017-05-06", "2017-05-07", "2017-05-08", "2017-05-09", "2017-05-10", "2017-05-11", "2017-05-12", "2017-05-13", "2017-05-14", "2017-05-15", "2017-05-16", "2017-05-17", "2017-05-18", "2017-05-19", "2017-05-20", "2017-05-21", "2017-05-22", "2017-05-23", "2017-05-24", "2017-05-25", "2017-05-26", "2017-05-27", "2017-05-28", "2017-05-29", "2017-05-30", "2017-05-31", "2017-06-01", "2017-06-02", "2017-06-03", "2017-06-04", "2017-06-05", "2017-06-06", "2017-06-07", "2017-06-08", "2017-06-09", "2017-06-10", "2017-06-11", "2017-06-12", "2017-06-13", "2017-06-14", "2017-06-15", "2017-06-16", "2017-06-17", "2017-06-18", "2017-06-19", "2017-06-20", "2017-06-21", "2017-06-22", "2017-06-23", "2017-06-24", "2017-06-25", "2017-06-26", "2017-06-27", "2017-06-28", "2017-06-29", "2017-06-30", "2017-07-01", "2017-07-02", "2017-07-03", "2017-07-04", "2017-07-05", "2017-07-06", "2017-07-07", "2017-07-08", "2017-07-09", "2017-07-10", "2017-07-11", "2017-07-12", "2017-07-13", "2017-07-14", "2017-07-15", "2017-07-16", "2017-07-17", "2017-07-18", "2017-07-19", "2017-07-20", "2017-07-21", "2017-07-22", "2017-07-23", "2017-07-24", "2017-07-25", "2017-07-26", "2017-07-27", "2017-07-28", "2017-07-29", "2017-07-30", "2017-07-31", "2017-08-01", "2017-08-02", "2017-08-03", "2017-08-04", "2017-08-05", "2017-08-06", "2017-08-07", "2017-08-08", "2017-08-09", "2017-08-10", "2017-08-11", "2017-08-12", "2017-08-13", "2017-08-14", "2017-08-15", "2017-08-16", "2017-08-17", "2017-08-18", "2017-08-19", "2017-08-20", "2017-08-21", "2017-08-22", "2017-08-23", "2017-08-24", "2017-08-25", "2017-08-26", "2017-08-27", "2017-08-28", "2017-08-29", "2017-08-30", "2017-08-31", "2017-09-01", "2017-09-02", "2017-09-03", "2017-09-04", "2017-09-05", "2017-09-06", "2017-09-07", "2017-09-08", "2017-09-09", "2017-09-10", "2017-09-11", "2017-09-12", "2017-09-13", "2017-09-14", "2017-09-15", "2017-09-16", "2017-09-17", "2017-09-18", "2017-09-19", "2017-09-20", "2017-09-21", "2017-09-22", "2017-09-23", "2017-09-24", "2017-09-25", "2017-09-26", "2017-09-27", "2017-09-28", "2017-09-29", "2017-09-30", "2017-10-01", "2017-10-02", "2017-10-03", "2017-10-04", "2017-10-05", "2017-10-06", "2017-10-07", "2017-10-08", "2017-10-09", "2017-10-10", "2017-10-11", "2017-10-12", "2017-10-13", "2017-10-14", "2017-10-15", "2017-10-16", "2017-10-17", "2017-10-18", "2017-10-19", "2017-10-20", "2017-10-21", "2017-10-22", "2017-10-23", "2017-10-24" ], "xaxis": "x3", "y": [ 256.37648122, 199.30763935, 227.7488656, 272.67966183, 247.34367708, 307.09568071, 261.31168454, 296.57369266, 277.03575031, 316.4495528, 302.96153363, 303.26495895, 279.58022914, 322.05057537, 301.19440047, 297.47622441, 327.30377033, 343.40900559, 485.93611219999997, 392.02141315, 442.811934, 387.7538543, 352.78845637, 406.63804239, 468.38356854, 472.94001691, 498.87943053, 469.79624965, 528.8278222, 421.48503001, 494.90441559, 588.38790095, 570.4198544, 569.07004507, 470.15193004, 545.64725387, 441.99355556, 475.43804182, 511.33813564, 668.13204735, 490.9904414, 455.56014992, 390.90403310000005, 356.12024978, 409.8643713, 479.43977642, 454.74199601, 435.40345777, 375.35139576, 311.39831919, 277.99559460000006, 387.16284645, 388.08537505, 462.70370719, 447.10509654, 338.95972894, 307.20884336, 258.68838592, 375.05657594, 367.89377898, 385.86002411, 341.40053758, 357.17190559, 255.27403629, 197.85958294, 283.21012118, 293.93425872, 225.82080685, 241.52060511, 240.65571245, 192.41183082, 157.22803089, 205.57250621, 207.57617324, 222.35199706, 210.79018124, 215.37764419, 378.35756847, 166.92852306, 198.03657541, 224.51846967, 201.60223858, 229.27219537, 249.73969757, 171.03691992, 125.37693822, 166.96352984, 168.49293292, 167.53481996, 166.27056958, 188.43132327, 156.46665323, 138.11682207, 194.86886623, 75.94662047, 130.51485681, 124.10595421, 113.47123621, 113.56678695, 87.90639938, 121.82649183, 159.06311046, 157.95191308, 193.18600285, 234.94470226, 210.75240215, 189.71104645, 249.18827382, 350.45038263, 347.52500864, 365.31634907, 337.96192313, 265.91179874, 208.98199629, 297.96496476, 334.18474511, 541.97068152, 385.99923422, 425.81587924, 425.31312205, 358.84272769999995, 378.17846684, 461.76014165, 388.49753062, 413.21489691, 382.74200641, 290.49925993, 239.13526989, 325.4016802, 281.90480312, 272.59987797, 257.33579475, 217.76572461, 144.85041627, 143.23841995, 159.73383041, 148.9079562, 133.73148672, 153.73503588, 12.81949192, 119.91780546, 99.41066001, 168.30810036, 173.70341529, 146.40700953, 136.34884416, 117.16416809999998, 99.69585805, 83.67519444, 147.37049675, 150.08561133, 143.49865258, 134.45160224, 115.33216245, 101.44145793, 119.05349794, 180.47323995, 152.53441884, 136.73283395, 160.34424031, 149.02120217, 108.21556432, 111.79647505, 149.34098656, 167.25820990000003, 148.17289183, 174.41451469999998, 281.53458216, 227.59563891, 162.70732819999998, 193.41946089, 209.13726138, 192.2026716, 191.51239568, 161.97244556, 167.76730117, 155.33193023, 185.64433949, 199.79056912 ], "yaxis": "y3" } ], "layout": { "annotations": [ { "font": { "size": 15 }, "showarrow": false, "text": "The last 20 records", "x": 0.2, "xanchor": "left", "xref": "paper", "y": 1.01, "yanchor": "bottom", "yref": "paper" } ], "autosize": false, "height": 800, "margin": { "b": 100, "l": 0, "r": 0, "t": 100 }, "plot_bgcolor": "rgba(228, 222,249, 0.65)", "showlegend": false, "title": "Bitcoin mining stats for 180 days", "width": 950, "xaxis1": { "anchor": "y1", "domain": [ 0.55, 0.98 ], "gridcolor": "#ffffff", "mirror": true, "showgrid": true, "showline": true, "showticklabels": false, "tickfont": { "size": 10 }, "ticklen": 4, "zeroline": false }, "xaxis2": { "anchor": "y2", "domain": [ 0.55, 0.98 ], "gridcolor": "#ffffff", "mirror": true, "showgrid": true, "showline": true, "showticklabels": false, "tickfont": { "size": 10 }, "ticklen": 4, "zeroline": false }, "xaxis3": { "anchor": "y3", "domain": [ 0.55, 0.98 ], "gridcolor": "#ffffff", "mirror": true, "showgrid": true, "showline": true, "tickfont": { "size": 10 }, "ticklen": 4, "zeroline": false }, "yaxis1": { "anchor": "x1", "domain": [ 0.68, 1 ], "gridcolor": "#ffffff", "hoverformat": ".2f", "mirror": true, "showgrid": true, "showline": true, "tickfont": { "size": 10 }, "ticklen": 4, "zeroline": false }, "yaxis2": { "anchor": "x2", "domain": [ 0.34, 0.66 ], "gridcolor": "#ffffff", "hoverformat": ".2f", "mirror": true, "showgrid": true, "showline": true, "tickfont": { "size": 10 }, "ticklen": 4, "tickprefix": "$", "zeroline": false }, "yaxis3": { "anchor": "x3", "domain": [ 0, 0.32 ], "gridcolor": "#ffffff", "hoverformat": ".2f", "mirror": true, "showgrid": true, "showline": true, "tickfont": { "size": 10 }, "ticklen": 4, "tickprefix": "₿", "zeroline": false } } }, "text/html": [ "
" ], "text/vnd.plotly.v1+html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "iplot(fig1)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Index([u'Date', u'Number-transactions', u'Output-volume(BTC)', u'Market-price',\n", " u'Hash-rate', u'Cost-per-trans-USD', u'Mining-revenue-USD',\n", " u'Transaction-fees-BTC'],\n", " dtype='object')" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.columns" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": true }, "outputs": [], "source": [ "table_trace2=dict(type = 'table',\n", " domain=dict(x= [0.1, 0.9],\n", " y= [0.4, 1]),\n", " \n", " columnwidth= [30]+[ 33, 35, 33],\n", " columnorder=[0, 1, 2, 3, 4],\n", " header = dict(height = 50,\n", " values = [['Date'],['Nr-transactions'], \n", " ['Output-volume'],\n", " ['Cost-per-trans']],\n", " line = dict(color='rgb(50,50,50)'),\n", " align = ['left']*4,\n", " font = dict(color=['rgb(45,45,45)']*4, size=14),\n", " fill = dict( color = '#d562be' )#fill color for header\n", " ),\n", " cells = dict(values = [df['Date'][-60:-44], \n", " df['Number-transactions'][-60:-44],\n", " df['Output-volume(BTC)'][-60:-44],\n", " df['Cost-per-trans-USD'][-60:-44]\n", " ],\n", " line = dict(color='#506784'),\n", " align = ['left']*4,\n", " font = dict(color=['rgb(40,40,40)']*4, size=12),\n", " format = [None]+ ['d']+[\",.2f\"]*2, \n", " prefix = [None]*2+[ u'\\u20BF', '$'],\n", " suffix=[None]*4,\n", " height = 27,\n", " fill = dict( color = ['rgb(235,193, 238', 'rgba(228, 222,249, 0.65)'] )\n", " )\n", " )\n" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": true }, "outputs": [], "source": [ "trace4=dict(type='scatter',\n", " x=df['Date'],\n", " y=df['Number-transactions'],\n", " xaxis='x1',\n", " yaxis='y1',\n", " mode='lines',\n", " line=dict(width=2, color='#af7bbd'),\n", " name='nr-transac')\n", "\n", "trace5=dict(type='scatter',\n", " x=df['Date'],\n", " y=df['Output-volume(BTC)'],\n", " xaxis='x2',\n", " yaxis='y2',\n", " mode='lines',\n", " line=dict(width=2, color='#b04553'),\n", " name='ouput-vol')\n", "\n", "trace6=dict(type='scatter',\n", " x=df['Date'],\n", " y= df['Cost-per-trans-USD'],\n", " xaxis='x3',\n", " yaxis='y3',\n", " mode='lines',\n", " line=dict(width=2, color='#9748a1'),\n", " name='cost-transac')" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": true }, "outputs": [], "source": [ "layout2 = dict(width=800, height=1000, autosize=False, title='Bitcoin transaction summary for 180 days',\n", " margin = dict(t=100, l=60,r=0),\n", " showlegend=False, \n", " xaxis1=dict(axis, **dict(domain=[0.1,0.9], anchor= 'y1', showgrid=False, showticklabels=False)),\n", " xaxis2=dict(axis, **dict(domain=[0.1,0.9], anchor= 'y2', showgrid=False, showticklabels=False)),\n", " xaxis3=dict(axis, **dict(domain=[0.1,0.9], anchor= 'y3',showgrid=False, showticklabels=True)), \n", " yaxis1=dict(axis, **dict(domain=[0.28, 0.398], anchor= 'x1', showgrid=False, hoverformat='d')), \n", " yaxis2=dict(axis, **dict(domain=[0.14, 0.26], anchor= 'x2', showgrid=False, tickprefix= u'\\u20BF', hoverformat='.2f')), \n", " yaxis3=dict(axis, **dict(domain=[0, 0.12], anchor= 'x3', showgrid=False, tickprefix='S', hoverformat='.2f')), \n", " plot_bgcolor='rgba(228, 222,249, 0.65)', \n", " annotations=[dict(showarrow=False, \n", " text='16 records around the date of september 3, 2017', \n", " xref='paper', \n", " yref='paper', \n", " x=0.2, \n", " y=1.01, \n", " xanchor='left', \n", " yanchor='bottom', \n", " font=dict(\n", " size=15 ))], \n", " \n", " shapes=[dict(type='rect',\n", " xref='x3',\n", " yref='y3',\n", " x0=df['Date'].iloc[-60],\n", " y0=8,\n", " x1=df['Date'].iloc[-43],\n", " y1=53,\n", " layer='below',\n", " line=dict(color='rgba(235,193, 238, 0.9)', width=0.5),\n", " fillcolor= 'rgba(235,193, 238, 0.9)'\n", " ),\n", " dict(type='rect',\n", " xref='x2',\n", " yref='y2',\n", " x0=df['Date'].iloc[-60],\n", " y0=3327226,\n", " x1=df['Date'].iloc[-43],\n", " y1=11801113,\n", " layer='below',\n", " line=dict(color='rgba(235,193, 238, 0.9)', width=0.5),\n", " fillcolor= 'rgba(235,193, 238, 0.9)'\n", " ),\n", " dict(type='rect',\n", " xref='x1',\n", " yref='y1',\n", " x0=df['Date'].iloc[-60],\n", " y0=130875,\n", " x1=df['Date'].iloc[-43],\n", " y1=375098,\n", " layer='below',\n", " line=dict(color='rgba(235,193, 238, 1)', width=0.5),\n", " fillcolor= 'rgba(235,193, 238, 1)'\n", " )] \n", ")\n", "\n", "fig2 = dict(data=[table_trace2, trace4, trace5, trace6], layout=layout2)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "cells": { "align": [ "left", "left", "left", "left" ], "fill": { "color": [ "rgb(235,193, 238", "rgba(228, 222,249, 0.65)" ] }, "font": { "color": [ "rgb(40,40,40)", "rgb(40,40,40)", "rgb(40,40,40)", "rgb(40,40,40)" ], "size": 12 }, "format": [ null, "d", ",.2f", ",.2f" ], "height": 27, "line": { "color": "#506784" }, "prefix": [ null, null, "₿", "$" ], "suffix": [ null, null, null, null ], "values": [ [ "2017-08-26", "2017-08-27", "2017-08-28", "2017-08-29", "2017-08-30", "2017-08-31", "2017-09-01", "2017-09-02", "2017-09-03", "2017-09-04", "2017-09-05", "2017-09-06", "2017-09-07", "2017-09-08", "2017-09-09", "2017-09-10" ], [ 226485, 261891, 223771, 281116, 271466, 280724, 283670, 236811, 195289, 269280, 277948, 276225, 256374, 279488, 217890, 193240 ], [ 4635882.557458333, 6843445.680057538, 5695512.856305951, 6578538.105345633, 7417412.091933332, 7196655.779673412, 7682319.666645237, 7240807.042125395, 6799294.417605555, 7726470.929097221, 8697798.703040872, 7430760.765994303, 8072925.276635787, 8027056.383018538, 7751843.021315045, 6329907.319180332 ], [ 33.458097713213235, 38.17994614329438, 39.06855626073008, 38.09870983771162, 42.121723965262326, 41.45217103926772, 44.287248440770206, 45.269829134341876, 51.50954206341874, 40.53881446414757, 44.32075464503245, 38.610008866148206, 44.61473840712141, 37.098192635561965, 45.33099776899427, 41.861872736776036 ] ] }, "columnorder": [ 0, 1, 2, 3, 4 ], "columnwidth": [ 30, 33, 35, 33 ], "domain": { "x": [ 0.1, 0.9 ], "y": [ 0.4, 1 ] }, "header": { "align": [ "left", "left", "left", "left" ], "fill": { "color": "#d562be" }, "font": { "color": [ "rgb(45,45,45)", "rgb(45,45,45)", "rgb(45,45,45)", "rgb(45,45,45)" ], "size": 14 }, "height": 50, "line": { "color": "rgb(50,50,50)" }, "values": [ [ "Date" ], [ "Nr-transactions" ], [ "Output-volume" ], [ "Cost-per-trans" ] ] }, "type": "table" }, { "line": { "color": "#af7bbd", "width": 2 }, "mode": "lines", "name": "nr-transac", "type": "scatter", "x": [ "2017-04-29", "2017-04-30", "2017-05-01", "2017-05-02", "2017-05-03", "2017-05-04", "2017-05-05", "2017-05-06", "2017-05-07", "2017-05-08", "2017-05-09", "2017-05-10", "2017-05-11", "2017-05-12", "2017-05-13", "2017-05-14", "2017-05-15", "2017-05-16", "2017-05-17", "2017-05-18", "2017-05-19", "2017-05-20", "2017-05-21", "2017-05-22", "2017-05-23", "2017-05-24", "2017-05-25", "2017-05-26", "2017-05-27", "2017-05-28", "2017-05-29", "2017-05-30", "2017-05-31", "2017-06-01", "2017-06-02", "2017-06-03", "2017-06-04", "2017-06-05", "2017-06-06", "2017-06-07", "2017-06-08", "2017-06-09", "2017-06-10", "2017-06-11", "2017-06-12", "2017-06-13", "2017-06-14", "2017-06-15", "2017-06-16", "2017-06-17", "2017-06-18", "2017-06-19", "2017-06-20", "2017-06-21", "2017-06-22", "2017-06-23", "2017-06-24", "2017-06-25", "2017-06-26", "2017-06-27", "2017-06-28", "2017-06-29", "2017-06-30", "2017-07-01", "2017-07-02", "2017-07-03", "2017-07-04", "2017-07-05", "2017-07-06", "2017-07-07", "2017-07-08", "2017-07-09", "2017-07-10", "2017-07-11", "2017-07-12", "2017-07-13", "2017-07-14", "2017-07-15", "2017-07-16", "2017-07-17", "2017-07-18", "2017-07-19", "2017-07-20", "2017-07-21", "2017-07-22", "2017-07-23", "2017-07-24", "2017-07-25", "2017-07-26", "2017-07-27", "2017-07-28", "2017-07-29", "2017-07-30", "2017-07-31", "2017-08-01", "2017-08-02", "2017-08-03", "2017-08-04", "2017-08-05", "2017-08-06", "2017-08-07", "2017-08-08", "2017-08-09", "2017-08-10", "2017-08-11", "2017-08-12", "2017-08-13", "2017-08-14", "2017-08-15", "2017-08-16", "2017-08-17", "2017-08-18", "2017-08-19", "2017-08-20", "2017-08-21", "2017-08-22", "2017-08-23", "2017-08-24", "2017-08-25", "2017-08-26", "2017-08-27", "2017-08-28", "2017-08-29", "2017-08-30", "2017-08-31", "2017-09-01", "2017-09-02", "2017-09-03", "2017-09-04", "2017-09-05", "2017-09-06", "2017-09-07", "2017-09-08", "2017-09-09", "2017-09-10", "2017-09-11", "2017-09-12", "2017-09-13", "2017-09-14", "2017-09-15", "2017-09-16", "2017-09-17", "2017-09-18", "2017-09-19", "2017-09-20", "2017-09-21", "2017-09-22", "2017-09-23", "2017-09-24", "2017-09-25", "2017-09-26", "2017-09-27", "2017-09-28", "2017-09-29", "2017-09-30", "2017-10-01", "2017-10-02", "2017-10-03", "2017-10-04", "2017-10-05", "2017-10-06", "2017-10-07", "2017-10-08", "2017-10-09", "2017-10-10", "2017-10-11", "2017-10-12", "2017-10-13", "2017-10-14", "2017-10-15", "2017-10-16", "2017-10-17", "2017-10-18", "2017-10-19", "2017-10-20", "2017-10-21", "2017-10-22", "2017-10-23", "2017-10-24" ], "xaxis": "x1", "y": [ 341319, 281489, 294786, 333161, 295149, 354737, 267193, 363022, 316011, 365096, 332879, 311391, 294743, 317698, 329266, 369098, 329229, 233977, 317527, 288904, 319502, 352805, 326057, 327868, 367710, 338642, 350114, 333340, 331914, 308143, 321638, 347961, 321634, 319709, 271539, 305320, 266044, 289930, 297416, 339720, 307377, 282184, 254993, 222892, 269098, 291776, 287644, 293141, 269937, 236554, 209359, 269774, 269438, 280203, 269685, 259938, 227127, 180719, 261906, 259737, 279811, 231054, 267360, 221856, 196539, 253244, 255483, 237008, 225106, 243614, 220835, 188124, 251722, 265759, 257138, 245895, 227903, 221851, 203165, 230315, 260575, 253768, 230199, 268443, 223358, 181031, 240072, 244036, 237853, 225369, 247207, 211134, 184145, 231012, 131875, 209321, 213017, 235792, 239771, 199627, 249002, 275574, 260955, 257965, 284001, 260521, 263310, 255362, 311002, 274866, 347319, 312250, 266832, 210852, 236772, 196283, 315734, 203805, 208169, 226485, 261891, 223771, 281116, 271466, 280724, 283670, 236811, 195289, 269280, 277948, 276225, 256374, 279488, 217890, 193240, 253492, 256230, 263320, 268068, 292079, 228257, 197683, 218204, 282917, 235723, 255257, 227615, 203861, 185277, 226603, 263648, 257961, 275976, 254438, 212678, 203653, 295002, 282132, 232826, 273243, 283699, 231226, 238385, 296946, 303101, 292459, 293164, 309819, 293140, 283473, 314725, 334438, 329579, 356985, 312409, 312257, 289131, 316096, 347220 ], "yaxis": "y1" }, { "line": { "color": "#b04553", "width": 2 }, "mode": "lines", "name": "ouput-vol", "type": "scatter", "x": [ "2017-04-29", "2017-04-30", "2017-05-01", "2017-05-02", "2017-05-03", "2017-05-04", "2017-05-05", "2017-05-06", "2017-05-07", "2017-05-08", "2017-05-09", "2017-05-10", "2017-05-11", "2017-05-12", "2017-05-13", "2017-05-14", "2017-05-15", "2017-05-16", "2017-05-17", "2017-05-18", "2017-05-19", "2017-05-20", "2017-05-21", "2017-05-22", "2017-05-23", "2017-05-24", "2017-05-25", "2017-05-26", "2017-05-27", "2017-05-28", "2017-05-29", "2017-05-30", "2017-05-31", "2017-06-01", "2017-06-02", "2017-06-03", "2017-06-04", "2017-06-05", "2017-06-06", "2017-06-07", "2017-06-08", "2017-06-09", "2017-06-10", "2017-06-11", "2017-06-12", "2017-06-13", "2017-06-14", "2017-06-15", "2017-06-16", "2017-06-17", "2017-06-18", "2017-06-19", "2017-06-20", "2017-06-21", "2017-06-22", "2017-06-23", "2017-06-24", "2017-06-25", "2017-06-26", "2017-06-27", "2017-06-28", "2017-06-29", "2017-06-30", "2017-07-01", "2017-07-02", "2017-07-03", "2017-07-04", "2017-07-05", "2017-07-06", "2017-07-07", "2017-07-08", "2017-07-09", "2017-07-10", "2017-07-11", "2017-07-12", "2017-07-13", "2017-07-14", "2017-07-15", "2017-07-16", "2017-07-17", "2017-07-18", "2017-07-19", "2017-07-20", "2017-07-21", "2017-07-22", "2017-07-23", "2017-07-24", "2017-07-25", "2017-07-26", "2017-07-27", "2017-07-28", "2017-07-29", "2017-07-30", "2017-07-31", "2017-08-01", "2017-08-02", "2017-08-03", "2017-08-04", "2017-08-05", "2017-08-06", "2017-08-07", "2017-08-08", "2017-08-09", "2017-08-10", "2017-08-11", "2017-08-12", "2017-08-13", "2017-08-14", "2017-08-15", "2017-08-16", "2017-08-17", "2017-08-18", "2017-08-19", "2017-08-20", "2017-08-21", "2017-08-22", "2017-08-23", "2017-08-24", "2017-08-25", "2017-08-26", "2017-08-27", "2017-08-28", "2017-08-29", "2017-08-30", "2017-08-31", "2017-09-01", "2017-09-02", "2017-09-03", "2017-09-04", "2017-09-05", "2017-09-06", "2017-09-07", "2017-09-08", "2017-09-09", "2017-09-10", "2017-09-11", "2017-09-12", "2017-09-13", "2017-09-14", "2017-09-15", "2017-09-16", "2017-09-17", "2017-09-18", "2017-09-19", "2017-09-20", "2017-09-21", "2017-09-22", "2017-09-23", "2017-09-24", "2017-09-25", "2017-09-26", "2017-09-27", "2017-09-28", "2017-09-29", "2017-09-30", "2017-10-01", "2017-10-02", "2017-10-03", "2017-10-04", "2017-10-05", "2017-10-06", "2017-10-07", "2017-10-08", "2017-10-09", "2017-10-10", "2017-10-11", "2017-10-12", "2017-10-13", "2017-10-14", "2017-10-15", "2017-10-16", "2017-10-17", "2017-10-18", "2017-10-19", "2017-10-20", "2017-10-21", "2017-10-22", "2017-10-23", "2017-10-24" ], "xaxis": "x2", "y": [ 4488916.480472251, 3918071.610123178, 3892124.116016402, 4099704.0688706087, 3425069.2220944343, 4359179.00993837, 3347226.7397741056, 4359179.00993837, 4333231.515831593, 4670548.939219682, 4021861.586550282, 4119773.00240534, 3757901.0494913575, 4286790.826827179, 4398136.043108403, 4565153.867530242, 4732171.69195208, 3674392.1372804386, 4314627.130897485, 3952755.177983502, 4565153.867530242, 4592990.171600549, 4091936.698335034, 4064100.3942647283, 4976737.781652192, 4562009.633181176, 4828620.585769686, 4532386.194004675, 4976737.781652192, 4887867.464122688, 4473139.315651673, 5302595.612593705, 4858244.024946185, 5035984.660005195, 4325022.119769167, 5687700.321888219, 5432357.041848144, 5533581.086106182, 5094943.560988008, 5567322.4341921965, 5567322.4341921965, 5094943.560988008, 4757530.080127876, 4926236.820557944, 4959978.168643956, 4757530.080127876, 4723788.732041863, 5162426.257160036, 4993719.5167299695, 5129905.644295609, 5129905.644295609, 5342177.601990599, 4882255.026984787, 4953012.346216449, 4917633.686600618, 5660585.538533085, 5165284.303911441, 4316196.473131477, 5023769.6654481115, 4634604.409673964, 5554449.55968559, 4245439.153899814, 5448313.5808380935, 5802100.176996413, 6622798.79067395, 5988701.034120061, 5389830.9307080535, 5248920.318140525, 5002326.746147344, 5213692.664998642, 5812562.768410647, 4861416.133579817, 6939847.668950894, 6094383.993545709, 6235294.606113241, 5530741.543275587, 5559049.844066968, 5079131.871917302, 6518885.788366299, 5918988.323179216, 6598872.117057911, 5958981.4875250235, 6478892.624020495, 6158947.30925405, 6398906.295328883, 6878824.267478547, 7118783.253553381, 5918988.323179216, 5878995.158833412, 6585327.485297888, 6414280.0181472935, 6713613.085660834, 6285994.417784347, 6200470.6842090525, 6371518.151359645, 6499803.751722589, 5901137.61669551, 7654374.154989103, 7568850.421413807, 5986661.350270805, 6542565.61851024, 7012946.153174372, 6333394.737368573, 6149818.078314411, 6608759.725949816, 6195712.243077952, 6792336.385003977, 5966241.41926025, 6975913.0440581385, 5966241.41926025, 8215055.49267373, 6838230.5497675175, 6930018.8792945985, 5966241.41926025, 5277828.947807143, 4084580.6639550943, 7297172.1974029215, 4459277.507650397, 4459277.507650397, 4635882.557458333, 6843445.680057538, 5695512.856305951, 6578538.105345633, 7417412.091933332, 7196655.779673412, 7682319.666645237, 7240807.042125395, 6799294.417605555, 7726470.929097221, 8697798.703040872, 7430760.765994303, 8072925.276635787, 8027056.383018538, 7751843.021315045, 6329907.319180332, 7981187.489401288, 8623352.000042772, 8715089.78727727, 7981187.489401288, 8256400.851104781, 7751843.021315045, 8072925.276635787, 6965995.451677618, 8556655.830407152, 6417491.8728053635, 9653662.988151658, 7624199.746324318, 9105159.409279406, 7953301.893647673, 6856294.735903166, 7569349.388437095, 8063002.609422122, 9708513.346038884, 9269710.48294108, 7569349.388437095, 7130546.525339292, 8380132.039612957, 10223761.08832781, 7486251.288720908, 6983443.366344132, 8882939.961989732, 8827072.415058982, 10167893.541397054, 8994675.05585124, 8938807.508920489, 7765589.023374672, 8547734.680405214, 7597986.382582414, 7877324.117236177, 11601113.065304575, 10351762.427502545, 9756833.55235872, 8983426.014671747, 10589733.977560073, 10649226.865074456, 9102411.789700512, 10827705.527617602, 10173283.7649594, 9935312.214901865 ], "yaxis": "y2" }, { "line": { "color": "#9748a1", "width": 2 }, "mode": "lines", "name": "cost-transac", "type": "scatter", "x": [ "2017-04-29", "2017-04-30", "2017-05-01", "2017-05-02", "2017-05-03", "2017-05-04", "2017-05-05", "2017-05-06", "2017-05-07", "2017-05-08", "2017-05-09", "2017-05-10", "2017-05-11", "2017-05-12", "2017-05-13", "2017-05-14", "2017-05-15", "2017-05-16", "2017-05-17", "2017-05-18", "2017-05-19", "2017-05-20", "2017-05-21", "2017-05-22", "2017-05-23", "2017-05-24", "2017-05-25", "2017-05-26", "2017-05-27", "2017-05-28", "2017-05-29", "2017-05-30", "2017-05-31", "2017-06-01", "2017-06-02", "2017-06-03", "2017-06-04", "2017-06-05", "2017-06-06", "2017-06-07", "2017-06-08", "2017-06-09", "2017-06-10", "2017-06-11", "2017-06-12", "2017-06-13", "2017-06-14", "2017-06-15", "2017-06-16", "2017-06-17", "2017-06-18", "2017-06-19", "2017-06-20", "2017-06-21", "2017-06-22", "2017-06-23", "2017-06-24", "2017-06-25", "2017-06-26", "2017-06-27", "2017-06-28", "2017-06-29", "2017-06-30", "2017-07-01", "2017-07-02", "2017-07-03", "2017-07-04", "2017-07-05", "2017-07-06", "2017-07-07", "2017-07-08", "2017-07-09", "2017-07-10", "2017-07-11", "2017-07-12", "2017-07-13", "2017-07-14", "2017-07-15", "2017-07-16", "2017-07-17", "2017-07-18", "2017-07-19", "2017-07-20", "2017-07-21", "2017-07-22", "2017-07-23", "2017-07-24", "2017-07-25", "2017-07-26", "2017-07-27", "2017-07-28", "2017-07-29", "2017-07-30", "2017-07-31", "2017-08-01", "2017-08-02", "2017-08-03", "2017-08-04", "2017-08-05", "2017-08-06", "2017-08-07", "2017-08-08", "2017-08-09", "2017-08-10", "2017-08-11", "2017-08-12", "2017-08-13", "2017-08-14", "2017-08-15", "2017-08-16", "2017-08-17", "2017-08-18", "2017-08-19", "2017-08-20", "2017-08-21", "2017-08-22", "2017-08-23", "2017-08-24", "2017-08-25", "2017-08-26", "2017-08-27", "2017-08-28", "2017-08-29", "2017-08-30", "2017-08-31", "2017-09-01", "2017-09-02", "2017-09-03", "2017-09-04", "2017-09-05", "2017-09-06", "2017-09-07", "2017-09-08", "2017-09-09", "2017-09-10", "2017-09-11", "2017-09-12", "2017-09-13", "2017-09-14", "2017-09-15", "2017-09-16", "2017-09-17", "2017-09-18", "2017-09-19", "2017-09-20", "2017-09-21", "2017-09-22", "2017-09-23", "2017-09-24", "2017-09-25", "2017-09-26", "2017-09-27", "2017-09-28", "2017-09-29", "2017-09-30", "2017-10-01", "2017-10-02", "2017-10-03", "2017-10-04", "2017-10-05", "2017-10-06", "2017-10-07", "2017-10-08", "2017-10-09", "2017-10-10", "2017-10-11", "2017-10-12", "2017-10-13", "2017-10-14", "2017-10-15", "2017-10-16", "2017-10-17", "2017-10-18", "2017-10-19", "2017-10-20", "2017-10-21", "2017-10-22", "2017-10-23", "2017-10-24" ], "xaxis": "x3", "y": [ 9.460795902749226, 10.030445689440537, 10.108887545010742, 9.796471792434774, 9.691347141993157, 10.234634276482037, 10.753205260459044, 10.301408826678076, 11.492055045962275, 11.532765289995872, 11.58520894048927, 12.190336871456687, 12.15307753854808, 12.168796162823545, 12.249167574341815, 11.29743523610853, 12.834928531777079, 14.815994734413913, 13.795124738131163, 14.244708562564842, 15.304134809877553, 14.257593059486315, 13.74759875965593, 14.230121726932945, 15.979215990848546, 16.847184049632062, 17.293969734194107, 15.808436344525175, 15.951717804022527, 17.67793355130363, 16.85804335699401, 18.185208359909858, 18.623984450775087, 20.217534732989808, 20.67573528406808, 24.36791956952601, 23.21394492571157, 23.503688307025342, 23.255651520114323, 21.420341195084493, 23.202441067871753, 23.47752597339146, 24.029041527589776, 28.983124312320765, 22.19549846507592, 21.116423066417607, 18.75615447854181, 19.562967392858504, 20.321044403742448, 23.936005624014978, 25.036832357601146, 22.067623067665533, 21.606099542959214, 21.092662467353406, 22.09261654092718, 24.38868185917385, 24.306402453449834, 24.79694202051549, 20.00147998658284, 19.440384856462266, 21.697969972934477, 20.277883880354086, 21.149025800988845, 25.29215571690425, 32.42452811739726, 24.355834687926656, 22.452112183106426, 23.078139807792763, 23.380335248938646, 21.379083507141644, 26.16151761712561, 25.375709751000247, 25.079705004616727, 21.1347640711734, 22.59076711192395, 20.81224782280423, 18.77400930792129, 18.245092804208355, 20.95451424734256, 19.355250475637586, 20.363282884552685, 18.421187664438392, 28.38112052891225, 21.72929348676221, 27.289932111625554, 34.25740878233777, 27.41783940230287, 21.18276072388709, 21.032398965548875, 24.568153746896197, 23.218258609196912, 27.323471377991627, 29.46023901719244, 24.907735030398573, 39.840690420153386, 26.129551368312946, 24.254494742917146, 28.653818764282146, 31.219582254957352, 29.94537559747408, 27.836771635264128, 27.7150895905198, 24.22518829223939, 24.799581317390928, 26.02790200477275, 28.07294762055028, 31.958246435964927, 31.434330022731924, 30.51495815330809, 31.295026261860762, 32.439567273831116, 29.107689647623825, 34.07811144966283, 36.16574741744309, 29.639221944441218, 30.087317573944112, 33.447185357965644, 35.10713075585617, 35.385739999345454, 33.458097713213235, 38.17994614329438, 39.06855626073008, 38.09870983771162, 42.121723965262326, 41.45217103926772, 44.287248440770206, 45.269829134341876, 51.50954206341874, 40.53881446414757, 44.32075464503245, 38.610008866148206, 44.61473840712141, 37.098192635561965, 45.33099776899427, 41.861872736776036, 39.12612420328312, 41.146564293359354, 37.74026262390203, 28.837976510282182, 29.240311870431047, 36.80932363427589, 43.57345901388625, 32.93742809788972, 29.601050357172326, 27.14850416097636, 33.489630221815496, 29.639284057981147, 40.28476731608439, 37.89792486133181, 29.74920224495791, 27.81041809672668, 32.27331169974026, 35.7345020345698, 36.71849534281647, 37.23138467051693, 37.344572108254205, 30.566308550099677, 37.13090282078224, 32.878150535956856, 27.357210167351127, 32.72649412894403, 39.427013365484335, 46.07969372875811, 34.784798106506216, 34.194659839593314, 31.074351149268303, 37.907425590190684, 35.58489027560897, 38.96442652997817, 51.80098697334852, 42.978889887242744, 37.85322452840667, 34.997367102679696, 38.77164965099941, 45.9255307158648, 40.10793145943285, 50.292512585381075, 43.186189260977116, 36.26930455012873 ], "yaxis": "y3" } ], "layout": { "annotations": [ { "font": { "size": 15 }, "showarrow": false, "text": "16 records around the date of september 3, 2017", "x": 0.2, "xanchor": "left", "xref": "paper", "y": 1.01, "yanchor": "bottom", "yref": "paper" } ], "autosize": false, "height": 1000, "margin": { "l": 60, "r": 0, "t": 100 }, "plot_bgcolor": "rgba(228, 222,249, 0.65)", "shapes": [ { "fillcolor": "rgba(235,193, 238, 0.9)", "layer": "below", "line": { "color": "rgba(235,193, 238, 0.9)", "width": 0.5 }, "type": "rect", "x0": "2017-08-26", "x1": "2017-09-12", "xref": "x3", "y0": 8, "y1": 53, "yref": "y3" }, { "fillcolor": "rgba(235,193, 238, 0.9)", "layer": "below", "line": { "color": "rgba(235,193, 238, 0.9)", "width": 0.5 }, "type": "rect", "x0": "2017-08-26", "x1": "2017-09-12", "xref": "x2", "y0": 3327226, "y1": 11801113, "yref": "y2" }, { "fillcolor": "rgba(235,193, 238, 1)", "layer": "below", "line": { "color": "rgba(235,193, 238, 1)", "width": 0.5 }, "type": "rect", "x0": "2017-08-26", "x1": "2017-09-12", "xref": "x1", "y0": 130875, "y1": 375098, "yref": "y1" } ], "showlegend": false, "title": "Bitcoin transaction summary for 180 days", "width": 800, "xaxis1": { "anchor": "y1", "domain": [ 0.1, 0.9 ], "gridcolor": "#ffffff", "mirror": true, "showgrid": false, "showline": true, "showticklabels": false, "tickfont": { "size": 10 }, "ticklen": 4, "zeroline": false }, "xaxis2": { "anchor": "y2", "domain": [ 0.1, 0.9 ], "gridcolor": "#ffffff", "mirror": true, "showgrid": false, "showline": true, "showticklabels": false, "tickfont": { "size": 10 }, "ticklen": 4, "zeroline": false }, "xaxis3": { "anchor": "y3", "domain": [ 0.1, 0.9 ], "gridcolor": "#ffffff", "mirror": true, "showgrid": false, "showline": true, "showticklabels": true, "tickfont": { "size": 10 }, "ticklen": 4, "zeroline": false }, "yaxis1": { "anchor": "x1", "domain": [ 0.28, 0.398 ], "gridcolor": "#ffffff", "hoverformat": "d", "mirror": true, "showgrid": false, "showline": true, "tickfont": { "size": 10 }, "ticklen": 4, "zeroline": false }, "yaxis2": { "anchor": "x2", "domain": [ 0.14, 0.26 ], "gridcolor": "#ffffff", "hoverformat": ".2f", "mirror": true, "showgrid": false, "showline": true, "tickfont": { "size": 10 }, "ticklen": 4, "tickprefix": "₿", "zeroline": false }, "yaxis3": { "anchor": "x3", "domain": [ 0, 0.12 ], "gridcolor": "#ffffff", "hoverformat": ".2f", "mirror": true, "showgrid": false, "showline": true, "tickfont": { "size": 10 }, "ticklen": 4, "tickprefix": "S", "zeroline": false } } }, "text/html": [ "
" ], "text/vnd.plotly.v1+html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "iplot(fig2)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.12" } }, "nbformat": 4, "nbformat_minor": 2 }