Skip to main content

Data visualization for notebooks and html export

Project description

Different plots for data visualization in notebook and html export

Look at example.ipynb notebook for basic demo uses.

Available charts

  • sanky_chart
  • sanky_chart2
  • drill_chart

Sanky Chart

sanky_chart

This function generates a Sanky chart to visualize the relationships between columns in a DataFrame.

Parameters:

  • dataframe: pandas DataFrame containing the data to be visualized.
  • headers: List of column headers in the DataFrame.
  • height: Height of the chart (default is 450).
  • legend: Title of the chart legend (default is "chart example").
  • legend_style: CSS style for the legend (default is 'text-align: center; font: 28px Arial').
  • text_scale: Scaling factor for text size (default is 1).
  • text_color: Color of the text (default is '#333').
  • text_font: Font for the text (default is 'Arial').
  • draw_labels: Boolean indicating whether to draw labels (default is True).
  • draw_column_labels: Boolean indicating whether to draw column labels (default is True).
  • trancation: Truncation value for labels (default is 20).
  • node_width: Width of nodes in the chart (default is 20).
  • vertical_spacing: Vertical spacing between nodes (default is 20).
  • show_toolbar: Boolean indicating whether to display the toolbar (default is True).
  • from_prefix, to_prefix, from_suffix, to_suffix: Prefixes and suffixes for from/to labels (default is empty strings).
  • label_distance: Distance of labels from nodes (default is 10).
  • use_gradient: Boolean indicating whether to use gradient colors (default is True).
  • client_height: Client height of the chart (default is 0).

sanky_chart2

This function generates a Sanky chart to visualize relationships between source and destination column entities, where the level is the column that the entities belong to in the Sanky chart.

Parameters:

  • dataframe: pandas DataFrame containing the data to be visualized.
  • src_name, dest_name: Names of the source and destination columns.
  • src_level, dest_level: Levels of the source and destination columns.
  • height: Height of the chart (default is 450).
  • legend: Title of the chart legend (default is "chart example").
  • legend_style: CSS style for the legend (default is 'text-align: center; font: 28px Arial').
  • text_scale: Scaling factor for text size (default is 1).
  • text_color: Color of the text (default is '#333').
  • text_font: Font for the text (default is 'Arial').
  • draw_labels: Boolean indicating whether to draw labels (default is True).
  • draw_column_labels: Boolean indicating whether to draw column labels (default is True).
  • trancation: Truncation value for labels (default is 20).
  • node_width: Width of nodes in the chart (default is 20).
  • vertical_spacing: Vertical spacing between nodes (default is 20).
  • show_toolbar: Boolean indicating whether to display the toolbar (default is True).
  • from_prefix, to_prefix, from_suffix, to_suffix: Prefixes and suffixes for from/to labels (default is empty strings).
  • label_distance: Distance of labels from nodes (default is 10).
  • color_mode: Color mode for the chart (default is 0).
  • use_gradient: Boolean indicating whether to use gradient colors (default is True).
  • client_height: Client height of the chart (default is 0).

Drill Chart

drill_chart

This function creates an n-level drill-down chart.

Parameters:

  • data: Data for the drill chart.
  • start_label: Label for the starting point of the drill chart.
  • y_label: Label for the y-axis (default is 'values').
  • legend: Title of the chart legend (default is 'Drill Chart').
  • legend_color: Color of the legend text (default is 'black').
  • legend_font: Font style for the legend (default is 'Bold 20px Arial').
  • legend_pos: Position of the legend (default is 'bottom').
  • legend_align: Alignment of the legend (default is 'center').
  • nav_color: Color of the navigation bar (default is '#046688').
  • nav_font: Font style for the navigation bar (default is '16px Arial').
  • nav_justify: Justification for the navigation bar (default is 'right').
  • nav_padding: Padding for the navigation bar (default is '10px').
  • label_scale: Scaling factor for labels (default is 1.2).
  • label_color: Color of labels (default is 'black').
  • resolution: Resolution of the chart (default is 1.2).
  • background_color: Background color of the chart (default is 'transparent').
  • height: Height of the chart (default is 480).
  • max_column_width: Maximum width for columns in the chart (default is 100).

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kaironviz-0.0.2-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file kaironviz-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: kaironviz-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for kaironviz-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4a497d17f62c424be8b269834d36fa1ca60d024447de9d77564d7b8e056cdc05
MD5 7ec9e0de6d21db88a4f989353fba1941
BLAKE2b-256 5725a20e35aa1668683b08b906dc5f2e518886a220e12c50c2701d0638f12635

See more details on using hashes here.

Supported by

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