Skip to main content

A statistical visualization package optimized to work with percentiles and histograms.

Project description

StatsPack - Statistical Visualization Package

StatsPack is a Python package designed for statistical visualization. It provides functions to create density contour plots, confidence intervals, and other statistical visualizations directly related with percentiles of 2D distributions. It was specially desined to be lightweight and avoid memory overusage.

Requirements

Python3.8+
numpy
scipy
matplotlib
colorlog
logging
datetime

Installation

You can install the StatsPack package using pip:

pip install statspack

Usage

Import the package in your Python code

import statspack

Bining Data for Contour Plots

import numpy as np
import matplotlib.pyplot as plt

# Example data
x = np.random.rand(100)
y = np.random.rand(100)
z = np.random.rand(100)

# Create contour plot data
X, Y, Z = statspack.bining(x, y, z, nbins=10, xlim=(None, None), ylim=(None, None))

# Plot the contour
plt.contour(X, Y, Z)
plt.colorbar()
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.title('Contour Plot')
plt.show()

Finding Confidence Intervals

import numpy as np

# Example PDF data
hist_pdf = np.random.rand(100)

# Find confidence interval
confidence_interval = statspack.find_confidence_interval(hist_pdf, prc=0.95)
print(f"95% Confidence Interval: {confidence_interval}")

Density Contour Plot

import numpy as np
import matplotlib.pyplot as plt

# Example data
xdata = np.random.rand(100)
ydata = np.random.rand(100)
binsx = 10
binsy = 10

# Create density contour plot
contours, levels = statspack.density_contour(xdata, ydata, binsx, binsy, verbose=True)
plt.colorbar(contours[0], label='Density')
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.title('Density Contour Plot')
plt.show()

Contour PDF

import numpy as np
import matplotlib.pyplot as plt

# Example data
x_axis = np.random.rand(100)
y_axis = np.random.rand(100)

# Create contour PDF plot
contours = statspack.contour_pdf(x_axis, y_axis, nbins=10, percent=[10, 50, 90], colors=['blue', 'green', 'red'])
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.title('Contour PDF Plot')
plt.show()

These are some of the functions provided by the StatsPack package for statistical visualization. You can refer to the function documentation in the source code for more details on their parameters and usage.

License

StatsPack is licensed under the GNU General Public License v3.0. You can find the full text of the license in the LICENSE file included with the package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

statspack-0.1.2.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

statspack-0.1.2-py2.py3-none-any.whl (20.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file statspack-0.1.2.tar.gz.

File metadata

  • Download URL: statspack-0.1.2.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for statspack-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9417238e39e1120e3a420ffb2b3d84ea451709461235c2c705a871f3e5ea3a1e
MD5 e2e9e133c59d52f52e0ada3efc783c15
BLAKE2b-256 47e49b7c4b06211bc7f10a5fe368830cd14da7c7c7100014880b71cb0215e352

See more details on using hashes here.

File details

Details for the file statspack-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: statspack-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for statspack-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b4e5b653c0a28002a869f1373e1bfd672cbefd1f28edafd7dfac6e0d2e9fdcbe
MD5 93935bfda113807f12056b045561363c
BLAKE2b-256 d2426f3f8d827d840e5c3d56b00edaddf75390519cb658efe9b7aa6d8e33a95e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page