Productivity Tools for Plotly + Pandas

Overview

Cufflinks

This library binds the power of plotly with the flexibility of pandas for easy plotting.

This library is available on https://github.com/santosjorge/cufflinks

This tutorial assumes that the plotly user credentials have already been configured as stated on the getting started guide.

Tutorials:

3D Charts

Release Notes

v0.17.0

Support for Plotly 4.x
Cufflinks is no longer compatible with Plotly 3.x

v0.14.0

Support for Plotly 3.0

v0.13.0

New iplot helper. To see a comprehensive list of parameters cf.help()

# For a list of supported figures
cf.help()
# Or to see the parameters supported that apply to a given figure try
cf.help('scatter')
cf.help('candle') #etc

v0.12.0

Removed dependecies on ta-lib. This library is no longer required. All studies have be rewritten in Python.

v0.11.0

  • QuantFigure is a new class that will generate a graph object with persistence. Parameters can be added/modified at any given point.

This can be as easy as:

df=cf.datagen.ohlc()
qf=cf.QuantFig(df,title='First Quant Figure',legend='top',name='GS')
qf.add_bollinger_bands()
qf.iplot()

QuantFigure

  • Technical Analysis Studies can be added on demand.
qf.add_sma([10,20],width=2,color=['green','lightgreen'],legendgroup=True)
qf.add_rsi(periods=20,color='java')
qf.add_bollinger_bands(periods=20,boll_std=2,colors=['magenta','grey'],fill=True)
qf.add_volume()
qf.add_macd()
qf.iplot()

Technical Analysis

v0.10.0

  • rangeslider to display a date range slider at the bottom
    • cf.datagen.ohlc().iplot(kind='candle',rangeslider=True)
  • rangeselector to display buttons to change the date range displayed
    • cf.datagen.ohlc(500).iplot(kind='candle', rangeselector={ 'steps':['1y','2 months','5 weeks','ytd','2mtd','reset'], 'bgcolor' : ('grey',.3), 'x': 0.3 , 'y' : 0.95})
  • Customise annotions, with fontsize,fontcolor,textangle
    • Label mode
      • cf.datagen.lines(1,mode='stocks').iplot(kind='line', annotations={'2015-02-02':'Market Crash', '2015-03-01':'Recovery'}, textangle=-70,fontsize=13,fontcolor='grey')
    • Explicit mode
      • cf.datagen.lines(1,mode='stocks').iplot(kind='line', annotations=[{'text':'exactly here','x':'0.2', 'xref':'paper','arrowhead':2, 'textangle':-10,'ay':150,'arrowcolor':'red'}])

v0.9.0

  • Figure.iplot() to plot figures
  • New high performing candle and ohlc plots
    • cf.datagen.ohlc().iplot(kind='candle')

v0.8.0

  • 'cf.datagen.choropleth()' to for sample choropleth data.
  • 'cf.datagen.scattergeo()' to for sample scattergeo data.
  • Support for choropleth and scattergeo figures in iplot
  • 'cf.get_colorscale' for maps and plotly objects that support colorscales

v0.7.1

  • xrange, yrange and zrange can be specified in iplot and getLayout
    • cf.datagen.lines(1).iplot(yrange=[5,15])
  • layout_update can be set in iplot and getLayout to explicitly update any Layout value

v0.7

  • Support for Python 3

v0.6

See the IPython Notebook

  • Support for pie charts
    • cf.datagen.pie().iplot(kind='pie',labels='labels',values='values')
  • Generate Open, High, Low, Close data
    • datagen.ohlc()
  • Candle Charts support
    • ohlc=cf.datagen.ohlc()
      ohlc.iplot(kind='candle',up_color='blue',down_color='red')
  • OHLC (Bar) Charts support
    • ohlc=cf.datagen.ohlc()
      ohlc.iplot(kind='ohlc',up_color='blue',down_color='red')
  • Support for logarithmic charts ( logx | logy )
    • df=pd.DataFrame([x**2] for x in range(100))
      df.iplot(kind='lines',logy=True)
  • Support for MulitIndex DataFrames
  • Support for Error Bars ( error_x | error_y )
    • cf.datagen.lines(1,5).iplot(kind='bar',error_y=[1,2,3.5,2,2])
    • cf.datagen.lines(1,5).iplot(kind='bar',error_y=20, error_type='percent')
  • Support for continuous error bars
    • cf.datagen.lines(1).iplot(kind='lines',error_y=20,error_type='continuous_percent')
    • cf.datagen.lines(1).iplot(kind='lines',error_y=10,error_type='continuous',color='blue')
  • Technical Analysis Studies for Timeseries (beta)
    • Simple Moving Averages (SMA)
      • cf.datagen.lines(1,500).ta_plot(study='sma',periods=[13,21,55])
    • Relative Strength Indicator (RSI)
      • cf.datagen.lines(1,200).ta_plot(study='boll',periods=14)
    • Bollinger Bands (BOLL)
      • cf.datagen.lines(1,200).ta_plot(study='rsi',periods=14)
    • Moving Average Convergence Divergence (MACD)
      • cf.datagen.lines(1,200).ta_plot(study='macd',fast_period=12,slow_period=26, signal_period=9)

v0.5

  • Support of offline charts
    • cf.go_offline()
    • cf.go_online()
    • cf.iplot(figure,online=True) (To force online whilst on offline mode)
  • Support for secondary axis
    • fig=cf.datagen.lines(3,columns=['a','b','c']).figure()
      fig=fig.set_axis('b',side='right')
      cf.iplot(fig)

v0.4

  • Support for global theme setting
    • cufflinks.set_config_file(theme='pearl')
  • New theme ggplot
    • cufflinks.datagen.lines(5).iplot(theme='ggplot')
  • Support for horizontal bar charts barh
    • cufflinks.datagen.lines(2).iplot(kind='barh',barmode='stack',bargap=.1)
  • Support for histogram orientation and normalization
    • cufflinks.datagen.histogram().iplot(kind='histogram',orientation='h',norm='probability')
  • Support for area plots
    • cufflinks.datagen.lines(4).iplot(kind='area',fill=True,opacity=1)
  • Support for subplots
    • cufflinks.datagen.histogram(4).iplot(kind='histogram',subplots=True,bins=50)
    • cufflinks.datagen.lines(4).iplot(subplots=True,shape=(4,1),shared_xaxes=True,vertical_spacing=.02,fill=True)
  • Support for scatter matrix to display the distribution amongst every series in the DataFrame
    • cufflinks.datagen.lines(4,1000).scatter_matrix()
  • Support for vline and hline for horizontal and vertical lines
    • cufflinks.datagen.lines(3).iplot(hline=[2,3])
    • cufflinks.datagen.lines(3).iplot(hline=dict(y=2,color='blue',width=3))
  • Support for vspan and hspan for horizontal and vertical areas
    • cufflinks.datagen.lines(3).iplot(hspan=(-1,2))
    • cufflinks.datagen.lines(3).iplot(hspan=dict(y0=-1,y1=2,color='orange',fill=True,opacity=.4))

v0.3.2

  • Global setting for public charts
    • cufflinks.set_config_file(world_readable=True)

v0.3

  • Enhanced Spread charts
    • cufflinks.datagen.lines(2).iplot(kind='spread')
  • Support for Heatmap charts
    • cufflinks.datagen.heatmap().iplot(kind='heatmap')
  • Support for Bubble charts
    • cufflinks.datagen.bubble(4).iplot(kind='bubble',x='x',y='y',text='text',size='size',categories='categories')
  • Support for Bubble3d charts
    • cufflinks.datagen.bubble3d(4).iplot(kind='bubble3d',x='x',y='y',z='z',text='text',size='size',categories='categories')
  • Support for Box charts
    • cufflinks.datagen.box().iplot(kind='box')
  • Support for Surface charts
    • cufflinks.datagen.surface().iplot(kind='surface')
  • Support for Scatter3d charts
    • cufflinks.datagen.scatter3d().iplot(kind='scatter3d',x='x',y='y',z='z',text='text',categories='categories')
  • Support for Histograms
    • cufflinks.datagen.histogram(2).iplot(kind='histogram')
  • Data generation for most common plot types
    • cufflinks.datagen
  • Data extraction: Extract data from any Plotly chart. Data is delivered in DataFrame
    • cufflinks.to_df(Figure)
  • Integration with colorlover
    • Support for scales iplot(colorscale='accent') to plot a chart using an accent color scale
    • cufflinks.scales() to see all available scales
  • Support for named colors * iplot(colors=['pink','red','yellow'])
Owner
Jorge Santos
Jorge Santos
A deceptively simple plotting library for Streamlit

🍅 Plost A deceptively simple plotting library for Streamlit. Because you've been writing plots wrong all this time. Getting started pip install plost

Thiago Teixeira 192 Dec 29, 2022
Editor and Presenter for Manim Generated Content.

Editor and Presenter for Manim Generated Content. Take a look at the Working Example. More information can be found on the documentation. These Browse

Manim Community 149 Dec 29, 2022
Comparing USD and GBP Exchange Rates

Currency Data Visualization Comparing USD and GBP Exchange Rates This is a bar graph comparing GBP and USD exchange rates. I chose blue for the UK bec

5 Oct 28, 2021
A guide for using Bootstrap 5 classes in Dash Bootstrap Components V1

dash-bootstrap-cheatsheet This handy interactive cheatsheet makes it easy to use the Bootstrap 5 classes with your Dash app made with the latest versi

10 Dec 22, 2022
This is a learning tool and exploration app made using the Dash interactive Python framework developed by Plotly

Support Vector Machine (SVM) Explorer This app has been moved here. This repo is likely outdated and will not be updated. This is a learning tool and

Plotly 150 Nov 03, 2022
Quickly and accurately render even the largest data.

Turn even the largest data into images, accurately Build Status Coverage Latest dev release Latest release Docs Support What is it? Datashader is a da

HoloViz 2.9k Dec 28, 2022
An easy to use burndown chart generator for GitHub Project Boards.

Burndown Chart for GitHub Projects An easy to use burndown chart generator for GitHub Project Boards. Table of Contents Features Installation Assumpti

Joseph Hale 15 Dec 28, 2022
A research of IT labor market based especially on hh.ru. Salaries, rate of technologies and etc.

hh_ru_research Проект реализован в учебных целях анализа рынка труда, в особенности по hh.ru Input data В качестве входных данных используются сериали

3 Sep 07, 2022
A streamlit component for bi-directional communication with bokeh plots.

Streamlit Bokeh Events A streamlit component for bi-directional communication with bokeh plots. Its just a workaround till streamlit team releases sup

Ashish Shukla 123 Dec 25, 2022
Visualise top-rated GitHub repositories in a barchart by keyword

This python script was written for simple purpose -- to visualise top-rated GitHub repositories in a barchart by keyword. Script generates html-page with barchart and information about repository own

Cur1iosity 2 Feb 07, 2022
PanGraphViewer -- show panenome graph in an easy way

PanGraphViewer -- show panenome graph in an easy way Table of Contents Versions and dependences Desktop-based panGraphViewer Library installation for

16 Dec 17, 2022
Easily configurable, chart dashboards from any arbitrary API endpoint. JSON config only

Flask JSONDash Easily configurable, chart dashboards from any arbitrary API endpoint. JSON config only. Ready to go. This project is a flask blueprint

Chris Tabor 3.3k Dec 31, 2022
An animation engine for explanatory math videos

Powered By: An animation engine for explanatory math videos Hi there, I'm Zheer 👋 I'm a Software Engineer and student!! 🌱 I’m currently learning eve

Zaheer ud Din Faiz 2 Nov 04, 2021
PyPassword is a simple follow up to PyPassphrase

PyPassword PyPassword is a simple follow up to PyPassphrase. After finishing that project it occured to me that while some may wish to use that option

Scotty 2 Jan 22, 2022
a python function to plot a geopandas dataframe

Pretty GeoDataFrame A minimum python function (~60 lines) to draw pretty geodataframe. Based on matplotlib, shapely, descartes. Installation just use

haoming 27 Dec 05, 2022
Material for dataviz course at university of Bordeaux

Material for dataviz course at university of Bordeaux

Nicolas P. Rougier 50 Jul 17, 2022
python partial dependence plot toolbox

PDPbox python partial dependence plot toolbox Motivation This repository is inspired by ICEbox. The goal is to visualize the impact of certain feature

Li Jiangchun 723 Jan 07, 2023
Draw datasets from within Jupyter.

drawdata This small python app allows you to draw a dataset in a jupyter notebook. This should be very useful when teaching machine learning algorithm

vincent d warmerdam 505 Nov 27, 2022
AB-test-analyzer - Python class to perform AB test analysis

AB-test-analyzer Python class to perform AB test analysis Overview This repo con

13 Jul 16, 2022
Graphing communities on Twitch.tv in a visually intuitive way

VisualizingTwitchCommunities This project maps communities of streamers on Twitch.tv based on shared viewership. The data is collected from the Twitch

Kiran Gershenfeld 312 Jan 07, 2023