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
Bcc2telegraf: An integration that sends ebpf-based bcc histogram metrics to telegraf daemon

bcc2telegraf bcc2telegraf is an integration that sends ebpf-based bcc histogram

Peter Bobrov 2 Feb 17, 2022
DALLE-tools provided useful dataset utilities to improve you workflow with WebDatasets.

DALLE tools DALLE-tools is a github repository with useful tools to categorize, annotate or check the sanity of your datasets. Installation Just clone

11 Dec 25, 2022
Define fortify and autoplot functions to allow ggplot2 to handle some popular R packages.

ggfortify This package offers fortify and autoplot functions to allow automatic ggplot2 to visualize statistical result of popular R packages. Check o

Sinhrks 504 Dec 23, 2022
📊 Extensions for Matplotlib

📊 Extensions for Matplotlib

Nico Schlömer 519 Dec 30, 2022
Python implementation of the Density Line Chart by Moritz & Fisher.

PyDLC - Density Line Charts with Python Python implementation of the Density Line Chart (Moritz & Fisher, 2018) to visualize large collections of time

Charles L. Bérubé 10 Jan 06, 2023
The Metabolomics Integrator (MINT) is a post-processing tool for liquid chromatography-mass spectrometry (LCMS) based metabolomics.

MINT (Metabolomics Integrator) The Metabolomics Integrator (MINT) is a post-processing tool for liquid chromatography-mass spectrometry (LCMS) based m

Sören Wacker 0 May 04, 2022
Apache Superset is a Data Visualization and Data Exploration Platform

Apache Superset is a Data Visualization and Data Exploration Platform

The Apache Software Foundation 49.9k Jan 02, 2023
Sprint planner considering JIRA issues and google calendar meetings schedule.

Sprint planner Sprint planner is a Python script for planning your Jira tasks based on your calendar availability. Installation Use the package manage

Apptension 2 Dec 05, 2021
🎨 Python Echarts Plotting Library

pyecharts Python ❤️ ECharts = pyecharts English README 📣 简介 Apache ECharts (incubating) 是一个由百度开源的数据可视化,凭借着良好的交互性,精巧的图表设计,得到了众多开发者的认可。而 Python 是一门富有表达

pyecharts 13.1k Jan 03, 2023
Visualizing weather changes across the world using third party APIs and Python.

WEATHER FORECASTING ACROSS THE WORLD Overview Python scripts were created to visualize the weather for over 500 cities across the world at varying di

G Johnson 0 Jun 12, 2021
By default, networkx has problems with drawing self-loops in graphs.

By default, networkx has problems with drawing self-loops in graphs. It makes it hard to draw a graph with self-loops or to make a nicely looking chord diagram. This repository provides some code to

Vladimir Shitov 5 Jan 06, 2022
Cartopy - a cartographic python library with matplotlib support

Cartopy is a Python package designed to make drawing maps for data analysis and visualisation easy. Table of contents Overview Get in touch License an

1.2k Jan 01, 2023
ScisorWiz: Differential Isoform Visualizer for Long-Read RNA Sequencing Data

ScisorWiz: Vizualizer for Differential Isoform Expression README ScisorWiz is a linux-based R-package for visualizing differential isoform expression

Alexander Stein 6 Oct 04, 2022
Python script to generate a visualization of various sorting algorithms, image or video.

sorting_algo_visualizer Python script to generate a visualization of various sorting algorithms, image or video.

146 Nov 12, 2022
VDLdraw - Batch plot the log files exported from VisualDL using Matplotlib

VDLdraw Batch plot the log files exported from VisualDL using Matplotlib. At pre

Yizhou Chen 5 Sep 26, 2022
✅ Today I Learn

Today I Learn EDA numpy_100ex numpy_0~10 airline_satisfaction_prediction BERT_naver_movie_classification NLP_prepare NLP_Tweet_Emotion_Recognition tex

Yeonghoo_Ahn 3 Dec 15, 2022
Make scripted visualizations in blender

Scripted visualizations in blender The goal of this project is to script 3D scientific visualizations using blender. To achieve this, we aim to bring

Praneeth Namburi 10 Jun 01, 2022
Visualizations of linear algebra algorithms for people who want a deep understanding

Visualising algorithms on symmetric matrices Examples QR algorithm and LR algorithm Here, we have a GIF animation of an interactive visualisation of t

ogogmad 3 May 05, 2022
Visualization of hidden layer activations of small multilayer perceptrons (MLPs)

MLP Hidden Layer Activation Visualization To gain some intuition about the internal representation of simple multi-layer perceptrons (MLPs) I trained

Andreas Köpf 7 Dec 30, 2022
Homework 2: Matplotlib and Data Visualization

Homework 2: Matplotlib and Data Visualization Overview These data visualizations were created for my introductory computer science course using Python

Sophia Huang 12 Oct 20, 2022