Skip to content

Commit

Permalink
List talks and articles (#66)
Browse files Browse the repository at this point in the history
* List talks and articles
* Add Data Lunch
  • Loading branch information
sbrugman committed Dec 1, 2020
1 parent 703f680 commit 756868f
Show file tree
Hide file tree
Showing 10 changed files with 422 additions and 56 deletions.
31 changes: 31 additions & 0 deletions README.rst
Expand Up @@ -128,6 +128,37 @@ These examples also work with spark dataframes.
You can see the output of such example notebook code `here <https://crclz.com/popmon/reports/test_data_report.html>`_.
For all available examples, please see the `tutorials <https://popmon.readthedocs.io/en/latest/tutorials.html>`_ at read-the-docs.

Resources
=========

Presentations
-------------

+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+------------------+-------------------------+
| Title | Host | Date | Speaker |
+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+------------------+-------------------------+
| Popmon - population monitoring made easy | `Data Lunch @ Eneco <https://www.eneco.nl/>`_ | October 29, 2020 | Max Baak, Simon Brugman |
+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+------------------+-------------------------+
| Popmon - population monitoring made easy | `Data Science Summit 2020 <https://dssconf.pl/en/>`_ | October 16, 2020 | Max Baak |
+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+------------------+-------------------------+
| `Population Shift Monitoring Made Easy: the popmon package <https://youtu.be/PgaQpxzT_0g>`_ | `Online Data Science Meetup @ ING WBAA <https://www.meetup.com/nl-NL/Tech-Meetups-ING/events/>`_ | July 8 2020 | Tomas Sostak |
+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+------------------+-------------------------+
| `Popmon: Population Shift Monitoring Made Easy <https://www.youtube.com/watch?v=HE-3YeVYqPY>`_ | `PyData Fest Amsterdam 2020 <https://amsterdam.pydata.org/>`_ | June 16, 2020 | Tomas Sostak |
+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+------------------+-------------------------+
| Popmon: Population Shift Monitoring Made Easy | `Amundsen Community Meetup <https://github.com/amundsen-io/amundsen>`_ | June 4, 2020 | Max Baak |
+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+------------------+-------------------------+


Articles
--------

+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+----------------+
| Title | Date | Author |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+----------------+
| `Popmon Open Source Package — Population Shift Monitoring Made Easy <https://medium.com/wbaa/population-monitoring-open-source-1ce3139d8c3a>`_ | May 20, 2020 | Nicole Mpozika |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+----------------+


Project contributors
====================

Expand Down
8 changes: 4 additions & 4 deletions popmon/alerting/alerts_summary.py
Expand Up @@ -44,7 +44,7 @@ def __init__(
:param str read_key: key of input data to read from datastore.
:param str store_key: key of output data to store in datastore (optional).
:param str combined_variable: name of artifical variable that combines all alerts. default is '_AGGREGATE_'.
:param str combined_variable: name of artificial variable that combines all alerts. default is '_AGGREGATE_'.
:param list features: features of data frames to pick up from input data (optional).
:param list ignore_features: list of features to ignore (optional).
"""
Expand Down Expand Up @@ -77,7 +77,7 @@ def transform(self, datastore):
df = (self.get_datastore_object(data, feature, dtype=pd.DataFrame)).copy(
deep=False
)
df.columns = [feature + "_" + c for c in df.columns]
df.columns = [f"{feature}_{c}" for c in df.columns]
df_list.append(df)

# the different features could technically have different indices.
Expand All @@ -99,8 +99,8 @@ def transform(self, datastore):
dfc["worst"] = tlv[cols].values.max(axis=1) if len(cols) else 0
# colors of traffic lights
for color in ["green", "yellow", "red"]:
cols = fnmatch.filter(tlv.columns, "*_n_{}".format(color))
dfc["n_{}".format(color)] = tlv[cols].values.sum(axis=1) if len(cols) else 0
cols = fnmatch.filter(tlv.columns, f"*_n_{color}")
dfc[f"n_{color}"] = tlv[cols].values.sum(axis=1) if len(cols) else 0

# store combination of traffic alerts
data[self.combined_variable] = dfc
Expand Down
2 changes: 1 addition & 1 deletion popmon/notebooks/popmon_tutorial_advanced.ipynb
Expand Up @@ -356,7 +356,7 @@
" report_filepath=None,\n",
" store_key=\"html_report\",\n",
" sections_key=\"report_sections\",\n",
")"
")\n"
]
},
{
Expand Down
47 changes: 24 additions & 23 deletions popmon/pipeline/report_pipelines.py
Expand Up @@ -18,7 +18,7 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


from pathlib import PosixPath
from pathlib import Path

from ..base import Pipeline
from ..config import config
Expand All @@ -30,6 +30,7 @@
metrics_self_reference,
)
from ..visualization import (
AlertSectionGenerator,
HistogramSection,
ReportGenerator,
SectionGenerator,
Expand All @@ -46,7 +47,7 @@ def self_reference(
features=None,
skip_empty_plots=True,
last_n=0,
plot_hist_n=2,
plot_hist_n=6,
report_filepath=None,
show_stats=None,
**kwargs,
Expand Down Expand Up @@ -160,7 +161,7 @@ def rolling_reference(
features=None,
skip_empty_plots=True,
last_n=0,
plot_hist_n=2,
plot_hist_n=6,
report_filepath=None,
show_stats=None,
**kwargs,
Expand Down Expand Up @@ -218,7 +219,7 @@ def expanding_reference(
features=None,
skip_empty_plots=True,
last_n=0,
plot_hist_n=2,
plot_hist_n=6,
report_filepath=None,
show_stats=None,
**kwargs,
Expand Down Expand Up @@ -284,7 +285,7 @@ def __init__(
last_n=0,
skip_first_n=0,
skip_last_n=0,
plot_hist_n=2,
plot_hist_n=6,
):
"""Initialize an instance of Report.
Expand Down Expand Up @@ -329,35 +330,35 @@ def sg_kws(read_key):
# - a section showing all traffic light alerts of monitored statistics
# - a section with a summary of traffic light alerts
# --- o generate report
SectionGenerator(
dynamic_bounds="dynamic_bounds",
section_name=profiles_section,
static_bounds="static_bounds",
ignore_stat_endswith=["_mean", "_std", "_pull"],
**sg_kws("profiles"),
HistogramSection(
read_key="split_hists",
store_key=sections_key,
section_name=histograms_section,
hist_name_starts_with="histogram",
last_n=plot_hist_n,
description=descs.get("histograms", ""),
),
TrafficLightSectionGenerator(
section_name=traffic_lights_section, **sg_kws("traffic_lights")
),
AlertSectionGenerator(section_name=alerts_section, **sg_kws("alerts")),
SectionGenerator(
dynamic_bounds="dynamic_bounds_comparisons",
static_bounds="static_bounds_comparisons",
section_name=comparisons_section,
ignore_stat_endswith=["_mean", "_std", "_pull"],
**sg_kws("comparisons"),
),
TrafficLightSectionGenerator(
section_name=traffic_lights_section, **sg_kws("traffic_lights")
),
SectionGenerator(section_name=alerts_section, **sg_kws("alerts")),
HistogramSection(
read_key="split_hists",
store_key=sections_key,
section_name=histograms_section,
hist_name_starts_with="histogram",
last_n=plot_hist_n,
description=descs.get("histograms", ""),
SectionGenerator(
dynamic_bounds="dynamic_bounds",
section_name=profiles_section,
static_bounds="static_bounds",
ignore_stat_endswith=["_mean", "_std", "_pull"],
**sg_kws("profiles"),
),
ReportGenerator(read_key=sections_key, store_key=store_key),
]
if isinstance(report_filepath, (str, PosixPath)) and len(report_filepath) > 0:
if isinstance(report_filepath, (str, Path)) and len(report_filepath) > 0:
self.modules.append(FileWriter(store_key, file_path=report_filepath))

def transform(self, datastore):
Expand Down
4 changes: 3 additions & 1 deletion popmon/visualization/__init__.py
Expand Up @@ -20,14 +20,15 @@

# flake8: noqa

from popmon.visualization.alert_section_generator import AlertSectionGenerator
from popmon.visualization.histogram_section import HistogramSection
from popmon.visualization.report_generator import ReportGenerator
from popmon.visualization.section_generator import SectionGenerator
from popmon.visualization.traffic_light_section_generator import (
TrafficLightSectionGenerator,
)

# set matplotlib backend to batchmode when running in shell
# set matplotlib backend to batch mode when running in shell
# need to do this *before* matplotlib.pyplot gets imported
from ..visualization.backend import set_matplotlib_backend

Expand All @@ -39,4 +40,5 @@
"HistogramSection",
"ReportGenerator",
"TrafficLightSectionGenerator",
"AlertSectionGenerator",
]

0 comments on commit 756868f

Please sign in to comment.