Registry / ai-ml / facets-overview

facets-overview

JSON →
library1.1.1pypypi✓ verified 86d ago

Facets Overview is a Python library that generates interactive visualizations for analyzing machine learning datasets. It processes data into protobufs, which are then rendered by front-end web components (Polymer). The library is currently at version 1.1.1, with the last release in 2017, indicating it is no longer actively maintained.

pip install facets-overview
INSTALL
IMPORT
SIG · FACETS-OVERVIEW
F
facets-overview
ai-mlpythonv1.1.1
Install
8.1s avg
Import
1113ms
Disk
166MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 1.274s · 166.4MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 8.1s · import 0.951s · 159MB
166MB installed
● package 166MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GenericFeatureStatisticsGenerator
from facets_overview.generic_feature_statistics_generator import GenericFeatureStatisticsGenerator
Main class for generating feature statistics protobufs.
FeatureStatisticsList
from facets_overview.feature_statistics_pb2 import FeatureStatisticsList
Protobuf definition for feature statistics.

This quickstart demonstrates how to generate and display a Facets Overview visualization within a Jupyter Notebook. It uses `pandas` for data handling and `IPython.display` to render the interactive HTML. Note that this requires the `facets_overview` Jupyter nbextension to be enabled and an environment compatible with Polymer 2.

import pandas as pd from facets_overview.generic_feature_statistics_generator import GenericFeatureStatisticsGenerator from IPython.display import display, HTML # Example data data = [ {'feature1': 1, 'feature2': 'cat'}, {'feature1': 2, 'feature2': 'dog'}, {'feature1': 3, 'feature2': 'cat'} ] df = pd.DataFrame(data) # Create the FeatureStatisticsList proto for Facets Overview. gfsg = GenericFeatureStatisticsGenerator() overview_proto = gfsg.CreateFeatureStatisticsListFromDataFrame(df) protostr = overview_proto.SerializeToString().decode('utf-8') # Display the Facets Overview UI (requires Jupyter Notebook and nbextension enabled) HTML_TEMPLATE = """<link rel="import" href="/nbextensions/facets_overview/facets-overview.html"> <facets-overview id="facets-overview"></facets-overview> <script> document.querySelector("#facets-overview").protoInput = "{protostr}"; </script>""" html_output = HTML_TEMPLATE.format(protostr=protostr) display(HTML(html_output))
Debug
Known issues
breakingThe v1.0.0 release updated the underlying web component technology from Polymer 1 to Polymer 2. This can break existing display mechanisms or require browser environment updates.
fix
Ensure your Jupyter environment and browser are compatible with Polymer 2. Running old notebooks may require adjustments or specific browser versions.
affects: >=1.0.0
deprecatedFacets Overview is an abandoned library, with the last release in 2017. It relies on deprecated front-end technologies (Polymer 1/2) and older Python practices, making it largely incompatible with modern web browsers, JupyterLab, and newer Python versions (3.8+).
fix
Consider migrating to actively maintained data exploration and visualization libraries such as `pandas-profiling`, `sweetviz`, `explori`, or `TensorFlow Data Validation` (the spiritual successor by Google).
affects: all
gotchaThe display mechanism is tightly coupled to Jupyter Notebooks via nbextensions. It does not natively support JupyterLab or other Python environments without significant workarounds.
fix
Ensure you are running in a classic Jupyter Notebook environment with the `facets_overview` nbextension enabled. For JupyterLab, manual configuration or alternative rendering methods would be required, which are not officially supported.
affects: all
gotchaFacets Overview uses Google Protobuf for data serialization. There are known compatibility issues with newer `protobuf` library versions, leading to `DecodeError` or `TypeError` exceptions.
fix
Pin the `protobuf` library to an older, compatible version (e.g., `pip install protobuf<3.20`). Experimentation may be required to find a working version for your specific setup.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'facets_overview'
The `facets-overview` package is not installed in your current Python environment.
fix
Run `pip install facets-overview` to install the library.
google.protobuf.message.DecodeError: Error parsing message
This error often indicates a version mismatch between the `protobuf` library installed in your environment and the `protobuf` version used to compile the `.proto` definitions within `facets-overview`.
fix
Try installing an older version of the `protobuf` library: `pip install protobuf<3.20` (or `protobuf==3.19.0` for a specific version known to work with older Google libraries).
Javascript errors in browser console related to '<link rel="import">' or Polymer
Facets Overview relies on deprecated Web Components v0 APIs (Polymer 1/2 and HTML Imports). Modern browsers have removed support for these features.
fix
This is a fundamental limitation of an abandoned library. There is no simple fix for modern browsers. You might need to use an older browser version or a specific environment where these legacy web components are still supported.
AttributeError: 'HTML' object has no attribute '_repr_html_' (or similar non-rendering behavior in JupyterLab)
The visualization relies on Jupyter Notebook nbextensions for rendering and does not have native support or an easy integration path for JupyterLab or other environments.
fix
Ensure you are running in a classic Jupyter Notebook and that the `facets_overview` nbextension is enabled (`jupyter nbextension enable --py facets_overview`). For JupyterLab, consider using alternative libraries.
Upgrade
Version history
1.1.1latest on PyPI · released May 24, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
facets-overview — pip install facets-overview · libregistry