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
阴阳师后台全平台(使用网易 MuMu 模拟器)辅助。支持御魂,觉醒,御灵,结界突破,秘闻副本,地域鬼王。

阴阳师后台全平台辅助 Python 版本:Python 3.8.3 模拟器:网易 MuMu | 雷电模拟器 模拟器分辨率:1024*576 显卡渲染模式:兼容(OpenGL) 兼容 Windows 系统和 MacOS 系统 思路: 利用 adb 截图后,使用 opencv 找图找色,模拟点击。使用

简讯 27 Jul 09, 2022
Data visualization using matplotlib

Data visualization using matplotlib project instructions Top 5 Most Common Coffee Origins In this visualization I used data from Ankur Chavda on Kaggl

13 Oct 27, 2021
Streaming pivot visualization via WebAssembly

Perspective is an interactive visualization component for large, real-time datasets. Originally developed for J.P. Morgan's trading business, Perspect

The Fintech Open Source Foundation (www.finos.org) 5.1k Dec 27, 2022
Compute and visualise incidence (reworking of the original incidence package)

incidence2 incidence2 is an R package that implements functions and classes to compute, handle and visualise incidence from linelist data. It refocuss

15 Nov 22, 2022
哔咔漫画window客户端,界面使用PySide2,已实现分类、搜索、收藏夹、下载、在线观看、waifu2x等功能。

picacomic-windows 哔咔漫画window客户端,界面使用PySide2,已实现分类、搜索、收藏夹、下载、在线观看等功能。 功能介绍 登陆分流,还原安卓端的三个分流入口 分类,搜索,排行,收藏夹使用同一的逻辑,滚轮下滑自动加载下一页,双击打开 漫画详情,章节列表和评论列表 下载功能,目

1.8k Dec 31, 2022
Data visualization electromagnetic spectrum

Datenvisualisierung-Elektromagnetischen-Spektrum Anhand des Moduls matplotlib sollen die Daten des elektromagnetischen Spektrums dargestellt werden. D

Pulsar 1 Sep 01, 2022
Visualize data of Vietnam's regions with interactive maps.

Plotting Vietnam Development Map This is my personal project that I use plotly to analyse and visualize data of Vietnam's regions with interactive map

1 Jun 26, 2022
The open-source tool for building high-quality datasets and computer vision models

The open-source tool for building high-quality datasets and computer vision models. Website • Docs • Try it Now • Tutorials • Examples • Blog • Commun

Voxel51 2.4k Jan 07, 2023
web application for flight log analysis & review

Flight Review This is a web application for flight log analysis. It allows users to upload ULog flight logs, and analyze them through the browser. It

PX4 Drone Autopilot 145 Dec 20, 2022
Epagneul is a tool to visualize and investigate windows event logs

epagneul Epagneul is a tool to visualize and investigate windows event logs. Dep

jurelou 190 Dec 13, 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
股票行情实时数据接口-A股,完全免费的沪深证券股票数据-中国股市,python最简封装的API接口

股票行情实时数据接口-A股,完全免费的沪深证券股票数据-中国股市,python最简封装的API接口,包含日线,历史K线,分时线,分钟线,全部实时采集,系统包括新浪腾讯双数据核心采集获取,自动故障切换,STOCK数据格式成DataFrame格式,可用来查询研究量化分析,股票程序自动化交易系统.为量化研究者在数据获取方面极大地减轻工作量,更加专注于策略和模型的研究与实现。

dev 572 Jan 08, 2023
This is a small repository for me to implement my simply Data Visualisation skills through Python.

Data Visualisations This is a small repository for me to implement my simply Data Visualisation skills through Python. Steam Population Chart from 10/

9 Dec 31, 2021
Open-questions - Open questions for Bellingcat technical contributors

Open questions for Bellingcat technical contributors These are difficult, long-term projects that would contribute to open source investigations at Be

Bellingcat 234 Dec 31, 2022
Massively parallel self-organizing maps: accelerate training on multicore CPUs, GPUs, and clusters

Somoclu Somoclu is a massively parallel implementation of self-organizing maps. It exploits multicore CPUs, it is able to rely on MPI for distributing

Peter Wittek 239 Nov 10, 2022
CompleX Group Interactions (XGI) provides an ecosystem for the analysis and representation of complex systems with group interactions.

XGI CompleX Group Interactions (XGI) is a Python package for the representation, manipulation, and study of the structure, dynamics, and functions of

Complex Group Interactions 67 Dec 28, 2022
A Python Library for Self Organizing Map (SOM)

SOMPY A Python Library for Self Organizing Map (SOM) As much as possible, the structure of SOM is similar to somtoolbox in Matlab. It has the followin

Vahid Moosavi 497 Dec 29, 2022
Simple function to plot multiple barplots in the same figure.

Simple function to plot multiple barplots in the same figure. Supports padding and custom color.

Matthias Jakobs 2 Feb 21, 2022
Glue is a python project to link visualizations of scientific datasets across many files.

Glue Glue is a python project to link visualizations of scientific datasets across many files. Click on the image for a quick demo: Features Interacti

675 Dec 09, 2022
649 Pokémon palettes as CSVs, with a Python lib to turn names/IDs into palettes, or MatPlotLib compatible ListedColormaps.

PokePalette 649 Pokémon, broken down into CSVs of their RGB colour palettes. Complete with a Python library to convert names or Pokédex IDs into eithe

11 Dec 05, 2022