adviz
Advanced tools
| Metadata-Version: 2.1 | ||
| Name: adviz | ||
| Version: 0.0.20 | ||
| Version: 0.0.21 | ||
| Summary: advertools visualizations | ||
@@ -23,9 +23,21 @@ Home-page: https://github.com/eliasdabbas/adviz | ||
| adviz | ||
| ================ | ||
| # adviz | ||
| <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! --> | ||
| Get startd quickly and see exmaples below | ||
| ## About | ||
| [`advertools`](https://github.com/eliasdabbas/advertools) is a package | ||
| for the search (SEO/SEM) and digital marketing practitioner. It aims to | ||
| help with various productivity and analysis tools. | ||
| Part of the analysis process is producing specialized charts that tend | ||
| to come up all the time. So, `adviz` aims to be a collection of charts | ||
| that can help `advertools` users. Many of the charts can be used for | ||
| many other workflows, and are not marketing-specific. Feel free to use, | ||
| share, and suggest features for any of them. | ||
| Get startd quickly and see exmaples below: | ||
| ## Install | ||
@@ -32,0 +44,0 @@ |
@@ -1,2 +0,2 @@ | ||
| __version__ = "0.0.20" | ||
| __version__ = "0.0.21" | ||
@@ -3,0 +3,0 @@ from .value_counts_plus import value_counts_plus |
+44
-5
@@ -6,3 +6,3 @@ # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/08_ecdf.ipynb. | ||
| # %% ../nbs/08_ecdf.ipynb 3 | ||
| # %% ../nbs/08_ecdf.ipynb 4 | ||
| import advertools as adv | ||
@@ -12,4 +12,31 @@ import pandas as pd | ||
| # %% ../nbs/08_ecdf.ipynb 5 | ||
| def ecdf(df, x, hover_name=None, height=None, width=None, **kwargs): | ||
| # %% ../nbs/08_ecdf.ipynb 6 | ||
| def ecdf( | ||
| df, | ||
| x, | ||
| hover_name=None, | ||
| height=None, | ||
| width=None, | ||
| **kwargs): | ||
| """ | ||
| Create an empirical cumulative distribution chart, a thin wrapper around px.ecdf. | ||
| Parameters | ||
| ---------- | ||
| df : pandas.DataFrame | ||
| A DataFrame from which you want to visualize one of the columns' distribution. | ||
| x : str | ||
| The name of the column to visualize. | ||
| hover_name : str | ||
| The name of the column to use for labeling the markers on mouseover. | ||
| height : int | ||
| The height of the chart in pixels. | ||
| width : int | ||
| The width of the chart in pixels. | ||
| Returns | ||
| ------- | ||
| ecdf : plotly.graph_objects.Figure | ||
| A plotly chart of the desired ecdf. | ||
| """ | ||
| df = df.sort_values(x) | ||
@@ -29,7 +56,19 @@ df['count below'] = range(len(df)) | ||
| width=width, | ||
| hover_data=['count below', 'count above', 'total count'], | ||
| hover_data=['count below', 'count above', 'total count', hover_name], | ||
| ecdfnorm='percent', **kwargs) | ||
| # fig.data[0].hovertemplate = f'<b>{x.replace("_", " ").title()}</b><br><br>{x}' + ': %{x}<br>percent: %{y}<br><br>count below: %{customdata[0]:,}<br>count above: %{customdata[1]:,}<br>total count: %{customdata[2]:,}<extra></extra>' | ||
| # fig.data[0].hovertemplate = '%{customdata[3]}' + f'<b>{x.replace("_", " ").title()}</b><br><br>{x}' + ': %{x}<br>percent: %{y}<br><br>count below: %{customdata[0]:,}<br>count above: %{customdata[1]:,}<br>total count: %{customdata[2]:,}<extra></extra>' | ||
| for data in fig.data: | ||
| if data.type in ['scatter', 'scattergl']: | ||
| data.marker.symbol = "circle-open" | ||
| data.marker.size = 11 | ||
| prefix = '<b>%{customdata[3]}</b>' if hover_name is not None else '' | ||
| data.hovertemplate = prefix + f'<br><br>{x}' + ': %{x}<br>percent: %{y:.1f}%<br><br>count below: %{customdata[0]:,}<br>count above: %{customdata[1]:,}<br>total count: %{customdata[2]:,}<extra></extra>' | ||
| fig.update_yaxes(ticksuffix='%', showspikes=True) | ||
| fig.update_xaxes(showspikes=True) | ||
| if fig.data[-1].type == 'histogram': | ||
| fig.layout.yaxis2.showspikes = False | ||
| fig.layout.xaxis2.showspikes = False | ||
| fig.layout.yaxis2.ticksuffix = '' | ||
| fig.layout.yaxis2.showticklabels = True | ||
| fig.layout.yaxis2.title = 'count' | ||
| return fig |
@@ -6,3 +6,3 @@ # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/07_value_counts.ipynb. | ||
| # %% ../nbs/07_value_counts.ipynb 2 | ||
| # %% ../nbs/07_value_counts.ipynb 3 | ||
| import advertools as adv | ||
@@ -12,3 +12,3 @@ import pandas as pd | ||
| # %% ../nbs/07_value_counts.ipynb 3 | ||
| # %% ../nbs/07_value_counts.ipynb 4 | ||
| def value_counts( | ||
@@ -15,0 +15,0 @@ data, |
+16
-4
| Metadata-Version: 2.1 | ||
| Name: adviz | ||
| Version: 0.0.20 | ||
| Version: 0.0.21 | ||
| Summary: advertools visualizations | ||
@@ -23,9 +23,21 @@ Home-page: https://github.com/eliasdabbas/adviz | ||
| adviz | ||
| ================ | ||
| # adviz | ||
| <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! --> | ||
| Get startd quickly and see exmaples below | ||
| ## About | ||
| [`advertools`](https://github.com/eliasdabbas/advertools) is a package | ||
| for the search (SEO/SEM) and digital marketing practitioner. It aims to | ||
| help with various productivity and analysis tools. | ||
| Part of the analysis process is producing specialized charts that tend | ||
| to come up all the time. So, `adviz` aims to be a collection of charts | ||
| that can help `advertools` users. Many of the charts can be used for | ||
| many other workflows, and are not marketing-specific. Feel free to use, | ||
| share, and suggest features for any of them. | ||
| Get startd quickly and see exmaples below: | ||
| ## Install | ||
@@ -32,0 +44,0 @@ |
+15
-3
@@ -1,8 +0,20 @@ | ||
| adviz | ||
| ================ | ||
| # adviz | ||
| <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! --> | ||
| Get startd quickly and see exmaples below | ||
| ## About | ||
| [`advertools`](https://github.com/eliasdabbas/advertools) is a package | ||
| for the search (SEO/SEM) and digital marketing practitioner. It aims to | ||
| help with various productivity and analysis tools. | ||
| Part of the analysis process is producing specialized charts that tend | ||
| to come up all the time. So, `adviz` aims to be a collection of charts | ||
| that can help `advertools` users. Many of the charts can be used for | ||
| many other workflows, and are not marketing-specific. Feel free to use, | ||
| share, and suggest features for any of them. | ||
| Get startd quickly and see exmaples below: | ||
| ## Install | ||
@@ -9,0 +21,0 @@ |
+1
-1
| [DEFAULT] | ||
| repo = adviz | ||
| lib_name = adviz | ||
| version = 0.0.20 | ||
| version = 0.0.21 | ||
| min_python = 3.7 | ||
@@ -6,0 +6,0 @@ license = apache2 |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
70637
4.38%1589
2.38%