This release is a pre-release and may not be stable for production use.
pyscagnostics
Python wrapper for computing graph theoretic scatterplot diagnostics.
Scagnostics describe various measures of interest for pairs of variables, based on their appearance on a scatterplot. They are useful tool for discovering interesting or unusual scatterplots from a scatterplot matrix, without having to look at every individual plot.
Wilkinson L., Anand, A., and Grossman, R. (2006). High-Dimensional visual analytics: Interactive exploration guided by pairwise views of point distributions. IEEE Transactions on Visualization and Computer Graphics, November/December 2006 (Vol. 12, No. 6) pp. 1363-1372.
Installation
pip install pyscagnostics
Usage
from pyscagnostics import scagnostics
# Using NumPy arrays or lists
measures, _ = scagnostics(x, y)
print(measures)
# Using Pandas DataFrame
all_measures = scagnostics(df)
for measures, _ in all_measures:
print(measures)
Documentation
def scagnostics(
*args,
bins: int=50,
remove_outliers: bool=True
) -> Tuple[dict, np.ndarray]:
"""Scatterplot diagnostic (scagnostic) measures
Scagnostics describe various measures of interest for pairs of variables,
based on their appearance on a scatterplot. They are useful tool for
discovering interesting or unusual scatterplots from a scatterplot matrix,
without having to look at every individual plot.
Example:
`scagnostics` can take an x, y pair of iterables (e.g. lists or NumPy arrays):
```
from pyscagnostics import scagnostics
import numpy as np
# Simulate data for example
x = np.random.uniform(0, 1, 100)
y = np.random.uniform(0, 1, 100)
measures, bins = scagnostics(x, y)
```
A Pandas DataFrame can also be passed as the singular required argument. The
output will be a generator of results:
```
from pyscagnostics import scagnostics
import numpy as np
import pandas as pd
# Simulate data for example
x = np.random.uniform(0, 1, 100)
y = np.random.uniform(0, 1, 100)
z = np.random.uniform(0, 1, 100)
df = pd.DataFrame({
'x': x,
'y': y,
'z': z
})
results = scagnostics(df)
for x, y, result in results:
measures, bins = result
print(measures)
```
Args:
*args:
x, y: Lists or numpy arrays
df: A Pandas DataFrame
bins: Max number of bins for the hexagonal grid axis
The data are internally binned starting with a (bins x bins) hexagonal grid
and re-binned with smaller bin sizes until less than 250 empty bins remain.
remove_outliers: If True, will remove outliers before calculations
Returns:
(measures, bins)
measures is a dict with scores for each of 9 scagnostic measures.
See pyscagnostics.measure_names for a list of measures
bins is a 3 x n numpy array of x-coordinates, y-coordinates, and
counts for the hex-bin grid. The x and y coordinates are re-scaled
between 0 and 1000. This is returned for debugging and inspection purposes.
If the input is a DataFrame, the output will be a generator yielding a tuples of
scagnostic results for each column pair:
(x, y, (measures, bins))
"""
Metadata
Release files for pyscagnostics 0.1.0a4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 11.1 MB
Release files / pyscagnostics-0.1.0a4-cp38-cp38-win_amd64.whl
| Download URL | pyscagnostics-0.1.0a4-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 251.8 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
018b51796715b4e268690eb47671b05ae292bdd63fdb5db264f0ede3648899c4
|
|
BLAKE2b-256 checksum How to use checksums |
0149a45590b0877bca91ea0069ccb78d4e4ab98a5d29a16c758ba6da4bf34a10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp38-cp38-manylinux2010_x86_64.whl
| Download URL | pyscagnostics-0.1.0a4-cp38-cp38-manylinux2010_x86_64.whl |
|---|---|
| Size | 863.9 kB |
| Tags | CPython 3.8 Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
45409e91da7497394cd58f6352c3684c283ac4c29e7f08b49898dafeb8e9c1d8
|
|
BLAKE2b-256 checksum How to use checksums |
3a653878fa8dae4eafbb715b613d44c1477a6bdf08ce16d7414892f8aa77f5cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp38-cp38-manylinux2010_i686.whl
| Download URL | pyscagnostics-0.1.0a4-cp38-cp38-manylinux2010_i686.whl |
|---|---|
| Size | 824.4 kB |
| Tags | CPython 3.8 Linux glibc 2.12+ x86-32 |
|
SHA-256 checksum How to use checksums |
bb7918e9a3280cabe88757fa1e1090bb1f66d7ccd9e1282ae6619adef09a2c28
|
|
BLAKE2b-256 checksum How to use checksums |
5610f18d71361a8ccda701d9fa3207fd56556890e81019f8343dee610d80e395
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp38-cp38-manylinux1_x86_64.whl
| Download URL | pyscagnostics-0.1.0a4-cp38-cp38-manylinux1_x86_64.whl |
|---|---|
| Size | 863.9 kB |
| Tags | CPython 3.8 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
a1a2cd294c2fa0d4c6e41d48bf904753de7002242ab59b2f830ee8c56b8d8f37
|
|
BLAKE2b-256 checksum How to use checksums |
841a7647a7b865940ffbcd97d90d264a025b7c2e98d677d2248dd9abd06192ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp38-cp38-manylinux1_i686.whl
| Download URL | pyscagnostics-0.1.0a4-cp38-cp38-manylinux1_i686.whl |
|---|---|
| Size | 824.4 kB |
| Tags | CPython 3.8 Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
c798d41a1b46c9b05b83b67054f4831259a5215d8ade503ec7d9c468529d3eee
|
|
BLAKE2b-256 checksum How to use checksums |
3d238045d8e543a94ca68d5cb5058e3cfe1ed1e7525cbd62f44206708a3a3431
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp38-cp38-macosx_10_14_x86_64.whl
| Download URL | pyscagnostics-0.1.0a4-cp38-cp38-macosx_10_14_x86_64.whl |
|---|---|
| Size | 256.9 kB |
| Tags | CPython 3.8 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
f65460e44cefdf7e0d0b3ab6eb92cb5fbef57c6113b7950d1b40297eb919da1d
|
|
BLAKE2b-256 checksum How to use checksums |
df544ec93c6cd1ce90869231f3df1e7c7eb02d8875aea8af27449bcaf6c790b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp37-cp37m-win_amd64.whl
| Download URL | pyscagnostics-0.1.0a4-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 249.2 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f39959ffa4c68567396430413bc27b09d7d4bb8f8aa21e60da937254d55b6283
|
|
BLAKE2b-256 checksum How to use checksums |
6421dd1f446b38f45e8f2d6266d9e4c767439d81695c99030092f451a374e3ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp37-cp37m-manylinux2010_x86_64.whl
| Download URL | pyscagnostics-0.1.0a4-cp37-cp37m-manylinux2010_x86_64.whl |
|---|---|
| Size | 794.5 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
af563c97ac4a2db92229570ee4c050cd6a35128ef782d6a57686102dc6a2fd1d
|
|
BLAKE2b-256 checksum How to use checksums |
0af9d3ee6fcfa69a225b5d0250ec529f1e427edc3547e77e2336f68bc0193452
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp37-cp37m-manylinux2010_i686.whl
| Download URL | pyscagnostics-0.1.0a4-cp37-cp37m-manylinux2010_i686.whl |
|---|---|
| Size | 762.3 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-32 |
|
SHA-256 checksum How to use checksums |
91259e559b3a63e8f5218d456ea71453615ed653e64adc802931ad9d57790a9e
|
|
BLAKE2b-256 checksum How to use checksums |
c95878ce2cf2bc09b0482d1b2c05fdaf775aa95a39d90fbcb8f2c9ce35f56522
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp37-cp37m-manylinux1_x86_64.whl
| Download URL | pyscagnostics-0.1.0a4-cp37-cp37m-manylinux1_x86_64.whl |
|---|---|
| Size | 794.5 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
9ea783707ab7ae6ca8f785783104afb2b059c9e7c6bbd9427e507e34ad0ea30d
|
|
BLAKE2b-256 checksum How to use checksums |
9fc9718e1639ffc10e5e7de4e07b68e9642b4785fb8680666dfe6ec3c5e54a75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp37-cp37m-manylinux1_i686.whl
| Download URL | pyscagnostics-0.1.0a4-cp37-cp37m-manylinux1_i686.whl |
|---|---|
| Size | 762.3 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
36fd329ea01781825d4d877373189b2e91dc493a1ddd5878357223b01abe769d
|
|
BLAKE2b-256 checksum How to use checksums |
6fbfa20010f6fedca034ebbee57f3797b82d22ec85bcb6b59cb2846f8ec63563
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp37-cp37m-macosx_10_14_x86_64.whl
| Download URL | pyscagnostics-0.1.0a4-cp37-cp37m-macosx_10_14_x86_64.whl |
|---|---|
| Size | 256.8 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
04533671febd40b1cec09df7451afd066f04fe6d67b4bf66651ef0e43c1323e3
|
|
BLAKE2b-256 checksum How to use checksums |
5c13d30bb59b040cf6b580fee7a71a112e61b3a331dbb3edaedc6a1d22696cdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp36-cp36m-win_amd64.whl
| Download URL | pyscagnostics-0.1.0a4-cp36-cp36m-win_amd64.whl |
|---|---|
| Size | 249.0 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
dbfca4ed8ce839742408127f4408fbabf5e7ebd95bd0d1ed4ba83d49eae424f7
|
|
BLAKE2b-256 checksum How to use checksums |
2fbaf07aac95e1b68a079e67ff801cea3a688cce767febf79e59be9ab251b23d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp36-cp36m-manylinux2010_x86_64.whl
| Download URL | pyscagnostics-0.1.0a4-cp36-cp36m-manylinux2010_x86_64.whl |
|---|---|
| Size | 794.6 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
b1b0b03fd269dfa6d4b353570a40c12e84a75715dc0704d775222cf1d5f86a83
|
|
BLAKE2b-256 checksum How to use checksums |
b97fb710350d65f77cf5fc36817dd393d2235f4ca78d968bc6f4c8d9db19abf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp36-cp36m-manylinux2010_i686.whl
| Download URL | pyscagnostics-0.1.0a4-cp36-cp36m-manylinux2010_i686.whl |
|---|---|
| Size | 762.5 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-32 |
|
SHA-256 checksum How to use checksums |
dbe943b63a0f31c5c2eacc866a2683b92c65ea7808ef4ac91a7802f182a778ab
|
|
BLAKE2b-256 checksum How to use checksums |
741677010c83f6658ae4b3968b35fe950509faeb8cbcdbc70cc1535c91b9303e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp36-cp36m-manylinux1_x86_64.whl
| Download URL | pyscagnostics-0.1.0a4-cp36-cp36m-manylinux1_x86_64.whl |
|---|---|
| Size | 794.6 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
8ac026f00ac29f51983f81343f10865eb04050d0273b9e851c8dffc9a72ddd6b
|
|
BLAKE2b-256 checksum How to use checksums |
bb7af08fa0c83264b3933aa9e08f0b3c0243c86d4b29942c679b9fbf944bfb57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp36-cp36m-manylinux1_i686.whl
| Download URL | pyscagnostics-0.1.0a4-cp36-cp36m-manylinux1_i686.whl |
|---|---|
| Size | 762.5 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
d187bc1dcf3d3f442f0bc1eba53968a705a64e4e8c5cf057a0e3649cbd48b079
|
|
BLAKE2b-256 checksum How to use checksums |
5e248df2e48842996b9d687e7259880a07ffabd20702720f4b9d2dcce7f75763
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / pyscagnostics-0.1.0a4-cp36-cp36m-macosx_10_14_x86_64.whl
| Download URL | pyscagnostics-0.1.0a4-cp36-cp36m-macosx_10_14_x86_64.whl |
|---|---|
| Size | 259.5 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
ecf5fe5693af106e1a5858ccc7e7dec04106e2a5a0699da10f034b8c72905abd
|
|
BLAKE2b-256 checksum How to use checksums |
8d767931851fe57bfeeed1146c169fb4e92e1c1aa19709087a1b5b4e3b600664
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Security for pyscagnostics 0.1.0a4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.