Skip to content

Commit 23fd91c

Browse files
authored
Merge pull request #1202 from plotly/datareader_remove
Datareader remove
2 parents bbf1e55 + 468d3aa commit 23fd91c

14 files changed

+656
-722
lines changed

_posts/python/animations/filled-area-animation/2015-06-30-filled-area-animation.html

Lines changed: 73 additions & 60 deletions
Large diffs are not rendered by default.

_posts/python/animations/filled-area-animation/filled-area-animation.ipynb

Lines changed: 36 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
},
5353
{
5454
"cell_type": "code",
55-
"execution_count": 2,
55+
"execution_count": 1,
5656
"metadata": {
5757
"collapsed": false,
5858
"scrolled": true
@@ -61,13 +61,13 @@
6161
{
6262
"data": {
6363
"text/html": [
64-
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~AdamKulidjian/2193.embed\" height=\"380px\" width=\"100%\"></iframe>"
64+
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~PythonPlotBot/3014.embed\" height=\"380px\" width=\"100%\"></iframe>"
6565
],
6666
"text/plain": [
6767
"<plotly.tools.PlotlyDisplay object>"
6868
]
6969
},
70-
"execution_count": 2,
70+
"execution_count": 1,
7171
"metadata": {},
7272
"output_type": "execute_result"
7373
}
@@ -81,10 +81,10 @@
8181
"from datetime import datetime\n",
8282
"import numpy as np\n",
8383
"import pandas as pd\n",
84-
"import pandas_datareader.data as web\n",
8584
"\n",
86-
"appl = web.get_data_yahoo('AAPL', '2016-01-01', '2016-11-30')\n",
87-
"apple_data_matrix = appl.head(10)\n",
85+
"appl = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv')\n",
86+
"appl.columns = [col.replace('AAPL.', '') for col in appl.columns]\n",
87+
"apple_data_matrix = appl.head(10).round(2)\n",
8888
"\n",
8989
"table = FF.create_table(apple_data_matrix)\n",
9090
"py.iplot(table, filename='apple_data_table')"
@@ -99,18 +99,18 @@
9999
},
100100
{
101101
"cell_type": "code",
102-
"execution_count": 3,
102+
"execution_count": 2,
103103
"metadata": {
104104
"collapsed": false
105105
},
106106
"outputs": [
107107
{
108108
"data": {
109109
"text/plain": [
110-
"u'https://plot.ly/~AdamKulidjian/2201/'"
110+
"'https://plot.ly/~PythonPlotBot/3031/'"
111111
]
112112
},
113-
"execution_count": 3,
113+
"execution_count": 2,
114114
"metadata": {},
115115
"output_type": "execute_result"
116116
}
@@ -120,10 +120,10 @@
120120
" epoch = datetime.utcfromtimestamp(0)\n",
121121
" return (dt - epoch).total_seconds() * 1000\n",
122122
"\n",
123-
"appl_price = list(appl['Adj Close'])\n",
123+
"appl_price = list(appl['Adjusted'])\n",
124124
"my_columns = []\n",
125-
"for k in range(len(appl.index) - 1):\n",
126-
" my_columns.append(Column(appl.index[:k + 1], 'x{}'.format(k + 1))) \n",
125+
"for k in range(len(appl.Date) - 1):\n",
126+
" my_columns.append(Column(list(appl.Date)[:k + 1], 'x{}'.format(k + 1))) \n",
127127
" my_columns.append(Column(appl_price[:k + 1], 'y{}'.format(k + 1)))\n",
128128
"grid = Grid(my_columns)\n",
129129
"py.grid_ops.upload(grid, 'AAPL-daily-stock-price' + str(time.time()), auto_open=False)"
@@ -138,21 +138,21 @@
138138
},
139139
{
140140
"cell_type": "code",
141-
"execution_count": 4,
141+
"execution_count": 3,
142142
"metadata": {
143143
"collapsed": false
144144
},
145145
"outputs": [
146146
{
147147
"data": {
148148
"text/html": [
149-
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~AdamKulidjian/2202.embed\" height=\"400px\" width=\"800px\"></iframe>"
149+
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~PythonPlotBot/3032.embed\" height=\"400px\" width=\"800px\"></iframe>"
150150
],
151151
"text/plain": [
152152
"<plotly.tools.PlotlyDisplay object>"
153153
]
154154
},
155-
"execution_count": 4,
155+
"execution_count": 3,
156156
"metadata": {},
157157
"output_type": "execute_result"
158158
}
@@ -181,9 +181,9 @@
181181
" width=800,\n",
182182
" height=400,\n",
183183
" xaxis=dict(axis, **{'nticks':12, 'tickangle':-45,\n",
184-
" 'range': [to_unix_time(datetime(2016, 1, 4)),\n",
184+
" 'range': [to_unix_time(datetime(2015, 2, 17)),\n",
185185
" to_unix_time(datetime(2016, 11, 30))]}),\n",
186-
" yaxis=dict(axis, **{'title': '$', 'range':[0,120]}),\n",
186+
" yaxis=dict(axis, **{'title': '$', 'range':[0,170]}),\n",
187187
" updatemenus=[dict(type='buttons',\n",
188188
" showactive=False,\n",
189189
" y=1,\n",
@@ -201,7 +201,7 @@
201201
"frames=[{'data':[{'xsrc': grid.get_column_reference('x{}'.format(k + 1)),\n",
202202
" 'ysrc': grid.get_column_reference('y{}'.format(k + 1))}],\n",
203203
" 'traces': [0]\n",
204-
" } for k in range(len(appl.index) - 1)]\n",
204+
" } for k in range(len(appl.Date) - 1)]\n",
205205
"\n",
206206
"fig=dict(data=data, layout=layout, frames=frames)\n",
207207
"py.icreate_animations(fig, 'AAPL-stockprice' + str(time.time()))"
@@ -218,7 +218,7 @@
218218
},
219219
{
220220
"cell_type": "code",
221-
"execution_count": 5,
221+
"execution_count": 4,
222222
"metadata": {
223223
"collapsed": false
224224
},
@@ -252,27 +252,18 @@
252252
"output_type": "stream",
253253
"text": [
254254
"Collecting git+https://github.com/plotly/publisher.git\n",
255-
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/tc/bs9g6vrd36q74m5t8h9cgphh0000gn/T/pip-19JNWN-build\n",
255+
" Cloning https://github.com/plotly/publisher.git to /tmp/pip-req-build-obc71o_a\n",
256+
"Building wheels for collected packages: publisher\n",
257+
" Running setup.py bdist_wheel for publisher ... \u001b[?25ldone\n",
258+
"\u001b[?25h Stored in directory: /tmp/pip-ephem-wheel-cache-_a4gf6by/wheels/99/3e/a0/fbd22ba24cca72bdbaba53dbc23c1768755fb17b3af0f33966\n",
259+
"Successfully built publisher\n",
256260
"Installing collected packages: publisher\n",
257-
" Found existing installation: publisher 0.10\n",
258-
" Uninstalling publisher-0.10:\n",
259-
" Successfully uninstalled publisher-0.10\n",
260-
" Running setup.py install for publisher ... \u001b[?25l-\b \bdone\n",
261-
"\u001b[?25hSuccessfully installed publisher-0.10\n"
262-
]
263-
},
264-
{
265-
"name": "stderr",
266-
"output_type": "stream",
267-
"text": [
268-
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/nbconvert.py:13: ShimWarning:\n",
269-
"\n",
270-
"The `IPython.nbconvert` package has been deprecated. You should import from nbconvert instead.\n",
271-
"\n",
272-
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/publisher/publisher.py:53: UserWarning:\n",
273-
"\n",
274-
"Did you \"Save\" this notebook before running this command? Remember to save, always save.\n",
275-
"\n"
261+
" Found existing installation: publisher 0.13\n",
262+
" Uninstalling publisher-0.13:\n",
263+
" Successfully uninstalled publisher-0.13\n",
264+
"Successfully installed publisher-0.13\n",
265+
"\u001b[33mYou are using pip version 10.0.1, however version 18.1 is available.\n",
266+
"You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n"
276267
]
277268
}
278269
],
@@ -306,23 +297,23 @@
306297
],
307298
"metadata": {
308299
"kernelspec": {
309-
"display_name": "Python 2",
300+
"display_name": "Python 3",
310301
"language": "python",
311-
"name": "python2"
302+
"name": "python3"
312303
},
313304
"language_info": {
314305
"codemirror_mode": {
315306
"name": "ipython",
316-
"version": 2
307+
"version": 3
317308
},
318309
"file_extension": ".py",
319310
"mimetype": "text/x-python",
320311
"name": "python",
321312
"nbconvert_exporter": "python",
322-
"pygments_lexer": "ipython2",
323-
"version": "2.7.12"
313+
"pygments_lexer": "ipython3",
314+
"version": "3.6.5"
324315
}
325316
},
326317
"nbformat": 4,
327-
"nbformat_minor": 0
318+
"nbformat_minor": 2
328319
}

0 commit comments

Comments
 (0)