d3blocks 2.1.0__tar.gz → 2.2.0__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.
- {d3blocks-2.1.0 → d3blocks-2.2.0}/MANIFEST.in +1 -0
- {d3blocks-2.1.0/d3blocks.egg-info → d3blocks-2.2.0}/PKG-INFO +4 -3
- {d3blocks-2.1.0 → d3blocks-2.2.0}/README.md +3 -2
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/__init__.py +1 -1
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/d3blocks.py +221 -1
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/examples.py +10 -10
- d3blocks-2.2.0/d3blocks/flowgraph/Flowgraph.py +890 -0
- d3blocks-2.2.0/d3blocks/flowgraph/__init__.py +9 -0
- d3blocks-2.2.0/d3blocks/flowgraph/d3js/d3.flowgraph.js +1407 -0
- d3blocks-2.2.0/d3blocks/flowgraph/d3js/d3.v7.min.js +2 -0
- d3blocks-2.2.0/d3blocks/flowgraph/d3js/dagre.LICENSE +19 -0
- d3blocks-2.2.0/d3blocks/flowgraph/d3js/dagre.min.js +815 -0
- d3blocks-2.2.0/d3blocks/flowgraph/d3js/elk.LICENSE.md +264 -0
- d3blocks-2.2.0/d3blocks/flowgraph/d3js/elk.bundled.js +6545 -0
- d3blocks-2.2.0/d3blocks/flowgraph/d3js/flowgraph.css +372 -0
- d3blocks-2.2.0/d3blocks/flowgraph/d3js/flowgraph.html.j2 +130 -0
- d3blocks-2.2.0/d3blocks/skills_install.py +263 -0
- d3blocks-2.2.0/d3blocks/tests/test_flowgraph.py +331 -0
- d3blocks-2.2.0/d3blocks/violin/d3js/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0/d3blocks.egg-info}/PKG-INFO +4 -3
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks.egg-info/SOURCES.txt +13 -1
- d3blocks-2.1.0/d3blocks/skills.py +0 -129
- {d3blocks-2.1.0 → d3blocks-2.2.0}/LICENSE +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/chord/Chord.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/chord/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/chord/d3js/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/chord/d3js/chord.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/chord/d3js/chord.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/chord/d3js/chord.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/circlepacking/Circlepacking.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/circlepacking/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/circlepacking/d3js/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/circlepacking/d3js/circlepacking.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/circlepacking/d3js/circlepacking.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/circlepacking/d3js/d3.v6.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/circlepacking/d3js/lodash.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/elasticgraph/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/elasticgraph/d3js/.gitkeep +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/elasticgraph/d3js/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/elasticgraph/d3js/d3.v2.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/elasticgraph/d3js/elasticgraph.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/elasticgraph/d3js/elasticgraph.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/elasticgraph/d3js/elasticgraph.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/elasticgraph/elasticgraph.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/examples_docs.py +0 -0
- {d3blocks-2.1.0/d3blocks/heatmap → d3blocks-2.2.0/d3blocks/flowgraph/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/heatmap/Heatmap.py +0 -0
- {d3blocks-2.1.0/d3blocks/heatmap/d3js → d3blocks-2.2.0/d3blocks/heatmap}/__init__.py +0 -0
- {d3blocks-2.1.0/d3blocks/imageslider → d3blocks-2.2.0/d3blocks/heatmap/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/heatmap/d3js/d3.scale.chromatic.v1.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/heatmap/d3js/d3.v4.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/heatmap/d3js/heatmap.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/heatmap/d3js/heatmap.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/heatmap/d3js/matrix.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/imageslider/Imageslider.py +0 -0
- {d3blocks-2.1.0/d3blocks/imageslider/d3js → d3blocks-2.2.0/d3blocks/imageslider}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/imageslider/d3js/.keep +0 -0
- {d3blocks-2.1.0/d3blocks/maps → d3blocks-2.2.0/d3blocks/imageslider/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/imageslider/d3js/imageslider.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/imageslider/d3js/imageslider.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/imageslider/d3js/imageslider.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/imageslider/d3js/jquery-2.1.1.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/imageslider/d3js/modernizr.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/imageslider/d3js/reset.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/logo.txt +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/maps/Maps.py +0 -0
- {d3blocks-2.1.0/d3blocks/maps/d3js → d3blocks-2.2.0/d3blocks/maps}/__init__.py +0 -0
- {d3blocks-2.1.0/d3blocks/matrix → d3blocks-2.2.0/d3blocks/maps/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/maps/d3js/d3.v6.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/maps/d3js/geojson.zip +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/maps/d3js/maps.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/maps/d3js/maps.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/maps/d3js/world.geojson +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/matrix/Matrix.py +0 -0
- {d3blocks-2.1.0/d3blocks/matrix/d3js → d3blocks-2.2.0/d3blocks/matrix}/__init__.py +0 -0
- {d3blocks-2.1.0/d3blocks/movingbubbles → d3blocks-2.2.0/d3blocks/matrix/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/matrix/d3js/d3.scale.chromatic.v1.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/matrix/d3js/d3.v4.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/matrix/d3js/matrix.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/movingbubbles/Movingbubbles.py +0 -0
- {d3blocks-2.1.0/d3blocks/movingbubbles/d3js → d3blocks-2.2.0/d3blocks/movingbubbles}/__init__.py +0 -0
- {d3blocks-2.1.0/d3blocks/particles → d3blocks-2.2.0/d3blocks/movingbubbles/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/movingbubbles/d3js/d3-3-5-5.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/movingbubbles/d3js/movingbubbles.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/movingbubbles/d3js/movingbubbles.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/particles/Particles.py +0 -0
- {d3blocks-2.1.0/d3blocks/particles/d3js → d3blocks-2.2.0/d3blocks/particles}/__init__.py +0 -0
- {d3blocks-2.1.0/d3blocks/sankey → d3blocks-2.2.0/d3blocks/particles/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/particles/d3js/d3-scale-chromatic.v1.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/particles/d3js/d3.v4.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/particles/d3js/particles.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/radialgraph/Radialgraph.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/radialgraph/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/radialgraph/d3js/__init__ .py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/radialgraph/d3js/d3.radialgraph.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/radialgraph/d3js/d3.v7.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/radialgraph/d3js/radialgraph.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/radialgraph/d3js/radialgraph.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/sankey/Sankey.py +0 -0
- {d3blocks-2.1.0/d3blocks/sankey/d3js → d3blocks-2.2.0/d3blocks/sankey}/__init__.py +0 -0
- {d3blocks-2.1.0/d3blocks/scatter → d3blocks-2.2.0/d3blocks/sankey/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/sankey/d3js/sankey.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/sankey/d3js/sankey.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/sankey/d3js/sankey.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/scatter/Scatter.py +0 -0
- {d3blocks-2.1.0/d3blocks/scatter/d3js → d3blocks-2.2.0/d3blocks/scatter}/__init__.py +0 -0
- {d3blocks-2.1.0/d3blocks/tests → d3blocks-2.2.0/d3blocks/scatter/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/scatter/d3js/associations.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/scatter/d3js/d3.v4.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/scatter/d3js/scatter.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/scatter/d3js/scatter.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/skills/d3blocks/SKILL.md +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/skills/d3blocks/references/scatter.md +0 -0
- {d3blocks-2.1.0/d3blocks/timeseries → d3blocks-2.2.0/d3blocks/tests}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tests/test_all_examples.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tests/test_chord_margins.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tests/test_d3blocks.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tests/test_medium_charts.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tests/test_movingbubbles_timedelta.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tests/test_radialgraph.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/timeseries/Timeseries.py +0 -0
- {d3blocks-2.1.0/d3blocks/timeseries/d3js → d3blocks-2.2.0/d3blocks/timeseries}/__init__.py +0 -0
- {d3blocks-2.1.0/d3blocks/tree → d3blocks-2.2.0/d3blocks/timeseries/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/timeseries/d3js/d3.v3.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/timeseries/d3js/timeseries.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/timeseries/d3js/timeseries.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/timeseries/d3js/timeseries.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tree/Tree.py +0 -0
- {d3blocks-2.1.0/d3blocks/tree/d3js → d3blocks-2.2.0/d3blocks/tree}/__init__.py +0 -0
- {d3blocks-2.1.0/d3blocks/treemap → d3blocks-2.2.0/d3blocks/tree/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tree/d3js/collapsibleTree.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tree/d3js/d3.tree.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tree/d3js/d3.v4.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tree/d3js/tree.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/tree/d3js/tree.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/treemap/Treemap.py +0 -0
- {d3blocks-2.1.0/d3blocks/treemap/d3js → d3blocks-2.2.0/d3blocks/treemap}/__init__.py +0 -0
- {d3blocks-2.1.0/d3blocks/violin → d3blocks-2.2.0/d3blocks/treemap/d3js}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/treemap/d3js/d3.v4.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/treemap/d3js/treemap.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/treemap/d3js/treemap.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/utils.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/violin/Violin.py +0 -0
- {d3blocks-2.1.0/d3blocks/violin/d3js → d3blocks-2.2.0/d3blocks/violin}/__init__.py +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/violin/d3js/d3-scale-chromatic.v1.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/violin/d3js/d3.v4.min.js +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/violin/d3js/violin.css +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks/violin/d3js/violin.html.j2 +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks.egg-info/dependency_links.txt +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks.egg-info/entry_points.txt +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks.egg-info/requires.txt +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/d3blocks.egg-info/top_level.txt +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/pyproject.toml +0 -0
- {d3blocks-2.1.0 → d3blocks-2.2.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: d3blocks
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: Python package d3blocks.
|
|
5
5
|
Author-email: Erdogan Taskesen <erdogant@gmail.com>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -42,7 +42,7 @@ Dynamic: license-file
|
|
|
42
42
|
[](https://d3blocks.github.io/d3blocks/pages/html/Documentation.html#medium-blog)
|
|
43
43
|

|
|
44
44
|

|
|
45
|
-
[](https://
|
|
45
|
+
[](https://github.com/d3blocks/d3blocks/blob/main/notebooks/d3blocks.ipynb)
|
|
46
46
|
[](https://d3blocks.github.io/d3blocks/pages/html/Documentation.html#)
|
|
47
47
|
|
|
48
48
|
###
|
|
@@ -117,6 +117,7 @@ The [documentation pages](https://d3blocks.github.io/d3blocks/) contains detaile
|
|
|
117
117
|
| 14 | [Tree](https://d3blocks.github.io/d3blocks/pages/html/Tree.html) | ``` d3.tree() ``` | [D3Blocks](https://erdogant.medium.com) |
|
|
118
118
|
| 15 | [Maps](https://d3blocks.github.io/d3blocks/pages/html/Maps.html) | ``` d3.maps() ``` | [D3Blocks](https://erdogant.medium.com) |
|
|
119
119
|
| 16 | [Circlepacking](https://d3blocks.github.io/d3blocks/pages/html/Circlepacking.html) | ``` d3.circlepacking() ``` | [D3Blocks](https://erdogant.medium.com) |
|
|
120
|
+
| 17 | [Flowgraph](https://d3blocks.github.io/d3blocks/pages/html/Flowgraph.html) | ``` d3.flowgraph() ``` | [D3Blocks](https://erdogant.medium.com) |
|
|
120
121
|
|
|
121
122
|
-------------------------------------------------------------------------
|
|
122
123
|
|
|
@@ -148,7 +149,7 @@ When HTMLs are generated, it automatically include ethical ads as a small way to
|
|
|
148
149
|
This entire project with maintenance is done thoughtfully and only in my free time. Ads can be disabled via an input parameter, and you can also support the project with a coffee donation instead.
|
|
149
150
|
|
|
150
151
|
### Star history
|
|
151
|
-
[](https://star-history.dera.page/d3blocks/d3blocks)
|
|
152
153
|
|
|
153
154
|
### References
|
|
154
155
|
* [bl.ocks](https://bl.ocks.org/)
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
[](https://d3blocks.github.io/d3blocks/pages/html/Documentation.html#medium-blog)
|
|
12
12
|

|
|
13
13
|

|
|
14
|
-
[](https://
|
|
14
|
+
[](https://github.com/d3blocks/d3blocks/blob/main/notebooks/d3blocks.ipynb)
|
|
15
15
|
[](https://d3blocks.github.io/d3blocks/pages/html/Documentation.html#)
|
|
16
16
|
|
|
17
17
|
###
|
|
@@ -86,6 +86,7 @@ The [documentation pages](https://d3blocks.github.io/d3blocks/) contains detaile
|
|
|
86
86
|
| 14 | [Tree](https://d3blocks.github.io/d3blocks/pages/html/Tree.html) | ``` d3.tree() ``` | [D3Blocks](https://erdogant.medium.com) |
|
|
87
87
|
| 15 | [Maps](https://d3blocks.github.io/d3blocks/pages/html/Maps.html) | ``` d3.maps() ``` | [D3Blocks](https://erdogant.medium.com) |
|
|
88
88
|
| 16 | [Circlepacking](https://d3blocks.github.io/d3blocks/pages/html/Circlepacking.html) | ``` d3.circlepacking() ``` | [D3Blocks](https://erdogant.medium.com) |
|
|
89
|
+
| 17 | [Flowgraph](https://d3blocks.github.io/d3blocks/pages/html/Flowgraph.html) | ``` d3.flowgraph() ``` | [D3Blocks](https://erdogant.medium.com) |
|
|
89
90
|
|
|
90
91
|
-------------------------------------------------------------------------
|
|
91
92
|
|
|
@@ -117,7 +118,7 @@ When HTMLs are generated, it automatically include ethical ads as a small way to
|
|
|
117
118
|
This entire project with maintenance is done thoughtfully and only in my free time. Ads can be disabled via an input parameter, and you can also support the project with a coffee donation instead.
|
|
118
119
|
|
|
119
120
|
### Star history
|
|
120
|
-
[](https://star-history.dera.page/d3blocks/d3blocks)
|
|
121
122
|
|
|
122
123
|
### References
|
|
123
124
|
* [bl.ocks](https://bl.ocks.org/)
|
|
@@ -30,6 +30,7 @@ try:
|
|
|
30
30
|
import d3blocks.circlepacking.Circlepacking as Circlepacking
|
|
31
31
|
import d3blocks.tree.Tree as Tree
|
|
32
32
|
import d3blocks.radialgraph.Radialgraph as Radialgraph
|
|
33
|
+
import d3blocks.flowgraph.Flowgraph as Flowgraph
|
|
33
34
|
import d3blocks.maps.Maps as Maps
|
|
34
35
|
import d3blocks.utils as utils
|
|
35
36
|
except:
|
|
@@ -49,6 +50,7 @@ except:
|
|
|
49
50
|
import circlepacking.Circlepacking as Circlepacking
|
|
50
51
|
import tree.Tree as Tree
|
|
51
52
|
import radialgraph.Radialgraph as Radialgraph
|
|
53
|
+
import flowgraph.Flowgraph as Flowgraph
|
|
52
54
|
import maps.Maps as Maps
|
|
53
55
|
import utils
|
|
54
56
|
# #####################################################
|
|
@@ -536,11 +538,13 @@ class D3Blocks():
|
|
|
536
538
|
size: list/array of with same size as (x,y).
|
|
537
539
|
Size of the samples.
|
|
538
540
|
color : list/array of hex colors with same size as (x,y)
|
|
541
|
+
|
|
539
542
|
* '#ffffff' : All dots are get the same hex color.
|
|
540
543
|
* None: The same color as for c is applied.
|
|
541
544
|
* ['#000000', '#ffffff',...]: list/array of hex colors with same size as (x,y)
|
|
542
545
|
stroke: list/array of hex colors with same size as (x,y)
|
|
543
546
|
Edgecolor of dotsize in hex colors.
|
|
547
|
+
|
|
544
548
|
* '#000000' : All dots are get the same hex color.
|
|
545
549
|
* ['#000000', '#ffffff',...]: list/array of hex colors with same size as (x,y)
|
|
546
550
|
c_gradient : String, (default: 'opaque')
|
|
@@ -2674,6 +2678,7 @@ class D3Blocks():
|
|
|
2674
2678
|
----------
|
|
2675
2679
|
df : pd.DataFrame()
|
|
2676
2680
|
Input data containing the following columns:
|
|
2681
|
+
|
|
2677
2682
|
* 'source', 'target', 'weight'
|
|
2678
2683
|
hierarchy : list
|
|
2679
2684
|
Expand or substract the hierarchical structure. No information is lossed. The eight branches are shown by default.
|
|
@@ -3075,6 +3080,220 @@ class D3Blocks():
|
|
|
3075
3080
|
if return_html:
|
|
3076
3081
|
return html
|
|
3077
3082
|
|
|
3083
|
+
def flowgraph(self,
|
|
3084
|
+
df,
|
|
3085
|
+
nodes=None,
|
|
3086
|
+
groups: dict = None,
|
|
3087
|
+
direction: str = None,
|
|
3088
|
+
layout: str = 'dagre',
|
|
3089
|
+
shape: str = 'process',
|
|
3090
|
+
color: str = 'group',
|
|
3091
|
+
cmap: str = 'Set2',
|
|
3092
|
+
edge_color: str = '#8c8c8c',
|
|
3093
|
+
nodesep: int = 40,
|
|
3094
|
+
ranksep: int = 70,
|
|
3095
|
+
edgesep: int = 20,
|
|
3096
|
+
ranker: str = 'network-simplex',
|
|
3097
|
+
curve: str = 'smooth',
|
|
3098
|
+
animate: bool = False,
|
|
3099
|
+
draggable: bool = True,
|
|
3100
|
+
show_edge_labels: bool = True,
|
|
3101
|
+
show_groups: bool = True,
|
|
3102
|
+
font: dict = {'size': 13},
|
|
3103
|
+
title: str = 'Flowgraph - D3blocks',
|
|
3104
|
+
filepath: str = 'flowgraph.html',
|
|
3105
|
+
figsize=[None, None],
|
|
3106
|
+
showfig: bool = True,
|
|
3107
|
+
overwrite: bool = True,
|
|
3108
|
+
notebook: bool = False,
|
|
3109
|
+
save_button: bool = True,
|
|
3110
|
+
show_side_panel: bool = True,
|
|
3111
|
+
show_top_panel: bool = True,
|
|
3112
|
+
dark_mode: bool = True,
|
|
3113
|
+
color_background=None,
|
|
3114
|
+
return_html: bool = False,
|
|
3115
|
+
reset_properties: bool = True):
|
|
3116
|
+
"""Flowgraph block: process flows and architecture diagrams.
|
|
3117
|
+
|
|
3118
|
+
Nodes are arranged in ranks along the flow direction with a layered
|
|
3119
|
+
layout, drawn as flowchart shapes and optionally nested in groups such as
|
|
3120
|
+
swimlanes, services or network boundaries. The input is either an edge
|
|
3121
|
+
list or a Mermaid flowchart.
|
|
3122
|
+
|
|
3123
|
+
Parameters
|
|
3124
|
+
----------
|
|
3125
|
+
df : pd.DataFrame, str or path-like
|
|
3126
|
+
* DataFrame with the edges. Required columns: 'source', 'target'.
|
|
3127
|
+
Optional columns: 'label' (edge text), 'weight' (line width),
|
|
3128
|
+
'variant', 'style' ('solid', 'dashed', 'dotted'), 'color' and 'animation'.
|
|
3129
|
+
* str: a Mermaid flowchart, e.g. 'flowchart LR; A[Start] --> B{Valid?}',
|
|
3130
|
+
or Markdown text containing a ```mermaid block.
|
|
3131
|
+
* Path to a Markdown file (.md, .markdown) with a ```mermaid block, so the
|
|
3132
|
+
same diagram renders on GitHub, or to a .mmd / .mermaid file.
|
|
3133
|
+
From Markdown, the first flowchart block is used.
|
|
3134
|
+
Node shapes, edge labels, dotted/thick links and (nested) subgraphs are
|
|
3135
|
+
converted; `nodes`, `groups` and `direction` override what it defines.
|
|
3136
|
+
nodes : pd.DataFrame or dict, (default: None)
|
|
3137
|
+
Per-node attributes keyed by node name (a 'name' column or the index):
|
|
3138
|
+
* 'label': display text; use '\\n' for line breaks.
|
|
3139
|
+
* 'shape': 'process', 'decision', 'terminal', 'io', 'subprocess',
|
|
3140
|
+
'database', 'queue', 'document', 'external' or 'circle'.
|
|
3141
|
+
* 'group': group (swimlane / boundary) the node belongs to.
|
|
3142
|
+
* 'color': node colour; overrides `color`.
|
|
3143
|
+
* 'tooltip': extra text or HTML shown on hover below the label.
|
|
3144
|
+
groups : dict, (default: None)
|
|
3145
|
+
Group settings: {group: {'label': str, 'parent': str, 'color': hex}}.
|
|
3146
|
+
Use 'parent' to nest groups (e.g. a subnet inside a VPC). The short form
|
|
3147
|
+
{group: parent} is also accepted.
|
|
3148
|
+
direction : str, (default: None)
|
|
3149
|
+
Flow direction: 'LR', 'TB' (or 'TD'), 'RL' or 'BT'. None: the direction
|
|
3150
|
+
of the Mermaid header, otherwise 'LR'.
|
|
3151
|
+
layout : str, (default: 'dagre')
|
|
3152
|
+
* 'dagre': layered layout with smooth edges; small output (~0.5 MB).
|
|
3153
|
+
* 'elk': ELK layered layout with orthogonal edge routing and native
|
|
3154
|
+
nested groups; tidier for architecture diagrams, adds ~1.5 MB to the HTML.
|
|
3155
|
+
shape : str, (default: 'process')
|
|
3156
|
+
Default shape for nodes without one.
|
|
3157
|
+
color : str, (default: 'group')
|
|
3158
|
+
* 'group': colour nodes by group.
|
|
3159
|
+
* 'shape': colour nodes by shape.
|
|
3160
|
+
* '#RRGGBB': one colour for all nodes.
|
|
3161
|
+
cmap : str, (default: 'Set2')
|
|
3162
|
+
Colormap for group / shape colouring.
|
|
3163
|
+
edge_color : str, (default: '#8c8c8c')
|
|
3164
|
+
Default edge colour.
|
|
3165
|
+
nodesep : int, (default: 40)
|
|
3166
|
+
Pixels between nodes in the same rank.
|
|
3167
|
+
ranksep : int, (default: 70)
|
|
3168
|
+
Pixels between ranks.
|
|
3169
|
+
edgesep : int, (default: 20)
|
|
3170
|
+
Pixels between parallel edges.
|
|
3171
|
+
ranker : str, (default: 'network-simplex')
|
|
3172
|
+
dagre ranking algorithm: 'network-simplex', 'tight-tree' or 'longest-path'.
|
|
3173
|
+
curve : str, (default: 'smooth')
|
|
3174
|
+
Edge shape: 'smooth' (curved, or rounded corners with ELK) or 'straight'.
|
|
3175
|
+
animate : bool, (default: False)
|
|
3176
|
+
Animate pulses along the edges to show the direction of flow.
|
|
3177
|
+
draggable : bool, (default: True)
|
|
3178
|
+
Nodes can be dragged; connected edges and groups follow.
|
|
3179
|
+
show_edge_labels : bool, (default: True)
|
|
3180
|
+
Draw edge labels.
|
|
3181
|
+
show_groups : bool, (default: True)
|
|
3182
|
+
Draw groups as containers (and keep their members together).
|
|
3183
|
+
font : dict, (default: {'size': 13})
|
|
3184
|
+
Font properties.
|
|
3185
|
+
title : str, (default: 'Flowgraph - D3blocks')
|
|
3186
|
+
Title of the figure.
|
|
3187
|
+
filepath : str, (default: 'flowgraph.html')
|
|
3188
|
+
File path to save the output. None: return HTML only.
|
|
3189
|
+
figsize : list, (default: [None, None])
|
|
3190
|
+
[width, height] in pixels. None: full window.
|
|
3191
|
+
showfig : bool, (default: True)
|
|
3192
|
+
Open the chart in the browser.
|
|
3193
|
+
overwrite : bool, (default: True)
|
|
3194
|
+
Overwrite an existing file.
|
|
3195
|
+
notebook : bool, (default: False)
|
|
3196
|
+
Display inline in a Jupyter notebook, isolated in an iframe sized by
|
|
3197
|
+
`figsize` (default: full width x 650 px). The returned HTML is then
|
|
3198
|
+
that iframe.
|
|
3199
|
+
save_button : bool, (default: True)
|
|
3200
|
+
Show the SVG/PNG save buttons.
|
|
3201
|
+
show_side_panel : bool, (default: True)
|
|
3202
|
+
Show the left side panels (Export / Save, Layout, Legend).
|
|
3203
|
+
show_top_panel : bool, (default: True)
|
|
3204
|
+
Show the top bar (logo, search, fit, theme).
|
|
3205
|
+
dark_mode : bool, (default: True)
|
|
3206
|
+
Start in the dark theme.
|
|
3207
|
+
color_background : list of str, str, or None, (default: None)
|
|
3208
|
+
Backgrounds for center / top / side panels as ``[dark_hex, light_hex]``.
|
|
3209
|
+
Named themes: ``'streamlit'``, ``'darkblue'``. None → ``['#222222', '#ffffff']``.
|
|
3210
|
+
return_html : bool, (default: False)
|
|
3211
|
+
Return the HTML string.
|
|
3212
|
+
reset_properties : bool, (default: True)
|
|
3213
|
+
Recompute node and edge properties from the input.
|
|
3214
|
+
|
|
3215
|
+
Returns
|
|
3216
|
+
-------
|
|
3217
|
+
d3.node_properties : DataFrame of dictionary
|
|
3218
|
+
Node properties; edit and call d3.show() to update.
|
|
3219
|
+
d3.edge_properties : DataFrame
|
|
3220
|
+
Edge properties; edit and call d3.show() to update.
|
|
3221
|
+
d3.config : dictionary
|
|
3222
|
+
Configuration. d3.config['groups'] holds the group settings (merged with
|
|
3223
|
+
Mermaid subgraphs); edit and call d3.show(). Labels, nesting and colours
|
|
3224
|
+
are resolved from it on every draw.
|
|
3225
|
+
|
|
3226
|
+
Examples
|
|
3227
|
+
--------
|
|
3228
|
+
>>> # Edge list with shapes and edge labels
|
|
3229
|
+
>>> import pandas as pd
|
|
3230
|
+
>>> from d3blocks import D3Blocks
|
|
3231
|
+
>>> d3 = D3Blocks(frame=False)
|
|
3232
|
+
>>> df = pd.DataFrame({'source': ['Start', 'Valid?', 'Valid?', 'Fix'],
|
|
3233
|
+
... 'target': ['Valid?', 'Done', 'Fix', 'Valid?'],
|
|
3234
|
+
... 'label': ['', 'yes', 'no', 'retry']})
|
|
3235
|
+
>>> nodes = {'Start': {'shape': 'terminal'}, 'Valid?': {'shape': 'decision'},
|
|
3236
|
+
... 'Done': {'shape': 'terminal'}}
|
|
3237
|
+
>>> d3.flowgraph(df, nodes=nodes, direction='TB')
|
|
3238
|
+
>>> # Change a node and redraw
|
|
3239
|
+
>>> d3.node_properties['Fix']['color'] = '#e15759'
|
|
3240
|
+
>>> d3.show()
|
|
3241
|
+
>>>
|
|
3242
|
+
>>> # Mermaid diagram kept in a Markdown file (renders on GitHub too)
|
|
3243
|
+
>>> d3.flowgraph('docs/process.md')
|
|
3244
|
+
>>>
|
|
3245
|
+
>>> # Mermaid flowchart with a subgraph, laid out with ELK
|
|
3246
|
+
>>> d3.flowgraph('''
|
|
3247
|
+
... flowchart LR
|
|
3248
|
+
... subgraph api [API]
|
|
3249
|
+
... gw[Gateway] --> svc[Orders]
|
|
3250
|
+
... end
|
|
3251
|
+
... svc --> db[(Postgres)]
|
|
3252
|
+
... svc -.->|events| q[[Worker]]
|
|
3253
|
+
... ''', layout='elk')
|
|
3254
|
+
|
|
3255
|
+
References
|
|
3256
|
+
----------
|
|
3257
|
+
* dagre: https://github.com/dagrejs/dagre
|
|
3258
|
+
* ELK: https://eclipse.dev/elk/
|
|
3259
|
+
* https://d3blocks.github.io/d3blocks/pages/html/Flowgraph.html
|
|
3260
|
+
|
|
3261
|
+
"""
|
|
3262
|
+
# Mermaid input (text, Markdown or file): convert to edges, nodes, groups and direction.
|
|
3263
|
+
if Flowgraph.is_mermaid_source(df):
|
|
3264
|
+
df, m_nodes, m_groups, m_direction = Flowgraph.from_mermaid(df, logger=logger)
|
|
3265
|
+
nodes = Flowgraph.merge_node_attributes(m_nodes, nodes)
|
|
3266
|
+
groups = Flowgraph.merge_group_attributes(m_groups, groups)
|
|
3267
|
+
direction = direction or m_direction
|
|
3268
|
+
direction = direction or 'LR'
|
|
3269
|
+
# Cleaning
|
|
3270
|
+
self._clean(clean_config=reset_properties, logger=logger)
|
|
3271
|
+
# Store chart
|
|
3272
|
+
self.chart = set_chart_func('Flowgraph', logger)
|
|
3273
|
+
# Store properties
|
|
3274
|
+
self.config = self.chart.set_config(
|
|
3275
|
+
config=self.config, font=font, title=title, filepath=filepath, figsize=figsize,
|
|
3276
|
+
showfig=showfig, overwrite=overwrite, notebook=notebook, direction=direction,
|
|
3277
|
+
layout=layout, nodesep=nodesep, ranksep=ranksep, edgesep=edgesep, ranker=ranker,
|
|
3278
|
+
curve=curve, animate=animate, draggable=draggable,
|
|
3279
|
+
show_edge_labels=show_edge_labels, show_groups=show_groups, groups=groups, cmap=cmap,
|
|
3280
|
+
color_background=color_background, dark_mode=dark_mode, save_button=save_button,
|
|
3281
|
+
show_side_panel=show_side_panel, show_top_panel=show_top_panel,
|
|
3282
|
+
reset_properties=reset_properties, logger=logger,
|
|
3283
|
+
)
|
|
3284
|
+
# Set default node properties
|
|
3285
|
+
if self.config['reset_properties'] or (not hasattr(self, 'node_properties')):
|
|
3286
|
+
self.set_node_properties(df, nodes=nodes, shape=shape, color=color, cmap=cmap, logger=logger)
|
|
3287
|
+
# Set edge properties
|
|
3288
|
+
self.set_edge_properties(df, edge_color=edge_color, logger=logger)
|
|
3289
|
+
|
|
3290
|
+
# Create the plot
|
|
3291
|
+
html = self.show()
|
|
3292
|
+
|
|
3293
|
+
# Return
|
|
3294
|
+
if return_html:
|
|
3295
|
+
return html
|
|
3296
|
+
|
|
3078
3297
|
def treemap(self,
|
|
3079
3298
|
df: pd.DataFrame,
|
|
3080
3299
|
margin = {"top": 40, "right": 10, "bottom": 10, "left": 10},
|
|
@@ -3490,6 +3709,7 @@ class D3Blocks():
|
|
|
3490
3709
|
Marker defaults (see previous docs). Used when building node properties.
|
|
3491
3710
|
countries : dict or None
|
|
3492
3711
|
Explicit country styling::
|
|
3712
|
+
|
|
3493
3713
|
{'World': {'color': '#D3D3D3', 'opacity': 0.6, 'line': 'none', 'linewidth': 1},
|
|
3494
3714
|
'Netherlands': {'color': '#000FFF', 'opacity': 0.8}}
|
|
3495
3715
|
Ignored when ``country_names`` is provided.
|
|
@@ -4199,7 +4419,7 @@ def set_chart_func(chart=None, logger=None):
|
|
|
4199
4419
|
if chart is not None:
|
|
4200
4420
|
if logger is not None: logger.info('Initializing [%s]' %(chart))
|
|
4201
4421
|
chart = str.capitalize(chart)
|
|
4202
|
-
if np.isin(chart, ['RadialGraph', 'Maps', 'Chord', 'Sankey', 'Timeseries', 'Violin', 'Movingbubbles', 'Scatter', 'Heatmap', 'Matrix', 'Treemap', 'Tree', 'Circlepacking', 'Radialgraph']):
|
|
4422
|
+
if np.isin(chart, ['RadialGraph', 'Maps', 'Chord', 'Sankey', 'Timeseries', 'Violin', 'Movingbubbles', 'Scatter', 'Heatmap', 'Matrix', 'Treemap', 'Tree', 'Circlepacking', 'Radialgraph', 'Flowgraph']):
|
|
4203
4423
|
chart=eval(chart)
|
|
4204
4424
|
else:
|
|
4205
4425
|
if logger is not None: logger.info('%s is not yet implemented in such manner.' %(chart))
|
|
@@ -37,7 +37,7 @@ df = d3.import_example('energy')
|
|
|
37
37
|
# Create network graph
|
|
38
38
|
html = d3.elasticgraph(
|
|
39
39
|
df,
|
|
40
|
-
show_side_panel=
|
|
40
|
+
show_side_panel=True,
|
|
41
41
|
show_top_panel=False,
|
|
42
42
|
dark_mode=True,
|
|
43
43
|
color_background='streamlit',
|
|
@@ -126,7 +126,7 @@ d3.chord(df,
|
|
|
126
126
|
from d3blocks import D3Blocks
|
|
127
127
|
d3 = D3Blocks()
|
|
128
128
|
df = d3.import_example('surfspots')
|
|
129
|
-
d3.maps(df, filepath=r'c:/temp/test/',
|
|
129
|
+
d3.maps(df, filepath=r'c:/temp/test/', show_side_panel=True, dark_mode=False)
|
|
130
130
|
|
|
131
131
|
# %%
|
|
132
132
|
# timeseries
|
|
@@ -188,7 +188,7 @@ d3.violin(x=df['labx'].values,
|
|
|
188
188
|
filepath=r'c:\temp\violine.html',
|
|
189
189
|
figsize=[None, None],
|
|
190
190
|
df=df,
|
|
191
|
-
|
|
191
|
+
show_side_panel=True,
|
|
192
192
|
dark_mode=False
|
|
193
193
|
)
|
|
194
194
|
|
|
@@ -266,8 +266,8 @@ df["weight"] = np.random.randint(1, 101, size=len(df))
|
|
|
266
266
|
html = d3.d3graph(df,
|
|
267
267
|
show_side_panel=True,
|
|
268
268
|
show_top_panel=True,
|
|
269
|
-
show_slider=True,
|
|
270
|
-
show_density=True,
|
|
269
|
+
# show_slider=True,
|
|
270
|
+
# show_density=True,
|
|
271
271
|
color_background='streamlit',
|
|
272
272
|
return_html=True,
|
|
273
273
|
showfig=True,
|
|
@@ -421,7 +421,7 @@ d3.d3graph(df,
|
|
|
421
421
|
dark_mode=True,
|
|
422
422
|
show_density=True,
|
|
423
423
|
show_slider=True,
|
|
424
|
-
|
|
424
|
+
show_side_panel=True,
|
|
425
425
|
)
|
|
426
426
|
|
|
427
427
|
adjmat = d3.vec2adjmat(df['source'], df['target'], df['weight'])
|
|
@@ -625,7 +625,7 @@ d3.show(filepath=r'c:\temp\tree.html', margin = {"top": 20, "right": 80, "bottom
|
|
|
625
625
|
link_length=120,
|
|
626
626
|
font={'size':20},
|
|
627
627
|
dark_mode=True,
|
|
628
|
-
|
|
628
|
+
show_side_panel=True,
|
|
629
629
|
)
|
|
630
630
|
|
|
631
631
|
|
|
@@ -832,7 +832,7 @@ html = d3.treemap(df, filepath=r'c:\temp\treemap1.html')
|
|
|
832
832
|
|
|
833
833
|
# Tree
|
|
834
834
|
df = d3.import_example(data='energy')
|
|
835
|
-
html = d3.
|
|
835
|
+
html = d3.treemap(df)
|
|
836
836
|
html = d3.tree(df, save_button=False)
|
|
837
837
|
html = d3.tree(df, save_button=True)
|
|
838
838
|
html = d3.tree(df, return_html=True, filepath=None)
|
|
@@ -1051,7 +1051,7 @@ d3 = D3Blocks()
|
|
|
1051
1051
|
df = d3.import_example('energy')
|
|
1052
1052
|
|
|
1053
1053
|
html = d3.circlepacking(df, filepath='c://temp//circlepacking.html', font={'size': 16}, zoom='click', figsize=[900, 1900])
|
|
1054
|
-
# html = d3.treemap(df, filepath='c://temp//treemap.html',
|
|
1054
|
+
# html = d3.treemap(df, filepath='c://temp//treemap.html', show_side_panel=True, dark_mode=True, value='count')
|
|
1055
1055
|
# html = d3.tree(df, filepath='c://temp//tree.html')
|
|
1056
1056
|
# html = d3.sankey(df)
|
|
1057
1057
|
# html = d3.chord(df)
|
|
@@ -1089,7 +1089,7 @@ d3 = D3Blocks()
|
|
|
1089
1089
|
df = d3.import_example(data='energy')
|
|
1090
1090
|
|
|
1091
1091
|
# Create the network graph
|
|
1092
|
-
d3.d3graph(df, cmap='Set2', dark_mode=False, background_color='#FFF000',
|
|
1092
|
+
d3.d3graph(df, cmap='Set2', dark_mode=False, background_color='#FFF000', show_side_panel=True, showfig=True)
|
|
1093
1093
|
# Extract the node colors from the network graph.
|
|
1094
1094
|
# node_colors = d3.D3graph.node_properties
|
|
1095
1095
|
|