A Python package for 2D and 3D Radial Visualization using Plotly with attribute sorting
Project description
RadViz-Plotly
| Latest Release |
|
| Examples |
|
| PyPI Downloads |
|
| License |
|
Overview
RadViz-Plotly is an open-source Python package designed for data scientists to create 2D and 3D Radial Visualization (RadViz) plots for high-dimensional datasets. These visualizations provide a comprehensive view of data distribution across dimensions, enabling better understanding and discovery of hidden insights. The package leverages the powerful interactive tools of the Plotly library.
Key Features
- 2DRadViz: Generates 2D Radial Visualizations.
- 3DRadViz: Creates 3D Radial Visualizations.
- 3DRadViz with Attribute Sorting: Creates 3D Radial Visualizations with intelligent attribute sorting based on correlation analysis.
- Interactive Visualizations: Zoom, filter labels, and rotate 3D graphs.
- Correlation-Based Grouping: Automatically groups highly correlated attributes and separates negatively correlated ones.
Quickstart
Without Local Installation
You can try RadViz-Plotly without installing it locally by following these steps:
- Click here to access interactive Jupyter notebooks. This repository contains three folders, each with datasets and a Jupyter notebook demonstrating RadViz-Plotly.
- Note: The Jupyter environment may take some time to load.
- Open one of the folders (e.g., Car Evaluation Dataset, Election Dataset, or Iris Dataset).
- Open the file with the
.ipynbextension (Jupyter notebook). - From the Cell menu in the toolbar, select Run All to execute the notebook.
Hints:
- The first run may take time to install dependencies.
- The package supports interactive features like zooming, filtering labels, and rotating 3D graphs.
- RadViz-Plotly depends on the Plotly library.
With Local Installation
- Install RadViz-Plotly using pip:
pip install RadViz-Plotly
- Clone the examples repository:
git clone https://github.com/elewah/RadViz-Plotly-Examples.git
Alternatively, download the repository as a ZIP file here. - Run the examples using Jupyter Lab to understand how to use the RadViz-Plotly package.
Gallery
Usage Examples
Basic 2D RadViz
import pandas as pd
from radviz_plotly import RadViz2D
# Load your dataset
data = pd.read_csv('your_dataset.csv')
y = data['label'] # Labels column
X = data.drop(['label'], axis=1) # Features
# Create 2D RadViz visualization
RadViz2D(y, X)
Basic 3D RadViz
import pandas as pd
from radviz_plotly import RadViz3D
# Load your dataset
data = pd.read_csv('your_dataset.csv')
y = data['label'] # Labels column
X = data.drop(['label'], axis=1) # Features
# Create 3D RadViz visualization
RadViz3D(y, X, BPs=10000) # BPs = Number of boundary points
3D RadViz with Attribute Sorting (New!)
This advanced feature automatically analyzes correlations between attributes and arranges the dimension anchors to minimize visual clutter and improve interpretability.
import pandas as pd
from radviz_plotly import RadViz3D_withSorting
# Load your dataset
data = pd.read_csv('your_dataset.csv')
y = data['label'] # Labels column
X = data.drop(['label'], axis=1) # Features
# Create 3D RadViz with intelligent attribute sorting
RadViz3D_withSorting(y, X, BPs=10000)
How it works:
- Analyzes the correlation matrix of attributes
- Groups highly correlated attributes together
- Identifies negatively correlated attribute pairs
- Uses K-means clustering to determine optimal anchor positions on the sphere
- Arranges anchors to maximize distance between negatively correlated attributes
Installation with sorting support:
# Install with sorting dependencies
pip install RadViz-Plotly[sorting]
# Or install all extras including development tools
pip install RadViz-Plotly[sorting,dev]
Requirements for sorting:
- scikit-learn >= 0.24.0
- transformations >= 2020.1.1
Example with the Breast Cancer Dataset:
import pandas as pd
from radviz_plotly import RadViz3D_withSorting
# Load dataset
data = pd.read_csv('tests/DataFolder/BreastCancer.csv')
y = data['diagnosis']
X = data.drop(['diagnosis', 'id'], axis=1)
# Create visualization with sorting
RadViz3D_withSorting(y, X, BPs=5000)
About
RadViz-Plotly was developed by a research group at the IoT Lab, Ontario Tech University. It provides tools for creating 2D and 3D Radial Visualizations, enabling data scientists to explore high-dimensional datasets interactively.
Citation
If you use RadViz-Plotly in your research, please cite the following paper:
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file radviz_plotly-0.2.0.tar.gz.
File metadata
- Download URL: radviz_plotly-0.2.0.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.14.2 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea6c6cb1d6c0341524e712460e9f18caa5e604d1f16def8d494d555e0a149c7b
|
|
| MD5 |
066213d86a43962208b857f27e619790
|
|
| BLAKE2b-256 |
4b20e1381b14914f6a7fe0035d1311372b668e12d5ca7912179b58fe7c0a8eb6
|
File details
Details for the file radviz_plotly-0.2.0-py3-none-any.whl.
File metadata
- Download URL: radviz_plotly-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.14.2 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8068542bdee645d8b0ffc855b71c6f1f2b958d21ba0c4d05921942f80365a02f
|
|
| MD5 |
bf92b733d9fc6cc1f4a527b70c697399
|
|
| BLAKE2b-256 |
20b424f6e87465c04fcd8559571cafa8c482d5ae437afc3109a82f9f16ffceae
|