Candlestick with plotly + Jupyter

Plotly is not so major compared to bokeh. Since plotly has a fushi that is thought to be an online tool, try drawing candlesticks on Jupyter in a local environment.

Below, all are carried out from Jupyter notebook

from plotly.offline import init_notebook_mode, iplot
from plotly.tools import FigureFactory as FF
import pandas as pd
try:    
    import Quandl as quandl
except ImportError:
    import quandl as quandl

There is plotly.offline, so if you import this, you can use plotly offline. This data is pulled from Quandl, but for some reason the first Q may be uppercase or lowercase depending on the environment, so it's a painstaking measure. (Please tell me who knows the countermeasures)

#Magic for drawing on jupyter
init_notebook_mode()

#Get Nikkei Stock Average from Quadl with Dataframe
df = quandl.get("NIKKEI/INDEX")

#Draw candlestick
fig = FF.create_candlestick(df['Open Price'], df['High Price'], df['Low Price'], df['Close Price'], dates=df.index)
iplot(fig)

The result looks like this ↓

newplot.png

When you actually execute it with Jupyter and move the cursor to the graph, four values are displayed.

Recommended Posts

Candlestick with plotly + Jupyter
Multiple selections with Jupyter
3D display with plotly
Use nim with Jupyter
Candle chart plot with plotly
Embed audio data with Jupyter
Using Graphviz with Jupyter Notebook
Use pip with Jupyter Notebook
Create graph with plotly button
Use Cython with Jupyter Notebook
Play with Jupyter Notebook (IPython Notebook)
Try running Python with Try Jupyter
Switch virtual environment with jupyter
Server management with Jupyter (1) import
Allow external connections with jupyter notebook
Formatting with autopep8 on Jupyter notebook
Publish nice graphs online with plotly
Until you start Jupyter with Docker
Visualize decision trees with jupyter notebook
Make a sound with Jupyter notebook
Easy Jupyter environment construction with Cloud9
Use markdown with jupyter notebook (with shortcut)
Try running Jupyter with VS Code
Add more kernels with Jupyter Notebook
Convenient analysis with Pandas + Jupyter notebook
Spark play with WSL anaconda jupyter (2)
Make a nice graph with plotly
Application of graphs with plotly sliders
Use nb extensions with Anaconda's Jupyter notebook
Build Jupyter Lab (Python) environment with Docker
Use apache Spark with jupyter notebook (IPython notebook)
I want to blog with Jupyter Notebook
Use Jupyter Lab and Jupyter Notebook with EC2
Jupyter with PYNQ and high-level synthesis with Polyphony
Try SVM with scikit-learn on Jupyter Notebook
ipython + jupyter + plotly (matplotlib) settings & usage notes
To import your own module with jupyter
How to use jupyter notebook with ABCI
Linking python and JavaScript with jupyter notebook
Using Java's Jupyter Kernel with Google Colaboratory
Complete everything with Jupyter ~ Introduction of nbdev ~
I tried simple image recognition with Jupyter
[Jupyter Notebook memo] Display kanji with matplotlib
Displaying candlestick charts in Python (Plotly edition)
Rich cell output with Jupyter Notebook (IPython)