How to use the autovizwidget.autovizwidget.widget.encoding.Encoding.chart_type_table function in autovizwidget

To help you get started, we’ve selected a few autovizwidget examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyter-incubator / sparkmagic / autovizwidget / autovizwidget / widget / autovizwidget.py View on Github external
def _create_viz_types_buttons(self):
        hbox = self.ipywidget_factory.get_hbox()
        children = list()

        if len(self.df) > 0:
            self.heading = self.ipywidget_factory.get_html('Type:', width='80px', height='32px')
            children.append(self.heading)

            self._create_type_button(Encoding.chart_type_table, children)
            self._create_type_button(Encoding.chart_type_pie, children)

            if len(self.df.columns) > 1:
                self._create_type_button(Encoding.chart_type_scatter, children)
                self._create_type_button(Encoding.chart_type_line, children)
                self._create_type_button(Encoding.chart_type_area, children)
                self._create_type_button(Encoding.chart_type_bar, children)

        hbox.children = children

        return hbox
github jupyter-incubator / sparkmagic / autovizwidget / autovizwidget / widget / utils.py View on Github external
def display_dataframe(df):
    selected_x = select_x(df)
    selected_y = select_y(df, selected_x)
    encoding = Encoding(chart_type=Encoding.chart_type_table, x=selected_x, y=selected_y,
                        y_aggregation=Encoding.y_agg_max)
    return AutoVizWidget(df, encoding)
github jupyter-incubator / sparkmagic / autovizwidget / autovizwidget / plotlygraphs / graphrenderer.py View on Github external
def _get_graph(chart_type):
        if chart_type == Encoding.chart_type_scatter:
            graph = ScatterGraph()
        elif chart_type == Encoding.chart_type_line:
            graph = LineGraph()
        elif chart_type == Encoding.chart_type_area:
            graph = AreaGraph()
        elif chart_type == Encoding.chart_type_bar:
            graph = BarGraph()
        elif chart_type == Encoding.chart_type_pie:
            graph = PieGraph()
        elif chart_type == Encoding.chart_type_table:
            graph = DataGraph()
        else:
            raise ValueError("Cannot display chart of type {}".format(chart_type))

        return graph

autovizwidget

AutoVizWidget: An Auto-Visualization library for pandas dataframes

BSD-3-Clause
Latest version published 1 year ago

Package Health Score

65 / 100
Full package analysis