chart_me.charting_assembly_strategy.univariate

Default implementation for single variable charting

This module contains all the logic to go from Metadata to actual charts See supporting documentation that discusses the rules engine.

Typical usage example:

charts = assemble_univariate_charts(df, [col1], infered_data_types)

Module Contents

Functions

assemble_univariate_charts(df: pandas.DataFrame, cols: List[str], infered_data_types: chart_me.datatype_infer_strategy.InferedDataTypes, **kwargs) → List[Union[altair.Chart, altair.HConcatChart]]

Delegated Function to Manage Univariate Use Cases

build_hbar_agg(df: pandas.DataFrame, col_name: str, agg_name: str) → altair.Chart

An implementation of horizontal bar chart

build_vbar_agg(df: pandas.DataFrame, col_name: str, agg_name: str) → altair.Chart

An implementation of vertical bar chart

build_histogram(df: pandas.DataFrame, col_name: str) → altair.Chart

An implementation of histogram chart

chart_me.charting_assembly_strategy.univariate.assemble_univariate_charts(df: pandas.DataFrame, cols: List[str], infered_data_types: chart_me.datatype_infer_strategy.InferedDataTypes, **kwargs) List[Union[altair.Chart, altair.HConcatChart]][source]

Delegated Function to Manage Univariate Use Cases

Parameters
  • df – dataframe

  • cols – a single column name in a list

  • infered_data_types – An instance of InferedDataTypes object

Returns

List of altair charts or compounds charts

Raises

ValueError if called with more then one column

chart_me.charting_assembly_strategy.univariate.build_hbar_agg(df: pandas.DataFrame, col_name: str, agg_name: str) altair.Chart[source]

An implementation of horizontal bar chart

chart_me.charting_assembly_strategy.univariate.build_vbar_agg(df: pandas.DataFrame, col_name: str, agg_name: str) altair.Chart[source]

An implementation of vertical bar chart

chart_me.charting_assembly_strategy.univariate.build_histogram(df: pandas.DataFrame, col_name: str) altair.Chart[source]

An implementation of histogram chart