Skip to content

Commit

Permalink
Rename plots namespace to plot for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
StijnKas committed Dec 23, 2024
1 parent 8438d82 commit 2115a93
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
15 changes: 7 additions & 8 deletions examples/ih/Conversion_Reporting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.overall_gauges(\n",
"ih.plot.overall_gauges(\n",
" metric=\"Conversion\",\n",
" condition=\"ExperimentGroup\",\n",
" by=\"Channel\",\n",
Expand All @@ -79,7 +79,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.success_rates_tree_map(metric=\"Conversion\")\n"
"ih.plot.success_rates_tree_map(metric=\"Conversion\")\n"
]
},
{
Expand All @@ -97,7 +97,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.success_rates_trend_bar(\n",
"ih.plot.success_rates_trend_bar(\n",
" metric=\"Conversion\",\n",
" condition=\"ExperimentGroup\",\n",
" every=\"1w\",\n",
Expand All @@ -110,7 +110,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.success_rates_trend(metric=\"Conversion\", every=\"1d\")"
"ih.plot.success_rates_trend(metric=\"Conversion\", every=\"1d\")"
]
},
{
Expand All @@ -126,7 +126,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.overall_gauges(\n",
"ih.plot.overall_gauges(\n",
" condition=\"ExperimentGroup\",\n",
" by=\"Channel\",\n",
" reference_values={\"Web\": 0.20, \"Email\": 0.20},\n",
Expand All @@ -139,7 +139,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.success_rates_trend(\n",
"ih.plot.success_rates_trend(\n",
" by=\"Channel\"\n",
")"
]
Expand All @@ -160,8 +160,7 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down
17 changes: 8 additions & 9 deletions examples/ih/Example_IH_Analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -88,7 +88,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.response_count_tree_map()\n"
"ih.plot.response_count_tree_map()\n"
]
},
{
Expand All @@ -97,7 +97,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.action_distribution(query=pl.col.Outcome == \"Clicked\")"
"ih.plot.action_distribution(query=pl.col.Outcome == \"Clicked\")"
]
},
{
Expand All @@ -115,7 +115,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.response_counts(every=\"1d\")"
"ih.plot.response_counts(every=\"1d\")"
]
},
{
Expand All @@ -131,7 +131,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.response_counts(\n",
"ih.plot.response_counts(\n",
" by=\"Channel\",\n",
" query=pl.col.Channel != \"\",\n",
")"
Expand Down Expand Up @@ -159,7 +159,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.success_rates_trend(\n",
"ih.plot.success_rates_trend(\n",
" by=\"Channel\", query=pl.col.Channel.is_not_null() & (pl.col.Channel != \"\")\n",
")"
]
Expand All @@ -179,7 +179,7 @@
"metadata": {},
"outputs": [],
"source": [
"ih.plots.model_performance_trend(by=\"Channel\")"
"ih.plot.model_performance_trend(by=\"Channel\")"
]
},
{
Expand Down Expand Up @@ -286,8 +286,7 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions python/pdstools/ih/IH.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from .Aggregates import Aggregates
from .Plots import Plots
from ..utils.cdh_utils import to_prpc_date_time, _polars_capitalize, _apply_query
from ..utils.cdh_utils import _polars_capitalize, _apply_query
from ..utils.types import QUERY
from ..pega_io.File import read_ds_export

Expand All @@ -20,7 +20,7 @@ def __init__(self, data: pl.LazyFrame):
self.data = _polars_capitalize(data)

self.aggregates = Aggregates(ih=self)
self.plots = Plots(ih=self)
self.plot = Plots(ih=self)
self.positive_outcome_labels = {
"Engagement": ["Accepted", "Accept", "Clicked", "Click"],
"Conversion": ["Conversion"],
Expand Down

0 comments on commit 2115a93

Please sign in to comment.