plotly-extend-wrapper 0.0.1__tar.gz → 0.0.2__tar.gz
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.
- plotly-extend-wrapper-0.0.2/PKG-INFO +48 -0
- plotly-extend-wrapper-0.0.2/README.md +33 -0
- plotly-extend-wrapper-0.0.2/plotly_extend_wrapper/__init__.py +5 -0
- {plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/plotly_extend_wrapper/common.py +0 -2
- {plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/plotly_extend_wrapper/updater.py +0 -2
- {plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/plotly_extend_wrapper/wrapper.py +77 -6
- plotly-extend-wrapper-0.0.2/plotly_extend_wrapper.egg-info/PKG-INFO +48 -0
- {plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/pyproject.toml +2 -2
- {plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/setup.py +3 -2
- plotly-extend-wrapper-0.0.1/PKG-INFO +0 -13
- plotly-extend-wrapper-0.0.1/README.md +0 -12
- plotly-extend-wrapper-0.0.1/plotly_extend_wrapper/__init__.py +0 -7
- plotly-extend-wrapper-0.0.1/plotly_extend_wrapper.egg-info/PKG-INFO +0 -13
- {plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/LICENSE +0 -0
- {plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/plotly_extend_wrapper.egg-info/SOURCES.txt +0 -0
- {plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/plotly_extend_wrapper.egg-info/dependency_links.txt +0 -0
- {plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/plotly_extend_wrapper.egg-info/requires.txt +0 -0
- {plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/plotly_extend_wrapper.egg-info/top_level.txt +0 -0
- {plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/setup.cfg +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: plotly-extend-wrapper
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: plotly-extend-wrapper: Extended Python library for Plotly
|
|
5
|
+
Home-page: https://github.com/Laplusdestiny/plotly_extend_wrapper
|
|
6
|
+
Download-URL: https://github.com/Laplusdestiny/plotly_extend_wrapper
|
|
7
|
+
Author: Laplusdestiny
|
|
8
|
+
Author-email: prayonshootingstars@gmail.com
|
|
9
|
+
Maintainer: Laplusdestiny
|
|
10
|
+
Maintainer-email: prayonshootingstars@gmail.com
|
|
11
|
+
License: MIT
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
|
|
16
|
+
# plotly_extend_wrapper
|
|
17
|
+
|
|
18
|
+
Extended Python library for Plotly
|
|
19
|
+
|
|
20
|
+
You can make plot simply
|
|
21
|
+
|
|
22
|
+
## Requirement
|
|
23
|
+
|
|
24
|
+
- Python >= 3.7
|
|
25
|
+
- Plotly >= 5.0.0
|
|
26
|
+
- kaleido = 0.2.1
|
|
27
|
+
- pandas >= 1.1.5
|
|
28
|
+
|
|
29
|
+
## Graph
|
|
30
|
+
|
|
31
|
+
- Pie(wrapper.Plot_pie)
|
|
32
|
+
- Sunburst(wrapper.Plot_sunburst)
|
|
33
|
+
- Bubble(wrapper.Plot_bubble)
|
|
34
|
+
- Line with secondary y-axis(wrapper.Plot_line)
|
|
35
|
+
- Bubble with linear line(wrapper.Plot_bubble_with_line)
|
|
36
|
+
|
|
37
|
+
## Common function
|
|
38
|
+
|
|
39
|
+
- Updater
|
|
40
|
+
- Add options
|
|
41
|
+
- Available options
|
|
42
|
+
- x-axis title
|
|
43
|
+
- y-axis title
|
|
44
|
+
- secondary_y-axis title
|
|
45
|
+
- show legend
|
|
46
|
+
- height
|
|
47
|
+
- width
|
|
48
|
+
- marker size
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# plotly_extend_wrapper
|
|
2
|
+
|
|
3
|
+
Extended Python library for Plotly
|
|
4
|
+
|
|
5
|
+
You can make plot simply
|
|
6
|
+
|
|
7
|
+
## Requirement
|
|
8
|
+
|
|
9
|
+
- Python >= 3.7
|
|
10
|
+
- Plotly >= 5.0.0
|
|
11
|
+
- kaleido = 0.2.1
|
|
12
|
+
- pandas >= 1.1.5
|
|
13
|
+
|
|
14
|
+
## Graph
|
|
15
|
+
|
|
16
|
+
- Pie(wrapper.Plot_pie)
|
|
17
|
+
- Sunburst(wrapper.Plot_sunburst)
|
|
18
|
+
- Bubble(wrapper.Plot_bubble)
|
|
19
|
+
- Line with secondary y-axis(wrapper.Plot_line)
|
|
20
|
+
- Bubble with linear line(wrapper.Plot_bubble_with_line)
|
|
21
|
+
|
|
22
|
+
## Common function
|
|
23
|
+
|
|
24
|
+
- Updater
|
|
25
|
+
- Add options
|
|
26
|
+
- Available options
|
|
27
|
+
- x-axis title
|
|
28
|
+
- y-axis title
|
|
29
|
+
- secondary_y-axis title
|
|
30
|
+
- show legend
|
|
31
|
+
- height
|
|
32
|
+
- width
|
|
33
|
+
- marker size
|
{plotly-extend-wrapper-0.0.1 → plotly-extend-wrapper-0.0.2}/plotly_extend_wrapper/wrapper.py
RENAMED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
1
|
from plotly import express as px
|
|
4
2
|
from plotly.subplots import make_subplots
|
|
5
3
|
import pandas as pd
|
|
@@ -7,6 +5,20 @@ from plotly_extend_wrapper.common import check_directory
|
|
|
7
5
|
|
|
8
6
|
|
|
9
7
|
def Plot_pie(data: pd.DataFrame, target: str, **kwargs):
|
|
8
|
+
"""Make pie plot
|
|
9
|
+
|
|
10
|
+
Parameters
|
|
11
|
+
----------
|
|
12
|
+
data : pd.DataFrame
|
|
13
|
+
pandas.DataFrame included data to make pie chart
|
|
14
|
+
target : str
|
|
15
|
+
String which column you would like to use for pie chart
|
|
16
|
+
|
|
17
|
+
Returns
|
|
18
|
+
-------
|
|
19
|
+
plotly.graph_objects
|
|
20
|
+
Object of pie chart
|
|
21
|
+
"""
|
|
10
22
|
vc = data[target].value_counts().reset_index(name="count")
|
|
11
23
|
return px.pie(
|
|
12
24
|
vc,
|
|
@@ -17,6 +29,21 @@ def Plot_pie(data: pd.DataFrame, target: str, **kwargs):
|
|
|
17
29
|
|
|
18
30
|
|
|
19
31
|
def Plot_sunburst(data: pd.DataFrame, groups: list, **kwargs):
|
|
32
|
+
"""Make sunburst plot
|
|
33
|
+
|
|
34
|
+
Parameters
|
|
35
|
+
----------
|
|
36
|
+
data : pd.DataFrame
|
|
37
|
+
pandas.DataFrame included data to make sunburst chart
|
|
38
|
+
groups : list
|
|
39
|
+
Strings list of group
|
|
40
|
+
Changed when you replace the order
|
|
41
|
+
|
|
42
|
+
Returns
|
|
43
|
+
-------
|
|
44
|
+
plotly.graph_objects
|
|
45
|
+
Object of sunburst chart
|
|
46
|
+
"""
|
|
20
47
|
vc = data.value_counts(subset=groups).reset_index(name="count")
|
|
21
48
|
return px.sunburst(
|
|
22
49
|
vc,
|
|
@@ -26,8 +53,37 @@ def Plot_sunburst(data: pd.DataFrame, groups: list, **kwargs):
|
|
|
26
53
|
)
|
|
27
54
|
|
|
28
55
|
|
|
29
|
-
class
|
|
56
|
+
class Plot_bubble_chart():
|
|
57
|
+
"""Make bubble chart
|
|
58
|
+
"""
|
|
30
59
|
def __init__(self, df, x, y, color=None, facet_col=None, facet_row=None, rounded=None, decimals=None, normalize=False, smoothing=False, offset=0, **kwargs):
|
|
60
|
+
"""Initialize function
|
|
61
|
+
|
|
62
|
+
Parameters
|
|
63
|
+
----------
|
|
64
|
+
df : pandas.DataFrame
|
|
65
|
+
pandas.DataFrame included data to make plot
|
|
66
|
+
x : str
|
|
67
|
+
X-axis column's name
|
|
68
|
+
y : str
|
|
69
|
+
Y-axis column's name
|
|
70
|
+
color : str, optional
|
|
71
|
+
Column name you want colorize with data, by default None
|
|
72
|
+
facet_col : str, optional
|
|
73
|
+
Column name you want plot separeted vertically, by default None
|
|
74
|
+
facet_row : str, optional
|
|
75
|
+
Column name you want plot separeted horizontally, by default None
|
|
76
|
+
rounded : list, optional
|
|
77
|
+
Columns list which columns you want to round data, by default None
|
|
78
|
+
decimals : list, optional
|
|
79
|
+
Decimals list what level you want to round for each columns, by default None
|
|
80
|
+
normalize : bool, optional
|
|
81
|
+
If True, bubble size is calculated as normalized, by default False
|
|
82
|
+
smoothing : bool, optional
|
|
83
|
+
If True, bubble size were smoothed between each plot, by default False
|
|
84
|
+
offset : int, optional
|
|
85
|
+
Offset value for bubble size, by default 0
|
|
86
|
+
"""
|
|
31
87
|
self.df = df.copy()
|
|
32
88
|
self.x = x
|
|
33
89
|
self.y = y
|
|
@@ -111,8 +167,23 @@ class scatter_with_size():
|
|
|
111
167
|
return self.plot
|
|
112
168
|
|
|
113
169
|
|
|
114
|
-
def
|
|
115
|
-
|
|
170
|
+
def Plot_line(
|
|
171
|
+
df: pd.DataFrame,
|
|
172
|
+
x: str,
|
|
173
|
+
y: list,
|
|
174
|
+
secondary_y: list,
|
|
175
|
+
xtitle=None,
|
|
176
|
+
ytitle=None,
|
|
177
|
+
secondary_ytitle=None,
|
|
178
|
+
save_html_path=None,
|
|
179
|
+
vspan=None,
|
|
180
|
+
vspan_color_randomize=False,
|
|
181
|
+
sort_column=True,
|
|
182
|
+
sort_x=True,
|
|
183
|
+
opacity=0.2,
|
|
184
|
+
px_kwargs=dict(),
|
|
185
|
+
**kwargs
|
|
186
|
+
):
|
|
116
187
|
"""Make line graph with secondary y using plotly.express
|
|
117
188
|
|
|
118
189
|
Parameters
|
|
@@ -215,7 +286,7 @@ def plotly_line(df: pd.DataFrame, x, y, secondary_y, xtitle=None, ytitle=None, s
|
|
|
215
286
|
return subfig
|
|
216
287
|
|
|
217
288
|
|
|
218
|
-
def
|
|
289
|
+
def Plot_bubble_chart_with_line(bubble_plot, line_info: dict, x1, x2, xtitle=None, ytitle=None, **kwargs):
|
|
219
290
|
"""Making bubble chart with linear plot
|
|
220
291
|
|
|
221
292
|
Parameters
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: plotly-extend-wrapper
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: plotly-extend-wrapper: Extended Python library for Plotly
|
|
5
|
+
Home-page: https://github.com/Laplusdestiny/plotly_extend_wrapper
|
|
6
|
+
Download-URL: https://github.com/Laplusdestiny/plotly_extend_wrapper
|
|
7
|
+
Author: Laplusdestiny
|
|
8
|
+
Author-email: prayonshootingstars@gmail.com
|
|
9
|
+
Maintainer: Laplusdestiny
|
|
10
|
+
Maintainer-email: prayonshootingstars@gmail.com
|
|
11
|
+
License: MIT
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
|
|
16
|
+
# plotly_extend_wrapper
|
|
17
|
+
|
|
18
|
+
Extended Python library for Plotly
|
|
19
|
+
|
|
20
|
+
You can make plot simply
|
|
21
|
+
|
|
22
|
+
## Requirement
|
|
23
|
+
|
|
24
|
+
- Python >= 3.7
|
|
25
|
+
- Plotly >= 5.0.0
|
|
26
|
+
- kaleido = 0.2.1
|
|
27
|
+
- pandas >= 1.1.5
|
|
28
|
+
|
|
29
|
+
## Graph
|
|
30
|
+
|
|
31
|
+
- Pie(wrapper.Plot_pie)
|
|
32
|
+
- Sunburst(wrapper.Plot_sunburst)
|
|
33
|
+
- Bubble(wrapper.Plot_bubble)
|
|
34
|
+
- Line with secondary y-axis(wrapper.Plot_line)
|
|
35
|
+
- Bubble with linear line(wrapper.Plot_bubble_with_line)
|
|
36
|
+
|
|
37
|
+
## Common function
|
|
38
|
+
|
|
39
|
+
- Updater
|
|
40
|
+
- Add options
|
|
41
|
+
- Available options
|
|
42
|
+
- x-axis title
|
|
43
|
+
- y-axis title
|
|
44
|
+
- secondary_y-axis title
|
|
45
|
+
- show legend
|
|
46
|
+
- height
|
|
47
|
+
- width
|
|
48
|
+
- marker size
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
# Author: Laplusdestiny <prayonshootingstars@gmail.com>
|
|
3
2
|
# Copyright (c) 2023-2023 Laplusdestiny
|
|
4
3
|
# License: MIT
|
|
@@ -39,7 +38,9 @@ setup(
|
|
|
39
38
|
maintainer=AUTHOR,
|
|
40
39
|
maintainer_email=AUTHOR_EMAIL,
|
|
41
40
|
description=DESCRIPTION,
|
|
42
|
-
README=readme,
|
|
41
|
+
# README=readme,
|
|
42
|
+
long_description_content_type="text/markdown",
|
|
43
|
+
long_description=readme,
|
|
43
44
|
license=LICENSE,
|
|
44
45
|
url=URL,
|
|
45
46
|
version=VERSION,
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: plotly-extend-wrapper
|
|
3
|
-
Version: 0.0.1
|
|
4
|
-
Summary: plotly-extend-wrapper: Extended Python library for Plotly
|
|
5
|
-
Home-page: https://github.com/Laplusdestiny/plotly_extend_wrapper
|
|
6
|
-
Download-URL: https://github.com/Laplusdestiny/plotly_extend_wrapper
|
|
7
|
-
Author: Laplusdestiny
|
|
8
|
-
Author-email: prayonshootingstars@gmail.com
|
|
9
|
-
Maintainer: Laplusdestiny
|
|
10
|
-
Maintainer-email: prayonshootingstars@gmail.com
|
|
11
|
-
License: MIT
|
|
12
|
-
Requires-Python: >=3.7
|
|
13
|
-
License-File: LICENSE
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: plotly-extend-wrapper
|
|
3
|
-
Version: 0.0.1
|
|
4
|
-
Summary: plotly-extend-wrapper: Extended Python library for Plotly
|
|
5
|
-
Home-page: https://github.com/Laplusdestiny/plotly_extend_wrapper
|
|
6
|
-
Download-URL: https://github.com/Laplusdestiny/plotly_extend_wrapper
|
|
7
|
-
Author: Laplusdestiny
|
|
8
|
-
Author-email: prayonshootingstars@gmail.com
|
|
9
|
-
Maintainer: Laplusdestiny
|
|
10
|
-
Maintainer-email: prayonshootingstars@gmail.com
|
|
11
|
-
License: MIT
|
|
12
|
-
Requires-Python: >=3.7
|
|
13
|
-
License-File: LICENSE
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|