MatplotLibAPI 3.2.14__py3-none-any.whl → 3.2.15__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.
@@ -0,0 +1,269 @@
1
+ Metadata-Version: 2.4
2
+ Name: MatplotLibAPI
3
+ Version: 3.2.15
4
+ License-File: LICENSE
5
+ Requires-Python: >=3.8
6
+ Requires-Dist: kaleido
7
+ Requires-Dist: matplotlib
8
+ Requires-Dist: nbformat
9
+ Requires-Dist: networkx
10
+ Requires-Dist: numpy
11
+ Requires-Dist: pandas
12
+ Requires-Dist: plotly
13
+ Requires-Dist: scikit-learn
14
+ Requires-Dist: seaborn
15
+ Provides-Extra: dev
16
+ Requires-Dist: black; extra == 'dev'
17
+ Requires-Dist: pydocstyle; extra == 'dev'
18
+ Requires-Dist: pyright; extra == 'dev'
19
+ Requires-Dist: pytest; extra == 'dev'
20
+ Requires-Dist: pytest-cov; extra == 'dev'
21
+ Requires-Dist: pytest-pydocstyle; extra == 'dev'
22
+ Requires-Dist: tomli; extra == 'dev'
23
+ Description-Content-Type: text/markdown
24
+
25
+ # MatplotLibAPI
26
+
27
+ MatplotLibAPI is a Python library that simplifies the process of creating various types of plots from pandas DataFrames. It provides a high-level API for generating bubble charts, network graphs, pivot tables, tables, time series plots, treemaps, and sunburst charts.
28
+
29
+ ## Installation
30
+
31
+ To install the library, you can use pip:
32
+
33
+ ```bash
34
+ pip install MatplotLibAPI
35
+ ```
36
+
37
+ ## Generating Sample Data
38
+
39
+ The examples in this README use sample data that can be generated by running the `generate_sample_data.py` script:
40
+
41
+ ```bash
42
+ python scripts/generate_sample_data.py
43
+ ```
44
+
45
+ This will create a `data` directory with CSV files for each plot type.
46
+
47
+ ## Usage
48
+
49
+ Here's a simple example of how to create a bubble chart using MatplotLibAPI with a sample CSV file:
50
+
51
+ ```python
52
+ import pandas as pd
53
+ import matplotlib.pyplot as plt
54
+ from MatplotLibAPI import fplot_bubble
55
+
56
+ # Load the sample data
57
+ df = pd.read_csv('data/bubble.csv')
58
+
59
+ # Generate the bubble chart
60
+ fig = fplot_bubble(df, label='country', x='gdp_per_capita', y='population', z='population', title='Country Statistics')
61
+
62
+ # Display the plot
63
+ plt.show()
64
+ ```
65
+
66
+ ## Plot Types
67
+
68
+ The library supports the following plot types:
69
+
70
+ - **Bubble (Scatter plot)**
71
+ - **Bar / Stacked Bar**
72
+ - **Histogram + KDE**
73
+ - **Box / Violin**
74
+ - **Heatmap / Correlation Matrix**
75
+ - **Area**
76
+ - **Pie / Donut**
77
+ - **Waffle**
78
+ - **Sankey**
79
+ - **Network (Graph)**
80
+ - **Pivot**
81
+ - **Table**
82
+ - **Timeserie**
83
+ - **Treemap**
84
+ - **Sunburst**
85
+
86
+ ## Examples with Sample Data
87
+
88
+ This repository includes a `data` directory with sample CSV files for each plot type. Here's how you can use them:
89
+
90
+ ### Bubble Chart
91
+
92
+ ```python
93
+ import pandas as pd
94
+ from MatplotLibAPI import fplot_bubble
95
+
96
+ df = pd.read_csv('data/bubble.csv')
97
+ fig = fplot_bubble(df, label='country', x='gdp_per_capita', y='life_expectancy', z='population')
98
+ fig.show()
99
+ ```
100
+
101
+ ### Network Graph
102
+
103
+ ```python
104
+ import pandas as pd
105
+ from MatplotLibAPI import fplot_network
106
+
107
+ df = pd.read_csv('data/network.csv')
108
+ fig = fplot_network(df)
109
+ fig.show()
110
+ ```
111
+
112
+ ### Bar / Stacked Bar
113
+
114
+ ```python
115
+ import pandas as pd
116
+ from MatplotLibAPI import fplot_bar
117
+
118
+ df = pd.read_csv('data/bar.csv')
119
+ fig = fplot_bar(df, category='product', value='revenue', group='region', stacked=True)
120
+ fig.show()
121
+ ```
122
+
123
+ ### Histogram + KDE
124
+
125
+ ```python
126
+ import pandas as pd
127
+ from MatplotLibAPI import fplot_histogram_kde
128
+
129
+ df = pd.read_csv('data/histogram.csv')
130
+ fig = fplot_histogram_kde(df, column='waiting_time_minutes', bins=8, kde=True)
131
+ fig.show()
132
+ ```
133
+
134
+ ### Box / Violin
135
+
136
+ ```python
137
+ import pandas as pd
138
+ from MatplotLibAPI import fplot_box_violin
139
+
140
+ df = pd.read_csv('data/box_violin.csv')
141
+ fig = fplot_box_violin(df, column='satisfaction_score', category='department', use_violin=True)
142
+ fig.show()
143
+ ```
144
+
145
+ ### Heatmap / Correlation Matrix
146
+
147
+ ```python
148
+ import pandas as pd
149
+ from MatplotLibAPI import fplot_heatmap, fplot_correlation_matrix
150
+
151
+ heatmap_df = pd.read_csv('data/heatmap.csv')
152
+ correlation_df = pd.read_csv('data/correlation.csv')
153
+
154
+ fig_heatmap = fplot_heatmap(heatmap_df, index='month', columns='channel', values='engagements')
155
+ fig_corr = fplot_correlation_matrix(correlation_df)
156
+
157
+ fig_heatmap.show()
158
+ fig_corr.show()
159
+ ```
160
+
161
+ ### Area
162
+
163
+ ```python
164
+ import pandas as pd
165
+ from MatplotLibAPI import fplot_area
166
+
167
+ df = pd.read_csv('data/area.csv')
168
+ fig = fplot_area(df, x='quarter', y='subscriptions', label='segment', stacked=True)
169
+ fig.show()
170
+ ```
171
+
172
+ ### Pie / Donut
173
+
174
+ ```python
175
+ import pandas as pd
176
+ from MatplotLibAPI import fplot_pie_donut
177
+
178
+ df = pd.read_csv('data/pie.csv')
179
+ fig = fplot_pie_donut(df, category='device', value='sessions', donut=True)
180
+ fig.show()
181
+ ```
182
+
183
+ ### Waffle
184
+
185
+ ```python
186
+ import pandas as pd
187
+ from MatplotLibAPI import fplot_waffle
188
+
189
+ df = pd.read_csv('data/waffle.csv')
190
+ fig = fplot_waffle(df, category='device', value='sessions')
191
+ fig.show()
192
+ ```
193
+
194
+ ### Sankey
195
+
196
+ ```python
197
+ import pandas as pd
198
+ from MatplotLibAPI import fplot_sankey
199
+
200
+ df = pd.read_csv('data/sankey.csv')
201
+ fig = fplot_sankey(df, source='source', target='target', value='value')
202
+ fig.show()
203
+ ```
204
+
205
+ ### Pivot Table
206
+
207
+ ```python
208
+ import pandas as pd
209
+ from MatplotLibAPI.Pivot import plot_pivoted_bars
210
+
211
+ df = pd.read_csv('data/pivot.csv')
212
+ ax = plot_pivoted_bars(data=df, label="category", x="date", y="value")
213
+ ax.figure.show()
214
+ ```
215
+
216
+ ### Table
217
+
218
+ ```python
219
+ import pandas as pd
220
+ from MatplotLibAPI import fplot_table
221
+
222
+ df = pd.read_csv('data/table.csv')
223
+ fig = fplot_table(pd_df=df, cols=["col1", "col2"])
224
+ fig.show()
225
+ ```
226
+
227
+ ### Timeseries Plot
228
+
229
+ ```python
230
+ import pandas as pd
231
+ from MatplotLibAPI import fplot_timeserie
232
+
233
+ df = pd.read_csv('data/timeserie.csv')
234
+ fig = fplot_timeserie(pd_df=df, label="group", x="date", y="value")
235
+ fig.show()
236
+ ```
237
+
238
+ ### Treemap
239
+
240
+ ```python
241
+ import pandas as pd
242
+ from MatplotLibAPI import fplot_treemap
243
+
244
+ df = pd.read_csv('data/treemap.csv')
245
+ fig = fplot_treemap(pd_df=df, path="path", values="values")
246
+ fig.show()
247
+ ```
248
+
249
+ ### Sunburst Chart
250
+
251
+ ```python
252
+ import pandas as pd
253
+ from MatplotLibAPI import fplot_sunburst
254
+
255
+ df = pd.read_csv('data/sunburst.csv')
256
+ fig = fplot_sunburst(df, labels="labels", parents="parents", values="values")
257
+ fig.show()
258
+ ```
259
+
260
+ ### Word Cloud
261
+
262
+ ```python
263
+ import pandas as pd
264
+ from MatplotLibAPI import fplot_wordcloud
265
+
266
+ df = pd.read_csv('data/wordcloud.csv')
267
+ fig = fplot_wordcloud(df, text_column="word", weight_column="weight")
268
+ fig.show()
269
+ ```
@@ -0,0 +1,25 @@
1
+ MatplotLibAPI/Area.py,sha256=cGStEYunusfJdkKOF4199l5LH-ZV-xk8Pe8RAeBaPt8,1931
2
+ MatplotLibAPI/Bar.py,sha256=WY74gXJA3ZIpJD0WaidMo0lrT1lVEbeA0UMGFBY5yiE,2079
3
+ MatplotLibAPI/BoxViolin.py,sha256=XB4cUxUvf8LzwE2twu0gd7vn2NJYjz_mQwVqtyE7dYU,1783
4
+ MatplotLibAPI/Bubble.py,sha256=PiK6Fe77mXRTSSewXkimrNFsMa32pGRXr9jlgZJndXA,12644
5
+ MatplotLibAPI/Composite.py,sha256=k4elPk2mucw5oOH2S2GZV6mbHI9N4Nhpnte4mWLHObg,5902
6
+ MatplotLibAPI/Heatmap.py,sha256=OAF6oBXUksRKGgbN5Mn3EkZxOOZmD4LaJmk4mC01jN8,3053
7
+ MatplotLibAPI/Histogram.py,sha256=0J4uC7xy53TZKjTDWCeEjaELL7E5lQDG0MpeGfaaO6Y,1705
8
+ MatplotLibAPI/Network.py,sha256=erjKzl1Jb6j6Fiy3170xKSeF1LEBe7jPdLB6q8VZclw,30142
9
+ MatplotLibAPI/Pie.py,sha256=TBAnj4mVYy6dKPMwXPjGanTDrLrjHmA5pFvrdXbNw9A,1724
10
+ MatplotLibAPI/Pivot.py,sha256=6qH8e6U1TzUQcAIBmA_KMuHER2Uxp0-GFtwy9eJuS9A,3403
11
+ MatplotLibAPI/Sankey.py,sha256=Q_zmEcER8PGPDro6W4R_SEs17ejfi6D0q-kH6mxkFcI,1187
12
+ MatplotLibAPI/StyleTemplate.py,sha256=Y3sBbUMbfAuxaONW8YixaI0UGgC7b1xnUo0MUMV4Z98,8176
13
+ MatplotLibAPI/Sunburst.py,sha256=ksPV5D40FQcVXQQ1QOHYMc0WMCcjmt9iRrbeH4g85uE,2265
14
+ MatplotLibAPI/Table.py,sha256=EBxXJA6GKjFhWcOMwJ6Wfm-UNw3Ha5KBZ2004TYdkKY,6272
15
+ MatplotLibAPI/Timeserie.py,sha256=s6u68IlugqPMpJk-X5hr-k1WDZyx97Ov7VKQOztXo_U,10028
16
+ MatplotLibAPI/Treemap.py,sha256=a-9Z-ZzXzIV5SDgdJaW7slGELFBBks1pXZnIjcYmarw,4528
17
+ MatplotLibAPI/Waffle.py,sha256=gPREV5v92DQcvjNGuwdKDbAaRSzLBbGF8sWPGUwFyJM,2353
18
+ MatplotLibAPI/Wordcloud.py,sha256=b0vXLRjclSDr28o6LSXqnQenT7duZMmldmfyLrNOVro,9333
19
+ MatplotLibAPI/__init__.py,sha256=StUMlDJehHrO_LMCxmmMX3NpT0Ua_POCZ8GcHHpsQ5Y,2171
20
+ MatplotLibAPI/_visualization_utils.py,sha256=RQBgS-ytPorEOuWqQMHJRwaKOgmZoMW22-sjzxkui2I,1179
21
+ MatplotLibAPI/accessor.py,sha256=I497w2I9vIA9Imc3f00KiW0_a2-VABl_vHgLwRYejPE,50814
22
+ matplotlibapi-3.2.15.dist-info/METADATA,sha256=xkpRcdXfSkx0jwSCVAn-NXu4sYxuu0EXNWyiS5mSf6g,5863
23
+ matplotlibapi-3.2.15.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
24
+ matplotlibapi-3.2.15.dist-info/licenses/LICENSE,sha256=hMErKLb6YZR3lRR5zr-vxeFkvY69QAaafgSpZ5-P1dQ,1067
25
+ matplotlibapi-3.2.15.dist-info/RECORD,,
@@ -1,31 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: MatplotLibAPI
3
- Version: 3.2.14
4
- License-File: LICENSE
5
- Requires-Python: >=3.8
6
- Requires-Dist: kaleido
7
- Requires-Dist: matplotlib
8
- Requires-Dist: nbformat
9
- Requires-Dist: networkx
10
- Requires-Dist: numpy
11
- Requires-Dist: pandas
12
- Requires-Dist: plotly
13
- Requires-Dist: scikit-learn
14
- Requires-Dist: seaborn
15
- Provides-Extra: dev
16
- Requires-Dist: black; extra == 'dev'
17
- Requires-Dist: pydocstyle; extra == 'dev'
18
- Requires-Dist: pyright; extra == 'dev'
19
- Requires-Dist: pytest; extra == 'dev'
20
- Requires-Dist: pytest-cov; extra == 'dev'
21
- Requires-Dist: pytest-pydocstyle; extra == 'dev'
22
- Description-Content-Type: text/markdown
23
-
24
- # MatplotLibAPI
25
- Simple pandas Dataframe to generate plots:
26
- Bubble (Scatter plot)
27
- Network (Graph)
28
- pivot
29
- Table
30
- Timeserie
31
- Treemap
@@ -1,14 +0,0 @@
1
- MatplotLibAPI/Bubble.py,sha256=PiK6Fe77mXRTSSewXkimrNFsMa32pGRXr9jlgZJndXA,12644
2
- MatplotLibAPI/Composite.py,sha256=k4elPk2mucw5oOH2S2GZV6mbHI9N4Nhpnte4mWLHObg,5902
3
- MatplotLibAPI/Network.py,sha256=LP2hjwbOSua0heLKdOC0xbtP-MrMpeA6B5E2cDb76g8,28065
4
- MatplotLibAPI/Pivot.py,sha256=6qH8e6U1TzUQcAIBmA_KMuHER2Uxp0-GFtwy9eJuS9A,3403
5
- MatplotLibAPI/StyleTemplate.py,sha256=dYvR1tUw_FxBYvjbeuVjgkyzH0brF7BVqi4JIIbTW_I,7913
6
- MatplotLibAPI/Table.py,sha256=EBxXJA6GKjFhWcOMwJ6Wfm-UNw3Ha5KBZ2004TYdkKY,6272
7
- MatplotLibAPI/Timeserie.py,sha256=s6u68IlugqPMpJk-X5hr-k1WDZyx97Ov7VKQOztXo_U,10028
8
- MatplotLibAPI/Treemap.py,sha256=a-9Z-ZzXzIV5SDgdJaW7slGELFBBks1pXZnIjcYmarw,4528
9
- MatplotLibAPI/Wordcloud.py,sha256=b0vXLRjclSDr28o6LSXqnQenT7duZMmldmfyLrNOVro,9333
10
- MatplotLibAPI/__init__.py,sha256=PgaF4xCVBiFsCWCFgmn_8D23IO3DpXJpNS4kGnh5eNM,27194
11
- matplotlibapi-3.2.14.dist-info/METADATA,sha256=umSpirrDBJ3f_MDYFxND7UxfCK5UUjsORMjGU-NiD5E,750
12
- matplotlibapi-3.2.14.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
13
- matplotlibapi-3.2.14.dist-info/licenses/LICENSE,sha256=hMErKLb6YZR3lRR5zr-vxeFkvY69QAaafgSpZ5-P1dQ,1067
14
- matplotlibapi-3.2.14.dist-info/RECORD,,