bidviz 1.0.0__py3-none-any.whl → 1.1.1__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.
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bidviz
3
- Version: 1.0.0
3
+ Version: 1.1.1
4
4
  Summary: A powerful, configurable backend visualization data transformation library
5
5
  Author-email: Mohammad Amin Khara <kharama8709@gmail.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/aghabidareh/bidviz
8
8
  Project-URL: Repository, https://github.com/aghabidareh/bidviz
9
9
  Project-URL: Issues, https://github.com/aghabidareh/bidviz/issues
10
- Keywords: visualization,charts,data-transformation,pandas,analytics
10
+ Keywords: visualization,charts,data-transformation,pandas,polars,analytics
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Intended Audience :: Developers
13
13
  Classifier: License :: OSI Approved :: MIT License
@@ -23,6 +23,7 @@ Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  Requires-Dist: pandas>=2.0.0
25
25
  Requires-Dist: numpy>=1.24.0
26
+ Requires-Dist: polars>=0.20.0
26
27
  Provides-Extra: dev
27
28
  Requires-Dist: pytest>=7.4.0; extra == "dev"
28
29
  Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
@@ -43,12 +44,16 @@ Dynamic: license-file
43
44
  [![Tests](https://github.com/aghabidareh/bidviz/workflows/Tests/badge.svg)](https://github.com/aghabidareh/bidviz/actions)
44
45
  [![Coverage](https://codecov.io/gh/aghabidareh/bidviz/branch/main/graph/badge.svg)](https://codecov.io/gh/aghabidareh/bidviz)
45
46
 
46
- A powerful, configurable backend visualization data transformation library designed to bridge the gap between raw data and frontend charting libraries. Built with pandas at its core, BidViz provides a comprehensive suite of tools for data cleaning, transformation, and formatting optimized for analytics dashboards and data visualization applications.
47
+ A powerful, configurable backend visualization data transformation library designed to bridge the gap between raw data and frontend charting libraries. BidViz supports both **pandas** and **Polars** DataFrames, providing comprehensive tools for data cleaning, transformation, and formatting optimized for analytics dashboards and data visualization applications.
48
+
49
+ **NEW:** High-performance Polars support for 2-10x faster transformations on large datasets!
47
50
 
48
51
  ## Features
49
52
 
53
+ - **Dual DataFrame Support**: Works with both pandas and Polars DataFrames
54
+ - **High Performance**: Polars support for 2-10x faster transformations on large datasets
50
55
  - **12+ Chart Type Transformations**: Support for KPI cards, bar charts, line charts, pie charts, heatmaps, funnels, tables, and more
51
- - **Automatic Data Cleaning**: NaN handling, type conversion, and null sanitization
56
+ - **Automatic Data Cleaning**: NaN/null handling, type conversion, and sanitization
52
57
  - **Human-Readable Formatting**: Intelligent label generation from column names
53
58
  - **Built-in Pagination**: Server-side pagination for data tables
54
59
  - **Frontend-Ready Output**: JSON-serializable structures optimized for charting libraries
@@ -70,6 +75,8 @@ pip install bidviz[dev]
70
75
 
71
76
  ## Quick Start
72
77
 
78
+ ### With Pandas
79
+
73
80
  ```python
74
81
  import pandas as pd
75
82
  from bidviz import ChartTransformer
@@ -103,6 +110,47 @@ print(result)
103
110
  # }
104
111
  ```
105
112
 
113
+ ### With Polars (High Performance)
114
+
115
+ ```python
116
+ import polars as pl
117
+ from bidviz.polars import ChartTransformer
118
+
119
+ # Initialize the Polars transformer
120
+ transformer = ChartTransformer()
121
+
122
+ # Sample data with Polars
123
+ df = pl.DataFrame({
124
+ 'vendor': ['Vendor A', 'Vendor B', 'Vendor C'],
125
+ 'revenue': [125000, 98000, 112000]
126
+ })
127
+
128
+ # Transform to bar chart (2-10x faster for large datasets!)
129
+ result = transformer.transform_to_bar_chart(
130
+ df=df,
131
+ x_column='vendor',
132
+ y_column='revenue'
133
+ )
134
+
135
+ # Same output format as pandas version
136
+ print(result)
137
+ ```
138
+
139
+ ### Performance Comparison
140
+
141
+ | Dataset Size | Pandas | Polars | Speedup |
142
+ |--------------|--------|--------|---------|
143
+ | 1K rows | 2ms | 1ms | 2x |
144
+ | 10K rows | 18ms | 3ms | 6x |
145
+ | 100K rows | 180ms | 25ms | 7x |
146
+ | 1M rows | 2.1s | 210ms | 10x |
147
+
148
+ **When to use Polars:**
149
+ - Working with datasets > 10K rows
150
+ - Need faster API response times
151
+ - Building high-throughput data pipelines
152
+ - Want to leverage modern multi-core processors
153
+
106
154
  ## Supported Chart Types
107
155
 
108
156
  | Chart Type | Method | Use Case |
@@ -0,0 +1,32 @@
1
+ bidviz/__init__.py,sha256=NkF3-Eh_MsmkTQdCG7jra3WP3FfW8bCv4pd30LjDz0E,552
2
+ bidviz/exceptions.py,sha256=ASjWhnIEFUS2IypPSOz1i_Asfcs8V94uI7X-2LP8NII,2058
3
+ bidviz/transformer.py,sha256=ceet1EqWTpmwL9VI9iOl3wiICV0lkP3bYcpSvHL03ok,11046
4
+ bidviz/utils.py,sha256=h_tzdR7qMXzNhnA7bwPWXG1m4U8t3SmX17aevBFGrMo,4805
5
+ bidviz/core/__init__.py,sha256=SXXGnBf_H7Ld7zhs6CBtaWAu2PaEmi6TNSYWOx5LKD4,121
6
+ bidviz/core/base.py,sha256=PrcKjCb86ar0gfm5Mqw43w4zebRS2z_DFtoVo7sOnM0,1142
7
+ bidviz/polars/__init__.py,sha256=M_LiOLwcT0OV29Kl2AXE3i5L7lgFanZobsb2x6MFYt0,1536
8
+ bidviz/polars/transformer.py,sha256=E5mpItZ7X7zNXpMro-dPON3f3Dc6RhAdjLManvJ7TDY,11839
9
+ bidviz/polars/utils.py,sha256=3H2sC9zZoxw9qxXDvi-VlJdmVSk5oQ11q-Cs4GFWMH4,5768
10
+ bidviz/polars/core/__init__.py,sha256=lozLzlUdCObY6LwpGqjccHpNguLiU_ymXOLwvovBnes,143
11
+ bidviz/polars/core/base.py,sha256=a0w_N5LGyYYZH9rdSwXToVYQ3gReGL7eyWFF61txlDU,1177
12
+ bidviz/polars/transformers/__init__.py,sha256=syJ1tojZGk3ihcHrkGQ4ljXSiVOT278P46oSl-7Vfww,940
13
+ bidviz/polars/transformers/bar.py,sha256=wk7sxyWdyV1QtYBIXW6o9ec6LaMOXYMVCCJcYws3Wnw,2211
14
+ bidviz/polars/transformers/heatmap.py,sha256=YWGP8Dd_vvvLM6lv2ng6wXluAjA88J8_9GK5InrgNXs,4209
15
+ bidviz/polars/transformers/kpi.py,sha256=oQzZHQll6m8-ss6pprWsNP1czk0CJP1xx3-d6iNxiWg,1854
16
+ bidviz/polars/transformers/line.py,sha256=gGJv6zvZe9P__3LWzmUR4T7q1Pfuxmq1Cg28NiJeQcQ,4213
17
+ bidviz/polars/transformers/other.py,sha256=7vXNWG3a9fP1jSBquIWTMQ-KR6M_cHr-1ieEgtLAKRc,3805
18
+ bidviz/polars/transformers/pie.py,sha256=xo71qB5mD-cXbus-us-H-UDvVQqQUniteEa7EyhhGYI,1846
19
+ bidviz/polars/transformers/table.py,sha256=Ww0j0fxUlMwWxdIvS0u3YcPhgytp1brfskufVTS5nXk,1645
20
+ bidviz/transformers/__init__.py,sha256=z_bXeZAXfL7_kr6JSNFDDlSVA6KraiTiiqJAFQ32PMY,846
21
+ bidviz/transformers/bar.py,sha256=kjIbwPmgFmcGYuUV9_BOmuA9MNdlpac-5PrlkmrxhV8,2146
22
+ bidviz/transformers/heatmap.py,sha256=P-CP4lGLvqqXZZoDvNfr-bo4SXL1q2U-qfkW9rQG2gA,3951
23
+ bidviz/transformers/kpi.py,sha256=IJGLKgBCm1Cz9470yIrw2J6j6PA32KO7ICwN7qxNrK0,1786
24
+ bidviz/transformers/line.py,sha256=1wD9n0XSDlWEqzkWL-NidEKsjMQowgUslC22nySoHag,4119
25
+ bidviz/transformers/other.py,sha256=r_hPgW951b1aScDke6rmKzTSzvxZmGawDrWto8F_amw,3711
26
+ bidviz/transformers/pie.py,sha256=_fPg5Rmz2NQQUSQoV2AK0jrgW0Sgv14kQZPM41Sq_WY,1582
27
+ bidviz/transformers/table.py,sha256=JP-B-oTqvkQqNyY2n56GJJKuWJZTBnXJOpcwMetQ1uM,1580
28
+ bidviz-1.1.1.dist-info/licenses/LICENSE,sha256=gtUbjkVCe0nWrHAtj-adnWyYjITyH6Pi1jHY0oDib24,1075
29
+ bidviz-1.1.1.dist-info/METADATA,sha256=7x8jmrtkUx4tr2YV39D0fx9KxuWAulMEKQ02XQvwfpU,13131
30
+ bidviz-1.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
31
+ bidviz-1.1.1.dist-info/top_level.txt,sha256=X935igwVnezMJZb1F9UCfmqGuj__FY34sWr8CgLWM3A,7
32
+ bidviz-1.1.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,19 +0,0 @@
1
- bidviz/__init__.py,sha256=QybCA5HkOIZs1d_SdXTkvNlswsvVj10Zv4brKLrK9Tc,468
2
- bidviz/exceptions.py,sha256=ASjWhnIEFUS2IypPSOz1i_Asfcs8V94uI7X-2LP8NII,2058
3
- bidviz/transformer.py,sha256=ceet1EqWTpmwL9VI9iOl3wiICV0lkP3bYcpSvHL03ok,11046
4
- bidviz/utils.py,sha256=h_tzdR7qMXzNhnA7bwPWXG1m4U8t3SmX17aevBFGrMo,4805
5
- bidviz/core/__init__.py,sha256=SXXGnBf_H7Ld7zhs6CBtaWAu2PaEmi6TNSYWOx5LKD4,121
6
- bidviz/core/base.py,sha256=PrcKjCb86ar0gfm5Mqw43w4zebRS2z_DFtoVo7sOnM0,1142
7
- bidviz/transformers/__init__.py,sha256=z_bXeZAXfL7_kr6JSNFDDlSVA6KraiTiiqJAFQ32PMY,846
8
- bidviz/transformers/bar.py,sha256=kjIbwPmgFmcGYuUV9_BOmuA9MNdlpac-5PrlkmrxhV8,2146
9
- bidviz/transformers/heatmap.py,sha256=P-CP4lGLvqqXZZoDvNfr-bo4SXL1q2U-qfkW9rQG2gA,3951
10
- bidviz/transformers/kpi.py,sha256=IJGLKgBCm1Cz9470yIrw2J6j6PA32KO7ICwN7qxNrK0,1786
11
- bidviz/transformers/line.py,sha256=1wD9n0XSDlWEqzkWL-NidEKsjMQowgUslC22nySoHag,4119
12
- bidviz/transformers/other.py,sha256=r_hPgW951b1aScDke6rmKzTSzvxZmGawDrWto8F_amw,3711
13
- bidviz/transformers/pie.py,sha256=_fPg5Rmz2NQQUSQoV2AK0jrgW0Sgv14kQZPM41Sq_WY,1582
14
- bidviz/transformers/table.py,sha256=JP-B-oTqvkQqNyY2n56GJJKuWJZTBnXJOpcwMetQ1uM,1580
15
- bidviz-1.0.0.dist-info/licenses/LICENSE,sha256=gtUbjkVCe0nWrHAtj-adnWyYjITyH6Pi1jHY0oDib24,1075
16
- bidviz-1.0.0.dist-info/METADATA,sha256=cAzyk8T9nE9kXYJjbvzMwqoo_R_ZU-940pEtFE0_sEA,11781
17
- bidviz-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
- bidviz-1.0.0.dist-info/top_level.txt,sha256=X935igwVnezMJZb1F9UCfmqGuj__FY34sWr8CgLWM3A,7
19
- bidviz-1.0.0.dist-info/RECORD,,