Skip to main content

Create Echart plots in a single simple function call, with internal data wrangling via polars

Project description

QuickEcharts

QuickEcharts is a Python package that enables one to plot Echarts quickly. It piggybacks off of the pyecharts package that pipes into Apache Echarts. Pyecharts is a great package for fully customizing plots but is quite a challenge to make use of quickly. QuickEcharts solves this with a simple API for defining plotting elements and data, along with automatic data wrangling operations, using polars, to correctly structure data fast.

For the Code Examples below, there is a dataset in the QuickEcharts/datasets folder named FakeBevData.csv that you can download for replication purposes.

Installation

pip install QuickEcharts

or 

pip install git+https://github.com/AdrianAntico/QuickEcharts.git#egg=quickecharts

Code Examples


Area

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Area(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = None,
  FacetRows = 1,
  FacetCols = 1,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  Opacity = 0.5,
  GradientColor1 = '#e12191',
  GradientColor2 = '#0926800d',
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Area Plot',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = 'top',
  LegendPosRight = '0%',
  LegendPosTop = '2%',
  LegendBorderSize = 0.25,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Area(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  FacetRows = 1,
  FacetCols = 1,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  Opacity = 0.5,
  GradientColor1 = '#c86589',
  GradientColor2 = '#06a7ff0d',
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Line Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Area(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  FacetRows = 2,
  FacetCols = 2,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  Opacity = 0.5,
  GradientColor1 = '#c86589',
  GradientColor2 = '#06a7ff0d',
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Line Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Bar

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Bar(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = None,
  FacetCols = 1,
  FacetRows = 1,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Bar Plot',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = 'Daily Liters',
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = 'Date',
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = 'top',
  LegendPosRight = '0%',
  LegendPosTop = '2%',
  LegendBorderSize = 1,
  LegendTextColor = "#lightgray",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Bar(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  FacetCols = 1,
  FacetRows = 1,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Bar Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Bar(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  FacetCols = 2,
  FacetRows = 2,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Bar Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Bar3D

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Bar3D(
  dt = data,
  PreAgg = False,
  YVar = 'Brand',
  XVar = 'Category',
  ZVar = 'Daily Liters',
  AggMethod = 'mean',
  ZVarTrans = "logmin",
  RenderHTML = False,
  Theme = 'wonderland',
  BarColors = ["#00b8ff", "#0097e1", "#0876b8", "#004fa7", "#012e6d"],
  BackgroundColor = "#000",
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Bar3D Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  Legend = 'top',
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Box

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.BoxPlot(
  dt = data,
  SampleSize = 100000,
  YVar = 'Daily Liters',
  GroupVar = 'Brand',
  YVarTrans = "logmin",
  RenderHTML = False,
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Box Plot',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 42,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = 'top',
  LegendPosRight = '0%',
  LegendPosTop = '2%',
  LegendBorderSize = 1,
  LegendTextColor = "lightgray",
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Copula

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Copula(
  dt = data,
  SampleSize = 15000,
  YVar = 'Daily Liters',
  XVar = 'Daily Units',
  GroupVar = None,
  FacetRows = 2,
  FacetCols = 2,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'mean',
  RenderHTML = False,
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Copula Plot',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = 'Daily Liters',
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = 'Daily Units',
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = 'top',
  LegendPosRight = '0%',
  LegendPosTop = '2%',
  LegendBorderSize = 1,
  LegendTextColor = "lightgray",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Copula(
  dt = data,
  SampleSize = 15000,
  YVar = 'Daily Liters',
  XVar = 'Daily Units',
  GroupVar = 'Brand',
  FacetRows = 1,
  FacetCols = 1,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'mean',
  RenderHTML = False,
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Copula Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Copula(
  dt = data,
  SampleSize = 15000,
  YVar = 'Daily Liters',
  XVar = 'Daily Units',
  GroupVar = 'Brand',
  FacetRows = 2,
  FacetCols = 2,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'mean',
  RenderHTML = False,
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Copula Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Copula3D

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Copula3D(
  dt = data,
  SampleSize = 15000,
  YVar = 'Daily Liters',
  XVar = 'Daily Units',
  ZVar = 'Daily Margin',
  ColorMapVar = "ZVar",
  AggMethod = 'mean',
  RenderHTML = False,
  RangeColor = ["red", "white", "blue"],
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Density

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Density(
  dt = data,
  SampleSize = 500000,
  YVar = "Daily Liters",
  GroupVar = None,
  FacetRows = 2,
  FacetCols = 2,
  FacetLevels = None,
  TimeLine = False,
  YVarTrans = "sqrt",
  RenderHTML = False,
  LineWidth = 2,
  FillOpacity = 0.5,
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Density Plot',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  XAxisTitle = 'Daily Liters',
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = 'top',
  LegendPosRight = '0%',
  LegendPosTop = '2%',
  LegendBorderSize = 0.25,
  LegendTextColor = "lightgray",
  VerticalLine = 5,
  VerticalLineName = 'Line Name',
  HorizontalLine = 225000,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Density(
  dt = data,
  SampleSize = 100000,
  YVar = "Daily Liters",
  GroupVar = 'Brand',
  FacetRows = 2,
  FacetCols = 2,
  FacetLevels = None,
  TimeLine = False,
  YVarTrans = "sqrt",
  RenderHTML = False,
  LineWidth = 2,
  FillOpacity = 0.5,
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Density Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Donut

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Donut(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  GroupVar = 'Brand',
  AggMethod = 'count',
  YVarTrans = "Identity",
  RenderHTML = False,
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  Title = 'Donut Chart',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  Legend = 'right',
  LegendPosRight = '5%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "lightgray",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Funnel

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Funnel(
  dt = data,
  CategoryVar = ['Daily Units', 'Daily Revenue', 'Daily Margin', 'Daily Liters'],
  ValuesVar = [100, 80, 60, 40],
  RenderHTML = False,
  SeriesLabel = "Funnel Data",
  SortStyle = 'descending',
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  Title = "Funnel",
  TitleColor = "lightgray",
  TitleFontSize = 20,
  Legend = 'top',
  LegendPosRight = '0%',
  LegendPosTop = '2%',
  LegendBorderSize = 0.25,
  LegendTextColor = "lightgray",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Funnel(
  dt = data,
  CategoryVar = ['Daily Units', 'Daily Revenue', 'Daily Margin', 'Daily Liters'],
  ValuesVar = [100, 80, 60, 40],
  RenderHTML = False,
  SeriesLabel = "Funnel Data",
  SortStyle = 'ascending',
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  Title = "Funnel",
  TitleColor = "lightgray",
  TitleFontSize = 20,
  Legend = 'top',
  LegendPosRight = '0%',
  LegendPosTop = '2%',
  LegendBorderSize = 0.25,
  LegendTextColor = "lightgray",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Heatmap

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Heatmap(
  dt = data,
  PreAgg = False,
  YVar = 'Brand',
  XVar = 'Category',
  MeasureVar = 'Daily Liters',
  AggMethod = 'mean',
  MeasureVarTrans = "Identity",
  RenderHTML = False,
  ShowLabels = False,
  LabelPosition = "top",
  LabelColor = "#fff",
  Theme = 'dark',
  RangeColor = ["#5b5b5b5d", "#00c4ff", "#9cff00"],
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Heatmap',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = 'top',
  LegendPosRight = '0%',
  LegendPosTop = '2%',
  LegendBorderSize = 0.25,
  LegendTextColor = "lightgray",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Histogram

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Histogram(
  dt = data,
  SampleSize = 100000,
  YVar = "Daily Liters",
  GroupVar = None,
  FacetRows = 2,
  FacetCols = 2,
  FacetLevels = None,
  TimeLine = False,
  YVarTrans = "logmin",
  RenderHTML = True,
  Theme = 'dark',
  CategoryGap = "0%",
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Histogram',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  XAxisTitle = "Horray",
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = 'right',
  LegendPosRight = '0%',
  LegendPosTop = '15%',
  LegendBorderSize = 0.25,
  LegendTextColor = "lightgray",
  VerticalLine = 10,
  VerticalLineName = 'Line Name',
  HorizontalLine = 40000,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "elasticOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Histogram(
  dt = data,
  SampleSize = 500000,
  YVar = 'Daily Liters',
  GroupVar = 'Brand',
  FacetRows = 2,
  FacetCols = 2,
  FacetLevels = None,
  TimeLine = False,
  YVarTrans = None,
  RenderHTML = False
  NumberBins = 20,
  CategoryGap = "10%",
  Theme = 'wonderland',
  BackgroundColor = "#000",
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Histogram',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = 'top',
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Line

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Line(
  dt = data,
  PreAgg = False,
  YVar = ['Daily Liters', 'Daily Margin', 'Daily Revenue', 'Daily Units'],
  XVar = 'Date',
  GroupVar = None,
  FacetRows = 1,
  FacetCols = 1,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  SmoothLine = True,
  LineWidth = 2,
  Symbol = None,
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Line Plot',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = 'Date',
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = 'right',
  LegendPosRight = '5%',
  LegendPosTop = '15%',
  LegendBorderSize = 1,
  LegendTextColor = "lightgray",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Line(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  FacetRows = 1,
  FacetCols = 1,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  SmoothLine = True,
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Line Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Line(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  FacetRows = 2,
  FacetCols = 2,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  SmoothLine = True,
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Line Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Parallel

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Parallel(
  dt = data,
  SampleSize = 15000,
  Vars = ['Daily Liters', 'Daily Units', 'Daily Revenue', 'Daily Margin'],
  VarsTrans = ['logmin'] * 4,
  RenderHTML = False,
  SymbolSize = 6,
  Opacity = 0.05,
  LineWidth = 0.20,
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  Title = 'Parallel Plot',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Pie

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Pie(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  GroupVar = 'Brand',
  AggMethod = 'count',
  YVarTrans = None,
  RenderHTML = False,
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  Title = 'Pie Chart',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  Legend = "right",
  LegendPosRight = '5%',
  LegendPosTop = '5%',
  LegendBorderSize = 0.25,
  LegendTextColor = "#fff",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Radar

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Radar(
  dt = data,
  YVar = ['Daily Liters', 'Daily Margin'],
  GroupVar = 'Brand',
  AggMethod = 'mean',
  YVarTrans = None,
  RenderHTML = False,
  LabelColor = '#fff',
  LineColors = ["#ed1690", "#8e5fa8", "#00a6fb", "#213f7f", "#22c0df"],
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  Title = 'Radar Chart',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  Legend = 'right',
  LegendPosRight = '2%',
  LegendPosTop = '5%',
  LegendBorderSize = 0.25,
  LegendTextColor = "#fff",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


River

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.River(
  dt = data,
  PreAgg = False,
  YVars = ['Daily Liters', 'Daily Units', 'Daily Revenue', 'Daily Margin'],
  DateVar = 'Date',
  GroupVar = None,
  AggMethod = "sum",
  YVarTrans = None,
  RenderHTML = False,
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  AxisPointerType = "cross",
  Title = "River Plot",
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  Legend = 'right',
  LegendPosRight = '5%',
  LegendPosTop = '15%',
  LegendBorderSize = 0.25,
  LegendTextColor = "lightgray",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.River(
  dt = data,
  PreAgg = False,
  YVars = 'Daily Liters',
  DateVar = 'Date',
  GroupVar = 'Brand',
  AggMethod = "sum",
  YVarTrans = None,
  RenderHTML = False,
  Theme = 'wonderland',
  BackgroundColor = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Width = None,
  Height = None,
  AxisPointerType = "cross",
  Title = "River Plot",
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Rosetype

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Rosetype(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  GroupVar = 'Brand',
  AggMethod = 'count',
  YVarTrans = "Identity",
  RenderHTML = False,
  Type = "radius",
  Radius = "55%",
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  Title = 'Rosetype Chart',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  Legend = 'right',
  LegendPosRight = '5%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "lightgray",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Scatter

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Scatter(
  dt = data,
  SampleSize = 15000,
  YVar = 'Daily Liters',
  XVar = 'Daily Units',
  GroupVar = None,
  FacetRows = 1,
  FacetCols = 1,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'mean',
  YVarTrans = "logmin",
  XVarTrans = "logmin",
  RenderHTML = False,
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Scatter Plot',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = 'Daily Liters',
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = 'Daily Units',
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = 'top',
  LegendPosRight = '0%',
  LegendPosTop = '2%',
  LegendBorderSize = 1,
  LegendTextColor = "lightgray",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Scatter(
  dt = data,
  SampleSize = 15000,
  YVar = 'Daily Liters',
  XVar = 'Daily Units',
  GroupVar = 'Brand',
  FacetRows = 1,
  FacetCols = 1,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'mean',
  YVarTrans = "Identity",
  XVarTrans = "Identity",
  RenderHTML = False,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Scatter Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Scatter(
  dt = data,
  SampleSize = 15000,
  YVar = 'Daily Liters',
  XVar = 'Daily Units',
  GroupVar = 'Brand',
  FacetRows = 2,
  FacetCols = 2,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'mean',
  YVarTrans = "Identity",
  XVarTrans = "Identity",
  RenderHTML = False,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Scatter Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Scatter3D

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Scatter3D(
  dt = data,
  SampleSize = 15000,
  YVar = 'Daily Liters',
  XVar = 'Daily Units',
  ZVar = 'Daily Margin',
  ColorMapVar = "ZVar",
  AggMethod = 'mean',
  YVarTrans = "logmin",
  XVarTrans = "logmin",
  ZVarTrans = "logmin",
  RenderHTML = False,
  SymbolSize = 6,
  Theme = 'dark',
  RangeColor = ["red", "white", "blue"],
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Stacked Area

Click for code example
# Environment
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.StackedArea(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  Opacity = 0.5,
  LineWidth = 2,
  Symbol = None,
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'dark',
  BackgroundColor = None,
  Width = "1200px",
  Height = "750px",
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Stacked Area',
  TitleColor = "lightgray",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = "right",
  LegendPosRight = '2%',
  LegendPosTop = '10%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Stacked Bar

Click for code example
# Environment
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.StackedBar(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Stacked Bar',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Stacked Line

Click for code example
# Environment
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.StackedLine(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  SmoothLine = True,
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Stacked Line',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Stacked Step

Click for code example
# Environment
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.StackedStep(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Width = None,
  Height = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Area Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Step

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Step(
  dt = data,
  PreAgg = False,
  YVar = ['Daily Liters', 'Daily Margin', 'Daily Revenue', 'Daily Units'],
  XVar = 'Date',
  GroupVar = None,
  FacetRows = 1,
  FacetCols = 1,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Height = None,
  Width = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Line Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Step(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  FacetRows = 1,
  FacetCols = 1,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Height = None,
  Width = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Line Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.Step(
  dt = data,
  PreAgg = False,
  YVar = 'Daily Liters',
  XVar = 'Date',
  GroupVar = 'Brand',
  FacetRows = 2,
  FacetCols = 2,
  FacetLevels = None,
  TimeLine = False,
  AggMethod = 'sum',
  YVarTrans = "Identity",
  RenderHTML = False,
  LineWidth = 2,
  Symbol = "emptyCircle",
  SymbolSize = 6,
  ShowLabels = False,
  LabelPosition = "top",
  Theme = 'wonderland',
  BackgroundColor = None,
  Height = None,
  Width = None,
  ToolBox = True,
  Brush = True,
  DataZoom = True,
  Title = 'Line Plot',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  AxisPointerType = 'cross',
  YAxisTitle = None,
  YAxisNameLocation = 'middle',
  YAxisNameGap = 70,
  XAxisTitle = None,
  XAxisNameLocation = 'middle',
  XAxisNameGap = 42,
  Legend = None,
  LegendPosRight = '0%',
  LegendPosTop = '5%',
  LegendBorderSize = 1,
  LegendTextColor = "#fff",
  VerticalLine = None,
  VerticalLineName = 'Line Name',
  HorizontalLine = None,
  HorizontalLineName = 'Line Name',
  AnimationThreshold = 2000,
  AnimationDuration = 1000,
  AnimationEasing = "cubicOut",
  AnimationDelay = 0,
  AnimationDurationUpdate = 300,
  AnimationEasingUpdate = "cubicOut",
  AnimationDelayUpdate = 0)

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()


Word Cloud

Click for code example
# Environment
import pkg_resources
import polars as pl
from QuickEcharts import Charts
from pyecharts.globals import CurrentConfig, NotebookType 
CurrentConfig.NOTEBOOK_TYPE = 'jupyter_lab'

# Pull Data from Package
FilePath = "..FakeBevData.csv"
data = pl.read_csv(FilePath)

# Create Plot in Jupyter Lab
p1 = Charts.WordCloud(
  dt = data,
  SampleSize = 100000,
  YVar = 'Brand',
  RenderHTML = False,
  SymbolType = 'diamond',
  Title = 'Word Cloud',
  TitleColor = "#fff",
  TitleFontSize = 20,
  SubTitle = None,
  SubTitleColor = "#fff",
  SubTitleFontSize = 12,
  Theme = 'wonderland')

# Needed to display
p1.load_javascript()

# In new cell
p1.render_notebook()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quickecharts-1.1.1.tar.gz (49.0 kB view hashes)

Uploaded Source

Built Distribution

QuickEcharts-1.1.1-py3-none-any.whl (42.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page