quicksea 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
quicksea/__init__.py ADDED
@@ -0,0 +1,8 @@
1
+ """
2
+ quicksea: Fast and intuitive 2D/3D visualizations and EDA utilities powered by Plotly.
3
+ """
4
+
5
+ from .visuals import Visualizer
6
+
7
+ __version__ = "0.1.0"
8
+ __all__ = ["Visualizer"]
quicksea/visuals.py ADDED
@@ -0,0 +1,117 @@
1
+ """
2
+ Core visualization and EDA module for quicksea.
3
+ """
4
+
5
+ from typing import List, Tuple, Optional, Any
6
+ import plotly.express as px
7
+ import plotly.graph_objects as go
8
+ import pandas as pd
9
+
10
+ try:
11
+ from IPython.display import display
12
+ except ImportError:
13
+ display = print
14
+
15
+
16
+ class Visualizer:
17
+ """
18
+ Utility class for fast 2D and 3D interactive plotting and EDA using Plotly.
19
+ """
20
+
21
+ def __init__(self, color_column: Optional[str] = None):
22
+ """
23
+ Initialize the Visualizer.
24
+
25
+ Parameters
26
+ ----------
27
+ color_column : str, optional
28
+ The column name in the DataFrame to use for color-coding points.
29
+ """
30
+ self.color_column = color_column
31
+
32
+ def scatter_2d(
33
+ self,
34
+ X: pd.DataFrame,
35
+ two_d_plot_cols: List[Tuple[str, str]],
36
+ show: bool = True,
37
+ ) -> List[go.Figure]:
38
+ """
39
+ Create 2D scatter plots for pairs of features.
40
+
41
+ Parameters
42
+ ----------
43
+ X : pd.DataFrame
44
+ The input DataFrame containing the features.
45
+ two_d_plot_cols : list of tuple of (str, str)
46
+ List of (x_col, y_col) pairs to plot against each other.
47
+ show : bool, default True
48
+ Whether to immediately display the figures using fig.show().
49
+
50
+ Returns
51
+ -------
52
+ list of plotly.graph_objects.Figure
53
+ The generated Plotly figures.
54
+ """
55
+ figures = []
56
+ for x_axis_data, y_axis_data in two_d_plot_cols:
57
+ fig = px.scatter(
58
+ X,
59
+ x=x_axis_data,
60
+ y=y_axis_data,
61
+ color=self.color_column,
62
+ title=f"{y_axis_data} vs {x_axis_data}",
63
+ )
64
+ if show:
65
+ fig.show()
66
+ figures.append(fig)
67
+ return figures
68
+
69
+ def scatter_3d(
70
+ self,
71
+ X: pd.DataFrame,
72
+ three_d_plot_cols: List[Tuple[str, str, str]],
73
+ show: bool = True,
74
+ ) -> List[go.Figure]:
75
+ """
76
+ Create 3D scatter plots for triplets of features.
77
+
78
+ Parameters
79
+ ----------
80
+ X : pd.DataFrame
81
+ The input DataFrame containing the features.
82
+ three_d_plot_cols : list of tuple of (str, str, str)
83
+ List of (x_col, y_col, z_col) triplets to plot against each other.
84
+ show : bool, default True
85
+ Whether to immediately display the figures using fig.show().
86
+
87
+ Returns
88
+ -------
89
+ list of plotly.graph_objects.Figure
90
+ The generated Plotly figures.
91
+ """
92
+ figures = []
93
+ for x_axis_data, y_axis_data, z_axis_data in three_d_plot_cols:
94
+ fig = px.scatter_3d(
95
+ X,
96
+ x=x_axis_data,
97
+ y=y_axis_data,
98
+ z=z_axis_data,
99
+ color=self.color_column,
100
+ title=f"{z_axis_data} vs {y_axis_data} vs {x_axis_data}",
101
+ )
102
+ if show:
103
+ fig.show()
104
+ figures.append(fig)
105
+ return figures
106
+
107
+ def check_nan_describe(self, df: pd.DataFrame) -> None:
108
+ """
109
+ Display NaN counts and descriptive statistics for a DataFrame.
110
+
111
+ Parameters
112
+ ----------
113
+ df : pd.DataFrame
114
+ The DataFrame to inspect.
115
+ """
116
+ display(df.isna().sum())
117
+ display(df.describe())
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lennox
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,123 @@
1
+ Metadata-Version: 2.1
2
+ Name: quicksea
3
+ Version: 0.1.0
4
+ Summary: Fast and intuitive 2D/3D interactive visualizations and exploratory data analysis using Plotly.
5
+ Home-page: https://github.com/lennox/quicksea
6
+ Author: Lennox
7
+ Author-email: lennox@example.com
8
+ License: MIT
9
+ Platform: UNKNOWN
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: License :: OSI Approved :: MIT License
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Topic :: Scientific/Engineering :: Visualization
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: plotly>=5.0.0
26
+ Requires-Dist: pandas>=1.0.0
27
+ Provides-Extra: jupyter
28
+ Requires-Dist: ipython>=7.0.0; extra == "jupyter"
29
+
30
+ # quicksea 🌊
31
+
32
+ [![PyPI version](https://img.shields.io/pypi/v/quicksea.svg)](https://pypi.org/project/quicksea/)
33
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
34
+
35
+ **quicksea** is a lightweight Python library for fast, interactive 2D and 3D exploratory data visualization powered by Plotly.
36
+
37
+ ---
38
+
39
+ ## Features
40
+
41
+ - **2D Multi-Pair Scatter Plots**: Batch-plot multiple feature pairs in interactive Plotly figures with a single line of code.
42
+ - **3D Feature Exploration**: Generate interactive 3D scatter plots across triplets of features with color encoding.
43
+ - **EDA Utilities**: Quick data profiling for missing values and summary statistics.
44
+ - **Jupyter & Script Compatible**: Works out-of-the-box in Jupyter Notebooks, Google Colab, and standard Python scripts.
45
+
46
+ ---
47
+
48
+ ## Installation
49
+
50
+ Install `quicksea` from PyPI:
51
+
52
+ ```bash
53
+ pip install quicksea
54
+ ```
55
+
56
+ To include Jupyter notebook dependencies:
57
+
58
+ ```bash
59
+ pip install "quicksea[jupyter]"
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Quickstart
65
+
66
+ ```python
67
+ import pandas as pd
68
+ from quicksea import Visualizer
69
+
70
+ # Sample data
71
+ df = pd.DataFrame({
72
+ "age": [22, 38, 26, 35, 54],
73
+ "fare": [7.25, 71.28, 7.92, 53.10, 51.86],
74
+ "pclass": [3, 1, 3, 1, 1],
75
+ "survived": [0, 1, 1, 1, 0]
76
+ })
77
+
78
+ # Initialize visualizer with a color column (e.g. classification target)
79
+ viz = Visualizer(color_column="survived")
80
+
81
+ # 1. Quick EDA: missing values and descriptive statistics
82
+ viz.check_nan_describe(df)
83
+
84
+ # 2. 2D Scatter plots
85
+ pairs = [("age", "fare"), ("pclass", "fare")]
86
+ viz.scatter_2d(df, pairs)
87
+
88
+ # 3. 3D Scatter plot
89
+ triplets = [("age", "fare", "pclass")]
90
+ viz.scatter_3d(df, triplets)
91
+ ```
92
+
93
+ ---
94
+
95
+ ## API Reference
96
+
97
+ ### `Visualizer(color_column=None)`
98
+ - **`color_column`** *(str, optional)*: DataFrame column name used to group/color markers.
99
+
100
+ ### Methods
101
+
102
+ #### `scatter_2d(X, two_d_plot_cols, show=True)`
103
+ - **`X`** *(pd.DataFrame)*: Input dataset.
104
+ - **`two_d_plot_cols`** *(list of (str, str))*: List of `(x_column, y_column)` tuples.
105
+ - **`show`** *(bool, default=True)*: Whether to display each figure with `fig.show()`.
106
+ - **Returns**: `List[plotly.graph_objects.Figure]`
107
+
108
+ #### `scatter_3d(X, three_d_plot_cols, show=True)`
109
+ - **`X`** *(pd.DataFrame)*: Input dataset.
110
+ - **`three_d_plot_cols`** *(list of (str, str, str))*: List of `(x_column, y_column, z_column)` tuples.
111
+ - **`show`** *(bool, default=True)*: Whether to display each figure with `fig.show()`.
112
+ - **Returns**: `List[plotly.graph_objects.Figure]`
113
+
114
+ #### `check_nan_describe(df)`
115
+ - **`df`** *(pd.DataFrame)*: Displays NaN count and descriptive summary.
116
+
117
+ ---
118
+
119
+ ## License
120
+
121
+ MIT License. See [LICENSE](LICENSE) for details.
122
+
123
+
@@ -0,0 +1,7 @@
1
+ quicksea/__init__.py,sha256=XhYvI1u-GWpjMNhx3ak_lx_WXEgS3ifi32FmRJ1QB0Y,176
2
+ quicksea/visuals.py,sha256=IdJQr0Z3j4x8QxIyU7AlDvBeEsh_MV71li3O-O1i3B0,3345
3
+ quicksea-0.1.0.dist-info/LICENSE,sha256=Reo-kKVSu9-mBOHM2MPoxbr60wGyT-F4ak7ADPXvI0k,1063
4
+ quicksea-0.1.0.dist-info/METADATA,sha256=KR0GtafZN8ZpOiQ9C15EqFLF2RuLAm3M0J20al6Neiw,3740
5
+ quicksea-0.1.0.dist-info/WHEEL,sha256=EWGgdj_eH-g9dwsWZOTG0kmGucEuKPxGzOKD-jAVUHs,92
6
+ quicksea-0.1.0.dist-info/top_level.txt,sha256=6-m_Hq-AmSlruGvXV8u2CLt5Qh0htwRCfvApsVo7fII,9
7
+ quicksea-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.48.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ quicksea