How to use the retentioneering.visualization.funnel.funnel_chart function in retentioneering

To help you get started, we’ve selected a few retentioneering 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 retentioneering / retentioneering-tools / retentioneering / core / utils.py View on Github external
Return type
        --------
        Plotly
        """
        self._init_cols(locals())
        if user_based:
            counts = self.filter_cluster(
                cluster, index_col=self._index_col()
            ).groupby(self._event_col())[self._index_col()].nunique().loc[funnel_events]
        else:
            counts = self.filter_cluster(
                cluster, index_col=index_col
            ).groupby(self._event_col())[self._event_time_col()].count().loc[funnel_events]
        counts = counts.fillna(0)
        return funnel.funnel_chart(counts.astype(int).tolist(),
                                   funnel_events,
                                   'Funnel for cluster {}'.format(cluster),
                                   interactive=interactive)