d3blocks 2.2.0__tar.gz → 2.3.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.
Files changed (179) hide show
  1. {d3blocks-2.2.0 → d3blocks-2.3.0}/MANIFEST.in +3 -1
  2. d3blocks-2.3.0/PKG-INFO +181 -0
  3. d3blocks-2.3.0/README.md +150 -0
  4. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/__init__.py +1 -1
  5. d3blocks-2.3.0/d3blocks/_shared/__init__.py +208 -0
  6. d3blocks-2.3.0/d3blocks/_shared/d3js/theme.js +63 -0
  7. d3blocks-2.3.0/d3blocks/_shared/d3js/walkthrough.css +56 -0
  8. d3blocks-2.3.0/d3blocks/_shared/d3js/walkthrough.js +145 -0
  9. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/d3blocks.py +409 -11
  10. d3blocks-2.3.0/d3blocks/erd/Erd.py +477 -0
  11. d3blocks-2.3.0/d3blocks/erd/__init__.py +19 -0
  12. d3blocks-2.3.0/d3blocks/erd/d3js/d3.erd.js +739 -0
  13. d3blocks-2.3.0/d3blocks/erd/d3js/erd.css +329 -0
  14. d3blocks-2.3.0/d3blocks/erd/d3js/erd.html.j2 +122 -0
  15. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/examples.py +172 -4
  16. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/flowgraph/Flowgraph.py +524 -118
  17. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/flowgraph/d3js/d3.flowgraph.js +224 -48
  18. d3blocks-2.3.0/d3blocks/flowgraph/d3js/d3.v7.min.js +2 -0
  19. d3blocks-2.3.0/d3blocks/flowgraph/d3js/dagre.LICENSE +19 -0
  20. d3blocks-2.3.0/d3blocks/flowgraph/d3js/dagre.min.js +815 -0
  21. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/flowgraph/d3js/flowgraph.css +4 -0
  22. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/flowgraph/d3js/flowgraph.html.j2 +4 -1
  23. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/heatmap/Heatmap.py +83 -34
  24. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/heatmap/d3js/heatmap.html.j2 +25 -10
  25. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/scatter/d3js/scatter.html.j2 +3168 -2948
  26. d3blocks-2.3.0/d3blocks/sequence/Sequence.py +475 -0
  27. d3blocks-2.3.0/d3blocks/sequence/__init__.py +19 -0
  28. d3blocks-2.3.0/d3blocks/sequence/d3js/d3.sequence.js +676 -0
  29. d3blocks-2.3.0/d3blocks/sequence/d3js/sequence.css +332 -0
  30. d3blocks-2.3.0/d3blocks/sequence/d3js/sequence.html.j2 +106 -0
  31. d3blocks-2.3.0/d3blocks/tests/test_erd.py +385 -0
  32. d3blocks-2.3.0/d3blocks/tests/test_flowgraph.py +820 -0
  33. d3blocks-2.3.0/d3blocks/tests/test_sequence.py +338 -0
  34. d3blocks-2.3.0/d3blocks/treemap/d3js/__init__.py +0 -0
  35. d3blocks-2.3.0/d3blocks/violin/__init__.py +0 -0
  36. d3blocks-2.3.0/d3blocks/violin/d3js/__init__.py +0 -0
  37. d3blocks-2.3.0/d3blocks.egg-info/PKG-INFO +181 -0
  38. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks.egg-info/SOURCES.txt +22 -4
  39. {d3blocks-2.2.0 → d3blocks-2.3.0}/pyproject.toml +13 -7
  40. d3blocks-2.2.0/PKG-INFO +0 -172
  41. d3blocks-2.2.0/README.md +0 -141
  42. d3blocks-2.2.0/d3blocks/skills/d3blocks/SKILL.md +0 -77
  43. d3blocks-2.2.0/d3blocks/skills/d3blocks/references/scatter.md +0 -273
  44. d3blocks-2.2.0/d3blocks/skills_install.py +0 -263
  45. d3blocks-2.2.0/d3blocks/tests/test_flowgraph.py +0 -331
  46. d3blocks-2.2.0/d3blocks.egg-info/PKG-INFO +0 -172
  47. d3blocks-2.2.0/d3blocks.egg-info/entry_points.txt +0 -2
  48. {d3blocks-2.2.0 → d3blocks-2.3.0}/LICENSE +0 -0
  49. {d3blocks-2.2.0/d3blocks/chord → d3blocks-2.3.0/d3blocks/_shared/d3js}/__init__.py +0 -0
  50. {d3blocks-2.2.0/d3blocks/flowgraph → d3blocks-2.3.0/d3blocks/_shared}/d3js/d3.v7.min.js +0 -0
  51. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/chord/Chord.py +0 -0
  52. {d3blocks-2.2.0/d3blocks/chord/d3js → d3blocks-2.3.0/d3blocks/chord}/__init__.py +0 -0
  53. {d3blocks-2.2.0/d3blocks/circlepacking → d3blocks-2.3.0/d3blocks/chord/d3js}/__init__.py +0 -0
  54. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/chord/d3js/chord.css +0 -0
  55. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/chord/d3js/chord.html.j2 +0 -0
  56. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/chord/d3js/chord.js +0 -0
  57. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/circlepacking/Circlepacking.py +0 -0
  58. {d3blocks-2.2.0/d3blocks/circlepacking/d3js → d3blocks-2.3.0/d3blocks/circlepacking}/__init__.py +0 -0
  59. {d3blocks-2.2.0/d3blocks/elasticgraph → d3blocks-2.3.0/d3blocks/circlepacking}/d3js/__init__.py +0 -0
  60. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/circlepacking/d3js/circlepacking.css +0 -0
  61. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/circlepacking/d3js/circlepacking.html.j2 +0 -0
  62. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/circlepacking/d3js/d3.v6.min.js +0 -0
  63. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/circlepacking/d3js/lodash.min.js +0 -0
  64. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/elasticgraph/__init__.py +0 -0
  65. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/elasticgraph/d3js/.gitkeep +0 -0
  66. {d3blocks-2.2.0/d3blocks/flowgraph → d3blocks-2.3.0/d3blocks/elasticgraph}/d3js/__init__.py +0 -0
  67. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/elasticgraph/d3js/d3.v2.js +0 -0
  68. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/elasticgraph/d3js/elasticgraph.css +0 -0
  69. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/elasticgraph/d3js/elasticgraph.html.j2 +0 -0
  70. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/elasticgraph/d3js/elasticgraph.js +0 -0
  71. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/elasticgraph/elasticgraph.py +0 -0
  72. {d3blocks-2.2.0/d3blocks/heatmap → d3blocks-2.3.0/d3blocks/erd/d3js}/__init__.py +0 -0
  73. {d3blocks-2.2.0/d3blocks/flowgraph → d3blocks-2.3.0/d3blocks/erd}/d3js/dagre.LICENSE +0 -0
  74. {d3blocks-2.2.0/d3blocks/flowgraph → d3blocks-2.3.0/d3blocks/erd}/d3js/dagre.min.js +0 -0
  75. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/examples_docs.py +0 -0
  76. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/flowgraph/__init__.py +0 -0
  77. {d3blocks-2.2.0/d3blocks/heatmap → d3blocks-2.3.0/d3blocks/flowgraph}/d3js/__init__.py +0 -0
  78. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/flowgraph/d3js/elk.LICENSE.md +0 -0
  79. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/flowgraph/d3js/elk.bundled.js +0 -0
  80. {d3blocks-2.2.0/d3blocks/imageslider → d3blocks-2.3.0/d3blocks/heatmap}/__init__.py +0 -0
  81. {d3blocks-2.2.0/d3blocks/imageslider → d3blocks-2.3.0/d3blocks/heatmap}/d3js/__init__.py +0 -0
  82. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/heatmap/d3js/d3.scale.chromatic.v1.min.js +0 -0
  83. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/heatmap/d3js/d3.v4.js +0 -0
  84. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/heatmap/d3js/heatmap.css +0 -0
  85. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/heatmap/d3js/matrix.html.j2 +0 -0
  86. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/imageslider/Imageslider.py +0 -0
  87. {d3blocks-2.2.0/d3blocks/maps → d3blocks-2.3.0/d3blocks/imageslider}/__init__.py +0 -0
  88. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/imageslider/d3js/.keep +0 -0
  89. {d3blocks-2.2.0/d3blocks/maps → d3blocks-2.3.0/d3blocks/imageslider}/d3js/__init__.py +0 -0
  90. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/imageslider/d3js/imageslider.css +0 -0
  91. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/imageslider/d3js/imageslider.html.j2 +0 -0
  92. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/imageslider/d3js/imageslider.js +0 -0
  93. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/imageslider/d3js/jquery-2.1.1.js +0 -0
  94. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/imageslider/d3js/modernizr.js +0 -0
  95. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/imageslider/d3js/reset.css +0 -0
  96. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/logo.txt +0 -0
  97. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/maps/Maps.py +0 -0
  98. {d3blocks-2.2.0/d3blocks/matrix → d3blocks-2.3.0/d3blocks/maps}/__init__.py +0 -0
  99. {d3blocks-2.2.0/d3blocks/matrix → d3blocks-2.3.0/d3blocks/maps}/d3js/__init__.py +0 -0
  100. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/maps/d3js/d3.v6.min.js +0 -0
  101. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/maps/d3js/geojson.zip +0 -0
  102. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/maps/d3js/maps.css +0 -0
  103. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/maps/d3js/maps.html.j2 +0 -0
  104. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/maps/d3js/world.geojson +0 -0
  105. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/matrix/Matrix.py +0 -0
  106. {d3blocks-2.2.0/d3blocks/movingbubbles → d3blocks-2.3.0/d3blocks/matrix}/__init__.py +0 -0
  107. {d3blocks-2.2.0/d3blocks/movingbubbles → d3blocks-2.3.0/d3blocks/matrix}/d3js/__init__.py +0 -0
  108. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/matrix/d3js/d3.scale.chromatic.v1.min.js +0 -0
  109. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/matrix/d3js/d3.v4.js +0 -0
  110. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/matrix/d3js/matrix.html.j2 +0 -0
  111. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/movingbubbles/Movingbubbles.py +0 -0
  112. {d3blocks-2.2.0/d3blocks/particles → d3blocks-2.3.0/d3blocks/movingbubbles}/__init__.py +0 -0
  113. {d3blocks-2.2.0/d3blocks/particles → d3blocks-2.3.0/d3blocks/movingbubbles}/d3js/__init__.py +0 -0
  114. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/movingbubbles/d3js/d3-3-5-5.min.js +0 -0
  115. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/movingbubbles/d3js/movingbubbles.css +0 -0
  116. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/movingbubbles/d3js/movingbubbles.html.j2 +0 -0
  117. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/particles/Particles.py +0 -0
  118. {d3blocks-2.2.0/d3blocks/sankey → d3blocks-2.3.0/d3blocks/particles}/__init__.py +0 -0
  119. {d3blocks-2.2.0/d3blocks/sankey → d3blocks-2.3.0/d3blocks/particles}/d3js/__init__.py +0 -0
  120. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/particles/d3js/d3-scale-chromatic.v1.min.js +0 -0
  121. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/particles/d3js/d3.v4.min.js +0 -0
  122. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/particles/d3js/particles.html.j2 +0 -0
  123. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/radialgraph/Radialgraph.py +0 -0
  124. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/radialgraph/__init__.py +0 -0
  125. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/radialgraph/d3js/__init__ .py +0 -0
  126. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/radialgraph/d3js/d3.radialgraph.js +0 -0
  127. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/radialgraph/d3js/d3.v7.min.js +0 -0
  128. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/radialgraph/d3js/radialgraph.css +0 -0
  129. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/radialgraph/d3js/radialgraph.html.j2 +0 -0
  130. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/sankey/Sankey.py +0 -0
  131. {d3blocks-2.2.0/d3blocks/scatter → d3blocks-2.3.0/d3blocks/sankey}/__init__.py +0 -0
  132. {d3blocks-2.2.0/d3blocks/scatter → d3blocks-2.3.0/d3blocks/sankey}/d3js/__init__.py +0 -0
  133. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/sankey/d3js/sankey.css +0 -0
  134. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/sankey/d3js/sankey.html.j2 +0 -0
  135. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/sankey/d3js/sankey.js +0 -0
  136. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/scatter/Scatter.py +0 -0
  137. {d3blocks-2.2.0/d3blocks/tests → d3blocks-2.3.0/d3blocks/scatter}/__init__.py +0 -0
  138. {d3blocks-2.2.0/d3blocks/timeseries → d3blocks-2.3.0/d3blocks/scatter/d3js}/__init__.py +0 -0
  139. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/scatter/d3js/associations.js +0 -0
  140. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/scatter/d3js/d3.v4.min.js +0 -0
  141. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/scatter/d3js/scatter.css +0 -0
  142. {d3blocks-2.2.0/d3blocks/timeseries → d3blocks-2.3.0/d3blocks/sequence}/d3js/__init__.py +0 -0
  143. {d3blocks-2.2.0/d3blocks/tree → d3blocks-2.3.0/d3blocks/tests}/__init__.py +0 -0
  144. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tests/test_all_examples.py +0 -0
  145. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tests/test_chord_margins.py +0 -0
  146. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tests/test_d3blocks.py +0 -0
  147. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tests/test_medium_charts.py +0 -0
  148. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tests/test_movingbubbles_timedelta.py +0 -0
  149. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tests/test_radialgraph.py +0 -0
  150. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/timeseries/Timeseries.py +0 -0
  151. {d3blocks-2.2.0/d3blocks/tree/d3js → d3blocks-2.3.0/d3blocks/timeseries}/__init__.py +0 -0
  152. {d3blocks-2.2.0/d3blocks/treemap → d3blocks-2.3.0/d3blocks/timeseries/d3js}/__init__.py +0 -0
  153. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/timeseries/d3js/d3.v3.js +0 -0
  154. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/timeseries/d3js/timeseries.css +0 -0
  155. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/timeseries/d3js/timeseries.html.j2 +0 -0
  156. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/timeseries/d3js/timeseries.js +0 -0
  157. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tree/Tree.py +0 -0
  158. {d3blocks-2.2.0/d3blocks/treemap/d3js → d3blocks-2.3.0/d3blocks/tree}/__init__.py +0 -0
  159. {d3blocks-2.2.0/d3blocks/violin → d3blocks-2.3.0/d3blocks/tree/d3js}/__init__.py +0 -0
  160. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tree/d3js/collapsibleTree.js +0 -0
  161. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tree/d3js/d3.tree.js +0 -0
  162. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tree/d3js/d3.v4.min.js +0 -0
  163. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tree/d3js/tree.css +0 -0
  164. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/tree/d3js/tree.html.j2 +0 -0
  165. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/treemap/Treemap.py +0 -0
  166. {d3blocks-2.2.0/d3blocks/violin/d3js → d3blocks-2.3.0/d3blocks/treemap}/__init__.py +0 -0
  167. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/treemap/d3js/d3.v4.min.js +0 -0
  168. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/treemap/d3js/treemap.css +0 -0
  169. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/treemap/d3js/treemap.html.j2 +0 -0
  170. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/utils.py +0 -0
  171. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/violin/Violin.py +0 -0
  172. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/violin/d3js/d3-scale-chromatic.v1.min.js +0 -0
  173. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/violin/d3js/d3.v4.min.js +0 -0
  174. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/violin/d3js/violin.css +0 -0
  175. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks/violin/d3js/violin.html.j2 +0 -0
  176. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks.egg-info/dependency_links.txt +0 -0
  177. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks.egg-info/requires.txt +0 -0
  178. {d3blocks-2.2.0 → d3blocks-2.3.0}/d3blocks.egg-info/top_level.txt +0 -0
  179. {d3blocks-2.2.0 → d3blocks-2.3.0}/setup.cfg +0 -0
@@ -15,5 +15,7 @@ include d3blocks/maps/d3js/*
15
15
  include d3blocks/elasticgraph/d3js/*
16
16
  include d3blocks/radialgraph/d3js/*
17
17
  include d3blocks/flowgraph/d3js/*
18
+ include d3blocks/sequence/d3js/*
19
+ include d3blocks/erd/d3js/*
20
+ include d3blocks/_shared/d3js/*
18
21
  include d3blocks/*
19
- recursive-include d3blocks/skills *
@@ -0,0 +1,181 @@
1
+ Metadata-Version: 2.4
2
+ Name: d3blocks
3
+ Version: 2.3.0
4
+ Summary: Python package d3blocks.
5
+ Author-email: Erdogan Taskesen <erdogant@gmail.com>
6
+ License-Expression: GPL-3.0-or-later
7
+ Project-URL: Homepage, https://d3blocks.github.io/d3blocks
8
+ Project-URL: Download, https://github.com/d3blocks/d3blocks/archive/{version}.tar.gz
9
+ Keywords: Python,visualizations,interactive,javascript,d3js,d3blocks,network,graph,data visualization,web,extendable,extension,plugin,modular,customizable
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Intended Audience :: Education
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Operating System :: Unix
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Operating System :: MacOS
17
+ Requires-Python: >=3
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: numpy
21
+ Requires-Dist: colourmap>=1.1.10
22
+ Requires-Dist: datazets>=0.1.7
23
+ Requires-Dist: d3graph>=3.2.0
24
+ Requires-Dist: ismember>=1.0.1
25
+ Requires-Dist: pandas
26
+ Requires-Dist: tqdm
27
+ Requires-Dist: requests
28
+ Requires-Dist: jinja2
29
+ Requires-Dist: scikit-learn
30
+ Dynamic: license-file
31
+
32
+ [![Python](https://img.shields.io/pypi/pyversions/d3blocks)](https://img.shields.io/pypi/pyversions/d3blocks)
33
+ [![Pypi](https://img.shields.io/pypi/v/d3blocks)](https://pypi.org/project/d3blocks/)
34
+ [![Docs](https://img.shields.io/badge/Sphinx-Docs-blue)](https://d3blocks.github.io/d3blocks/)
35
+ [![LOC](https://sloc.xyz/github/d3blocks/d3blocks/?category=code)](https://github.com/d3blocks/d3blocks/)
36
+ [![Downloads](https://static.pepy.tech/personalized-badge/d3blocks?period=month&units=international_system&left_color=grey&right_color=brightgreen&left_text=PyPI%20downloads/month)](https://pepy.tech/project/d3blocks)
37
+ [![Downloads](https://static.pepy.tech/personalized-badge/d3blocks?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/d3blocks)
38
+ [![License](https://img.shields.io/badge/license-GPL3-green.svg)](https://github.com/d3blocks/d3blocks/blob/master/LICENSE)
39
+ [![Forks](https://img.shields.io/github/forks/d3blocks/d3blocks.svg)](https://github.com/d3blocks/d3blocks/network)
40
+ [![Open Issues](https://img.shields.io/github/issues/d3blocks/d3blocks.svg)](https://github.com/d3blocks/d3blocks/issues)
41
+ [![Project Status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
42
+ [![Medium](https://img.shields.io/badge/Medium-Blog-black)](https://d3blocks.github.io/d3blocks/Documentation.html#medium-blog)
43
+ ![GitHub Repo stars](https://img.shields.io/github/stars/d3blocks/d3blocks)
44
+ ![GitHub repo size](https://img.shields.io/github/repo-size/d3blocks/d3blocks)
45
+ [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://github.com/d3blocks/d3blocks/blob/main/notebooks/d3blocks.ipynb)
46
+ [![Donate](https://img.shields.io/badge/Support%20this%20project-grey.svg?logo=github%20sponsors)](https://d3blocks.github.io/d3blocks/Documentation.html#)
47
+ [![skills.sh](https://skills.sh/b/d3blocks/d3blocks)](https://skills.sh/d3blocks/d3blocks)
48
+
49
+ ###
50
+
51
+ <div>
52
+
53
+ <a href="https://d3blocks.github.io/d3blocks/"><img src="https://github.com/d3blocks/d3blocks/blob/main/logo.png" width="275" align="left" /></a>
54
+ ``D3Blocks`` is a Python package that builds on the graphics of d3 javascript (d3js). It allows you to create the most visually attractive and useful charts with only a few lines of Python code!
55
+ The [documentation pages](https://d3blocks.github.io/d3blocks/) contain detailed information about the working of the blocks with many examples. **⭐️ Star it if you like it ⭐️**
56
+ </div>
57
+
58
+ ---
59
+
60
+ <p align="center">
61
+ <a href="https://d3blocks.github.io/d3blocks">
62
+ <img src="https://github.com/d3blocks/d3blocks/blob/main/docs/figs/summary.png" width="600" />
63
+ </a>
64
+ </p>
65
+
66
+ ---
67
+
68
+ ### Resources and Links
69
+ - [**Example Notebooks**](https://d3blocks.github.io/d3blocks/Documentation.html#google-colab-notebooks)
70
+ - [**Documentation**](https://d3blocks.github.io/d3blocks)
71
+ - [**Bug Reports and Feature Requests**](https://github.com/d3blocks/d3blocks/issues)
72
+
73
+ ### Blogs
74
+ - [**Medium Blog**](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510)
75
+ - [**Substack with podcast**](https://erdogant.substack.com/p/d3blocks-the-python-library-to-create)
76
+ - [**Gumroad Blogs with podcast**](https://erdogant.gumroad.com/l/d3blocks-the-python-library-to-create-interactive-standalone-and-beautiful-d3-js-charts)
77
+
78
+ -------------------------------------------------------------------------
79
+ ### [Available charts](https://d3blocks.github.io/d3blocks/)
80
+
81
+
82
+ | nr | Block | Function | More Information |
83
+ |-----|------------------------------------------------------------------------------------|------------------------------|-------------------------------------------------------------------------|
84
+ | 1 | [D3graph](https://d3blocks.github.io/d3blocks/d3graph.html) | ``` d3.d3graph() ``` | [D3graph](https://medium.com/data-science-collective/how-to-turn-any-network-into-an-interactive-knowledge-graph-to-discover-hidden-insights-f49fae4757ff) |
85
+ | 2 | [Radialgraph](https://d3blocks.github.io/d3blocks/Radialgraph.html) | ``` d3.radialgraph() ``` | [Radialgraph](https://medium.com/data-science-collective/radialgraph-a-new-way-to-explore-large-networks-without-the-hairball-ea34193ddec9) |
86
+ | 3 | [Elasticgraph](https://d3blocks.github.io/d3blocks/elasticgraph.html) | ``` d3.elasticgraph() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
87
+ | 4 | [Sankey](https://d3blocks.github.io/d3blocks/Sankey.html) | ``` d3.sankey() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
88
+ | 5 | [Movingbubbles](https://d3blocks.github.io/d3blocks/MovingBubbles.html) | ``` d3.movingbubbles() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
89
+ | 6 | [Scatter](https://d3blocks.github.io/d3blocks/Scatter.html) | ``` d3.scatter() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
90
+ | 7 | [Heatmap](https://d3blocks.github.io/d3blocks/Heatmap.html) | ``` d3.heatmap() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
91
+ | 8 | [Chord diagram](https://d3blocks.github.io/d3blocks/Chord.html) | ``` d3.chord() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
92
+ | 9 | [Timeseries](https://d3blocks.github.io/d3blocks/Timeseries.html) | ``` d3.timeseries() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
93
+ | 10 | [Image slider](https://d3blocks.github.io/d3blocks/Imageslider.html) | ``` d3.imageslider() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
94
+ | 11 | [Violin plot](https://d3blocks.github.io/d3blocks/Violin.html) | ``` d3.violin() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
95
+ | 12 | [Particles](https://d3blocks.github.io/d3blocks/Particles.html) | ``` d3.particles() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
96
+ | 13 | [Treemap](https://d3blocks.github.io/d3blocks/Treemap.html) | ``` d3.treemap() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
97
+ | 14 | [Tree](https://d3blocks.github.io/d3blocks/Tree.html) | ``` d3.tree() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
98
+ | 15 | [Maps](https://d3blocks.github.io/d3blocks/Maps.html) | ``` d3.maps() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
99
+ | 16 | [Circlepacking](https://d3blocks.github.io/d3blocks/Circlepacking.html) | ``` d3.circlepacking() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
100
+ | 17 | [Flowgraph](https://d3blocks.github.io/d3blocks/Flowgraph.html) | ``` d3.flowgraph() ``` | [Dagre](https://github.com/dagrejs/dagre) |
101
+ | 18 | [Sequence](https://d3blocks.github.io/d3blocks/Sequence.html) | ``` d3.sequence() ``` | [Mermaid sequenceDiagram](https://mermaid.js.org/syntax/sequenceDiagram.html) |
102
+ | 19 | [ERD](https://d3blocks.github.io/d3blocks/ERD.html) | ``` d3.erd() ``` | [Mermaid erDiagram](https://mermaid.js.org/syntax/entityRelationshipDiagram.html) |
103
+
104
+ -------------------------------------------------------------------------
105
+
106
+ #### Installation (Pypi)
107
+ ```bash
108
+ pip install d3blocks # Normal installation
109
+ pip install -U d3blocks # Force update
110
+ ```
111
+
112
+ #### Clone
113
+ ```bash
114
+ # Clone only the latest branch to avoid downloading large history.
115
+ git config --global clone.depth 1
116
+ ```
117
+
118
+
119
+
120
+ #### Installation (from GitHub source)
121
+ ```bash
122
+ pip install git+https://github.com/d3blocks/d3blocks.git
123
+ ```
124
+
125
+ ##### Install skill:
126
+ ```bash
127
+ # for visualizations
128
+ npx skills add d3blocks/d3blocks --skill d3blocks
129
+
130
+ # for chart builder
131
+ npx skills add d3blocks/d3blocks --skill d3blocks-chart-builder
132
+
133
+ # for docs diagrams (convert a repo's Mermaid diagrams)
134
+ npx skills add d3blocks/d3blocks --skill d3blocks-docs-diagrams
135
+ ```
136
+
137
+
138
+ #### Import d3blocks package
139
+ ```python
140
+ from d3blocks import D3Blocks
141
+ # Initialize
142
+ d3 = D3Blocks()
143
+ ```
144
+
145
+
146
+ ---
147
+
148
+ ### D3Blocks💙Streamlit
149
+ Every chart from D3Block can easily be incorporated into a Streamlit Dashboard. Because every D3Blocks chart is just HTML and JavaScript, you can generate the HTML in memory and embed it
150
+ A few practical rules of thumb: prefer `st.iframe` over the older `components.html` for full interactive charts, always pass an explicit pixel height, and set `show_side_panel=False` when Streamlit already owns the controls so the UI doesn't duplicate. `color_background='streamlit'` picks backgrounds that match a typical Streamlit light or dark page.
151
+
152
+ * [Minimal examples for each chart can be found in the Streamlit directory in the repo](https://github.com/d3blocks/d3blocks/tree/main/streamlit).
153
+ * [More Streamlit documentation can be found here.](https://d3blocks.github.io/d3blocks/Streamlit.html)
154
+
155
+ ---
156
+
157
+ ### Ethical Ads
158
+ When HTMLs are generated, it automatically includes ethical ads as a small way to support development.
159
+ I maintain this entire project thoughtfully and in my free time. Ads can be disabled via an input parameter, and you can also support the project with a coffee donation instead.
160
+
161
+ ### Star history
162
+ [![Star History Chart](https://star-history.dera.page/svg?repos=d3blocks/d3blocks)](https://star-history.dera.page/d3blocks/d3blocks)
163
+
164
+ ### References
165
+ * [bl.ocks](https://bl.ocks.org/)
166
+ * [observablehq](https://observablehq.com/top)
167
+
168
+ ### Contributors
169
+
170
+ <p align="left">
171
+ <a href="https://github.com/d3blocks/d3blocks/graphs/contributors">
172
+ <img src="https://contrib.rocks/image?repo=d3blocks/d3blocks" />
173
+ </a>
174
+ </p>
175
+
176
+ ### Maintainer
177
+ * Erdogan Taskesen, github: [erdogant](https://github.com/erdogant)
178
+ * Contributions are welcome.
179
+ * Yes! This library is entirely **free** but it runs on coffee! :) Feel free to support with a <a href="https://erdogant.github.io/donate/?currency=USD&amount=5">Coffee</a>.
180
+
181
+ [![Buy me a coffee](https://img.buymeacoffee.com/button-api/?text=Buy+me+a+coffee&emoji=&slug=erdogant&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=FFDD00)](https://www.buymeacoffee.com/erdogant)
@@ -0,0 +1,150 @@
1
+ [![Python](https://img.shields.io/pypi/pyversions/d3blocks)](https://img.shields.io/pypi/pyversions/d3blocks)
2
+ [![Pypi](https://img.shields.io/pypi/v/d3blocks)](https://pypi.org/project/d3blocks/)
3
+ [![Docs](https://img.shields.io/badge/Sphinx-Docs-blue)](https://d3blocks.github.io/d3blocks/)
4
+ [![LOC](https://sloc.xyz/github/d3blocks/d3blocks/?category=code)](https://github.com/d3blocks/d3blocks/)
5
+ [![Downloads](https://static.pepy.tech/personalized-badge/d3blocks?period=month&units=international_system&left_color=grey&right_color=brightgreen&left_text=PyPI%20downloads/month)](https://pepy.tech/project/d3blocks)
6
+ [![Downloads](https://static.pepy.tech/personalized-badge/d3blocks?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/d3blocks)
7
+ [![License](https://img.shields.io/badge/license-GPL3-green.svg)](https://github.com/d3blocks/d3blocks/blob/master/LICENSE)
8
+ [![Forks](https://img.shields.io/github/forks/d3blocks/d3blocks.svg)](https://github.com/d3blocks/d3blocks/network)
9
+ [![Open Issues](https://img.shields.io/github/issues/d3blocks/d3blocks.svg)](https://github.com/d3blocks/d3blocks/issues)
10
+ [![Project Status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
11
+ [![Medium](https://img.shields.io/badge/Medium-Blog-black)](https://d3blocks.github.io/d3blocks/Documentation.html#medium-blog)
12
+ ![GitHub Repo stars](https://img.shields.io/github/stars/d3blocks/d3blocks)
13
+ ![GitHub repo size](https://img.shields.io/github/repo-size/d3blocks/d3blocks)
14
+ [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://github.com/d3blocks/d3blocks/blob/main/notebooks/d3blocks.ipynb)
15
+ [![Donate](https://img.shields.io/badge/Support%20this%20project-grey.svg?logo=github%20sponsors)](https://d3blocks.github.io/d3blocks/Documentation.html#)
16
+ [![skills.sh](https://skills.sh/b/d3blocks/d3blocks)](https://skills.sh/d3blocks/d3blocks)
17
+
18
+ ###
19
+
20
+ <div>
21
+
22
+ <a href="https://d3blocks.github.io/d3blocks/"><img src="https://github.com/d3blocks/d3blocks/blob/main/logo.png" width="275" align="left" /></a>
23
+ ``D3Blocks`` is a Python package that builds on the graphics of d3 javascript (d3js). It allows you to create the most visually attractive and useful charts with only a few lines of Python code!
24
+ The [documentation pages](https://d3blocks.github.io/d3blocks/) contain detailed information about the working of the blocks with many examples. **⭐️ Star it if you like it ⭐️**
25
+ </div>
26
+
27
+ ---
28
+
29
+ <p align="center">
30
+ <a href="https://d3blocks.github.io/d3blocks">
31
+ <img src="https://github.com/d3blocks/d3blocks/blob/main/docs/figs/summary.png" width="600" />
32
+ </a>
33
+ </p>
34
+
35
+ ---
36
+
37
+ ### Resources and Links
38
+ - [**Example Notebooks**](https://d3blocks.github.io/d3blocks/Documentation.html#google-colab-notebooks)
39
+ - [**Documentation**](https://d3blocks.github.io/d3blocks)
40
+ - [**Bug Reports and Feature Requests**](https://github.com/d3blocks/d3blocks/issues)
41
+
42
+ ### Blogs
43
+ - [**Medium Blog**](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510)
44
+ - [**Substack with podcast**](https://erdogant.substack.com/p/d3blocks-the-python-library-to-create)
45
+ - [**Gumroad Blogs with podcast**](https://erdogant.gumroad.com/l/d3blocks-the-python-library-to-create-interactive-standalone-and-beautiful-d3-js-charts)
46
+
47
+ -------------------------------------------------------------------------
48
+ ### [Available charts](https://d3blocks.github.io/d3blocks/)
49
+
50
+
51
+ | nr | Block | Function | More Information |
52
+ |-----|------------------------------------------------------------------------------------|------------------------------|-------------------------------------------------------------------------|
53
+ | 1 | [D3graph](https://d3blocks.github.io/d3blocks/d3graph.html) | ``` d3.d3graph() ``` | [D3graph](https://medium.com/data-science-collective/how-to-turn-any-network-into-an-interactive-knowledge-graph-to-discover-hidden-insights-f49fae4757ff) |
54
+ | 2 | [Radialgraph](https://d3blocks.github.io/d3blocks/Radialgraph.html) | ``` d3.radialgraph() ``` | [Radialgraph](https://medium.com/data-science-collective/radialgraph-a-new-way-to-explore-large-networks-without-the-hairball-ea34193ddec9) |
55
+ | 3 | [Elasticgraph](https://d3blocks.github.io/d3blocks/elasticgraph.html) | ``` d3.elasticgraph() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
56
+ | 4 | [Sankey](https://d3blocks.github.io/d3blocks/Sankey.html) | ``` d3.sankey() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
57
+ | 5 | [Movingbubbles](https://d3blocks.github.io/d3blocks/MovingBubbles.html) | ``` d3.movingbubbles() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
58
+ | 6 | [Scatter](https://d3blocks.github.io/d3blocks/Scatter.html) | ``` d3.scatter() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
59
+ | 7 | [Heatmap](https://d3blocks.github.io/d3blocks/Heatmap.html) | ``` d3.heatmap() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
60
+ | 8 | [Chord diagram](https://d3blocks.github.io/d3blocks/Chord.html) | ``` d3.chord() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
61
+ | 9 | [Timeseries](https://d3blocks.github.io/d3blocks/Timeseries.html) | ``` d3.timeseries() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
62
+ | 10 | [Image slider](https://d3blocks.github.io/d3blocks/Imageslider.html) | ``` d3.imageslider() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
63
+ | 11 | [Violin plot](https://d3blocks.github.io/d3blocks/Violin.html) | ``` d3.violin() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
64
+ | 12 | [Particles](https://d3blocks.github.io/d3blocks/Particles.html) | ``` d3.particles() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
65
+ | 13 | [Treemap](https://d3blocks.github.io/d3blocks/Treemap.html) | ``` d3.treemap() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
66
+ | 14 | [Tree](https://d3blocks.github.io/d3blocks/Tree.html) | ``` d3.tree() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
67
+ | 15 | [Maps](https://d3blocks.github.io/d3blocks/Maps.html) | ``` d3.maps() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
68
+ | 16 | [Circlepacking](https://d3blocks.github.io/d3blocks/Circlepacking.html) | ``` d3.circlepacking() ``` | [D3Blocks](https://medium.com/data-science-collective/d3blocks-the-sweet-spot-for-data-scientists-interactive-charts-without-deployment-friction-c7f576025510) |
69
+ | 17 | [Flowgraph](https://d3blocks.github.io/d3blocks/Flowgraph.html) | ``` d3.flowgraph() ``` | [Dagre](https://github.com/dagrejs/dagre) |
70
+ | 18 | [Sequence](https://d3blocks.github.io/d3blocks/Sequence.html) | ``` d3.sequence() ``` | [Mermaid sequenceDiagram](https://mermaid.js.org/syntax/sequenceDiagram.html) |
71
+ | 19 | [ERD](https://d3blocks.github.io/d3blocks/ERD.html) | ``` d3.erd() ``` | [Mermaid erDiagram](https://mermaid.js.org/syntax/entityRelationshipDiagram.html) |
72
+
73
+ -------------------------------------------------------------------------
74
+
75
+ #### Installation (Pypi)
76
+ ```bash
77
+ pip install d3blocks # Normal installation
78
+ pip install -U d3blocks # Force update
79
+ ```
80
+
81
+ #### Clone
82
+ ```bash
83
+ # Clone only the latest branch to avoid downloading large history.
84
+ git config --global clone.depth 1
85
+ ```
86
+
87
+
88
+
89
+ #### Installation (from GitHub source)
90
+ ```bash
91
+ pip install git+https://github.com/d3blocks/d3blocks.git
92
+ ```
93
+
94
+ ##### Install skill:
95
+ ```bash
96
+ # for visualizations
97
+ npx skills add d3blocks/d3blocks --skill d3blocks
98
+
99
+ # for chart builder
100
+ npx skills add d3blocks/d3blocks --skill d3blocks-chart-builder
101
+
102
+ # for docs diagrams (convert a repo's Mermaid diagrams)
103
+ npx skills add d3blocks/d3blocks --skill d3blocks-docs-diagrams
104
+ ```
105
+
106
+
107
+ #### Import d3blocks package
108
+ ```python
109
+ from d3blocks import D3Blocks
110
+ # Initialize
111
+ d3 = D3Blocks()
112
+ ```
113
+
114
+
115
+ ---
116
+
117
+ ### D3Blocks💙Streamlit
118
+ Every chart from D3Block can easily be incorporated into a Streamlit Dashboard. Because every D3Blocks chart is just HTML and JavaScript, you can generate the HTML in memory and embed it
119
+ A few practical rules of thumb: prefer `st.iframe` over the older `components.html` for full interactive charts, always pass an explicit pixel height, and set `show_side_panel=False` when Streamlit already owns the controls so the UI doesn't duplicate. `color_background='streamlit'` picks backgrounds that match a typical Streamlit light or dark page.
120
+
121
+ * [Minimal examples for each chart can be found in the Streamlit directory in the repo](https://github.com/d3blocks/d3blocks/tree/main/streamlit).
122
+ * [More Streamlit documentation can be found here.](https://d3blocks.github.io/d3blocks/Streamlit.html)
123
+
124
+ ---
125
+
126
+ ### Ethical Ads
127
+ When HTMLs are generated, it automatically includes ethical ads as a small way to support development.
128
+ I maintain this entire project thoughtfully and in my free time. Ads can be disabled via an input parameter, and you can also support the project with a coffee donation instead.
129
+
130
+ ### Star history
131
+ [![Star History Chart](https://star-history.dera.page/svg?repos=d3blocks/d3blocks)](https://star-history.dera.page/d3blocks/d3blocks)
132
+
133
+ ### References
134
+ * [bl.ocks](https://bl.ocks.org/)
135
+ * [observablehq](https://observablehq.com/top)
136
+
137
+ ### Contributors
138
+
139
+ <p align="left">
140
+ <a href="https://github.com/d3blocks/d3blocks/graphs/contributors">
141
+ <img src="https://contrib.rocks/image?repo=d3blocks/d3blocks" />
142
+ </a>
143
+ </p>
144
+
145
+ ### Maintainer
146
+ * Erdogan Taskesen, github: [erdogant](https://github.com/erdogant)
147
+ * Contributions are welcome.
148
+ * Yes! This library is entirely **free** but it runs on coffee! :) Feel free to support with a <a href="https://erdogant.github.io/donate/?currency=USD&amount=5">Coffee</a>.
149
+
150
+ [![Buy me a coffee](https://img.buymeacoffee.com/button-api/?text=Buy+me+a+coffee&emoji=&slug=erdogant&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=FFDD00)](https://www.buymeacoffee.com/erdogant)
@@ -10,7 +10,7 @@ from d3blocks.utils import (
10
10
 
11
11
  __author__ = 'Erdogan Taskesen'
12
12
  __email__ = 'erdogant@gmail.com'
13
- __version__ = '2.2.0'
13
+ __version__ = '2.3.0'
14
14
 
15
15
  # Setup root logger
16
16
  import logging
@@ -0,0 +1,208 @@
1
+ """Code shared by the flowgraph, sequence and erd blocks.
2
+
3
+ * template_env(): a Jinja environment over a block's own d3js/ folder and
4
+ d3blocks/_shared/d3js/ (walkthrough.js/.css, theme.js and the d3.v7.min.js
5
+ used by sequence and erd), so a template can {% include %} both and the
6
+ output stays self-contained.
7
+ * notebook_iframe(): the Jupyter iframe wrapper.
8
+ * dark_mode_flag(): validates dark_mode (True, False or 'auto').
9
+ * normalize_steps(): validates the captioned walkthrough steps.
10
+
11
+ Library : d3blocks
12
+ Github : https://github.com/d3blocks/d3blocks
13
+ License : GPL3
14
+ """
15
+
16
+ from html import escape as html_escape
17
+ from pathlib import Path
18
+
19
+ import numpy as np
20
+ from jinja2 import ChoiceLoader, Environment, FileSystemLoader, PackageLoader
21
+
22
+ DARK_MODES = (True, False, "auto")
23
+ STEP_KEYS = ("title", "caption", "highlight")
24
+
25
+
26
+ def template_env(package_name, block_file):
27
+ """Jinja environment over the block's d3js/ folder, then _shared/d3js/.
28
+
29
+ Parameters
30
+ ----------
31
+ package_name : str
32
+ __name__ of the block module, e.g. 'd3blocks.sequence.Sequence'.
33
+ block_file : str
34
+ __file__ of the block module (used when the package loader is unavailable).
35
+ """
36
+
37
+ def loader(package, folder):
38
+ try:
39
+ return PackageLoader(package_name=package, package_path="d3js")
40
+ except Exception:
41
+ return FileSystemLoader(str(Path(folder).resolve().parent / "d3js"))
42
+
43
+ return Environment(
44
+ loader=ChoiceLoader(
45
+ [loader(package_name, block_file), loader(__name__, __file__)]
46
+ )
47
+ )
48
+
49
+
50
+ def notebook_iframe(html, config, block):
51
+ """Wrap a chart page in an iframe for Jupyter.
52
+
53
+ The page fills its window (fixed positioning, own body background) and uses
54
+ fixed element ids, so it is isolated in an iframe instead of being injected
55
+ into the notebook page. Size: figsize, else full width x 650 px.
56
+ """
57
+ width, height = (list(config.get("figsize") or [None, None]) + [None, None])[:2]
58
+ width = "%dpx" % width if width else "100%"
59
+ height = "%dpx" % height if height else "650px"
60
+ # Wrapped in a div: IPython warns about HTML that starts with '<iframe'.
61
+ return (
62
+ '<div class="d3blocks-%s"><iframe srcdoc="%s" title="%s" '
63
+ 'style="width:%s;height:%s;border:0;border-radius:6px" '
64
+ 'sandbox="allow-scripts allow-downloads allow-popups"></iframe></div>'
65
+ % (
66
+ block,
67
+ html_escape(html, quote=True),
68
+ html_escape(str(config.get("title", block))),
69
+ width,
70
+ height,
71
+ )
72
+ )
73
+
74
+
75
+ def dark_mode_flag(dark_mode):
76
+ """Template flag for dark_mode: 'true', 'false' or 'auto'.
77
+
78
+ * True: dark theme.
79
+ * False: light theme.
80
+ * 'auto': follow the operating system theme until the viewer uses the theme toggle.
81
+ """
82
+ if isinstance(dark_mode, (bool, np.bool_)):
83
+ return "true" if dark_mode else "false"
84
+ if isinstance(dark_mode, str) and dark_mode.lower() == "auto":
85
+ return "auto"
86
+ raise ValueError("dark_mode must be True, False or 'auto'; got %r." % (dark_mode,))
87
+
88
+
89
+ def check_dark_mode(dark_mode):
90
+ """dark_mode as True, False or 'auto'; raises ValueError for anything else."""
91
+ flag = dark_mode_flag(dark_mode)
92
+ return "auto" if flag == "auto" else flag == "true"
93
+
94
+
95
+ def normalize_steps(steps, refs, block):
96
+ """Validate walkthrough steps and return them as JSON-ready dicts.
97
+
98
+ Parameters
99
+ ----------
100
+ steps : list of dict or None
101
+ [{'title': str, 'caption': str, 'highlight': {key: [ref, ...]}}]
102
+ refs : dict
103
+ {highlight key: check(ref, step_index) -> resolved ref}. Only these
104
+ highlight keys are accepted; a check raises ValueError for an unknown ref.
105
+ block : str
106
+ Block name, used in error messages.
107
+
108
+ Returns
109
+ -------
110
+ list of dict or None
111
+ [{'title', 'caption', 'highlight'}], or None when steps is None.
112
+
113
+ """
114
+ if steps is None:
115
+ return None
116
+ if isinstance(steps, (str, dict)) or not hasattr(steps, "__iter__"):
117
+ raise ValueError(
118
+ "steps must be a list of dicts or None; got %s." % type(steps).__name__
119
+ )
120
+ out = []
121
+ for i, step in enumerate(steps):
122
+ if not isinstance(step, dict):
123
+ raise ValueError(
124
+ "steps[%d]: expected a dict with %s; got %s."
125
+ % (i, STEP_KEYS, type(step).__name__)
126
+ )
127
+ unknown = sorted(set(step) - set(STEP_KEYS))
128
+ if unknown:
129
+ raise ValueError(
130
+ "steps[%d]: unknown key(s) %s; use %s." % (i, unknown, STEP_KEYS)
131
+ )
132
+ highlight = step.get("highlight") or {}
133
+ if not isinstance(highlight, dict):
134
+ raise ValueError(
135
+ "steps[%d]: 'highlight' must be a dict; got %s."
136
+ % (i, type(highlight).__name__)
137
+ )
138
+ unsupported = sorted(set(highlight) - set(refs))
139
+ if unsupported:
140
+ raise ValueError(
141
+ "steps[%d]: highlight key(s) %s are not supported by %s; use %s."
142
+ % (i, unsupported, block, tuple(refs))
143
+ )
144
+ resolved = {}
145
+ for key, values in highlight.items():
146
+ if values is None:
147
+ continue
148
+ if isinstance(values, (str, int, np.integer)):
149
+ values = [values]
150
+ resolved[key] = [refs[key](v, i) for v in values]
151
+ out.append(
152
+ {
153
+ "title": str(step.get("title") or "Step %d" % (i + 1)),
154
+ "caption": str(step.get("caption") or ""),
155
+ "highlight": resolved,
156
+ }
157
+ )
158
+ return out
159
+
160
+
161
+ def ref_in(names, what):
162
+ """Check for a reference that must be one of `names`."""
163
+ names = set(names)
164
+
165
+ def check(ref, i):
166
+ key = str(ref)
167
+ if key not in names:
168
+ raise ValueError("steps[%d]: unknown %s %r." % (i, what, ref))
169
+ return key
170
+
171
+ return check
172
+
173
+
174
+ def pair_in(pairs, what, undirected=False):
175
+ """Check for a (source, target) reference that must be in `pairs`."""
176
+ pairs = {(str(s), str(t)) for s, t in pairs}
177
+
178
+ def check(ref, i):
179
+ if isinstance(ref, str) or not hasattr(ref, "__len__") or len(ref) != 2:
180
+ raise ValueError(
181
+ "steps[%d]: %s must be (source, target) pairs; got %r." % (i, what, ref)
182
+ )
183
+ s, t = str(ref[0]), str(ref[1])
184
+ if (s, t) in pairs:
185
+ return [s, t]
186
+ if undirected and (t, s) in pairs:
187
+ return [t, s]
188
+ raise ValueError("steps[%d]: unknown %s %r." % (i, what, tuple(ref)))
189
+
190
+ return check
191
+
192
+
193
+ def index_in(count, what):
194
+ """Check for an integer index in range(count)."""
195
+
196
+ def check(ref, i):
197
+ if (
198
+ isinstance(ref, (bool, np.bool_))
199
+ or not isinstance(ref, (int, np.integer))
200
+ or not 0 <= ref < count
201
+ ):
202
+ raise ValueError(
203
+ "steps[%d]: unknown %s %r; use an index from 0 to %d."
204
+ % (i, what, ref, count - 1)
205
+ )
206
+ return int(ref)
207
+
208
+ return check
@@ -0,0 +1,63 @@
1
+ /*
2
+ * theme.js - dark/light theme for d3blocks diagrams (flowgraph, sequence, erd).
3
+ * Included right after <body data-dark-mode="true|false|auto">, so the first
4
+ * paint already has the right theme. 'auto' follows the operating system
5
+ * (prefers-color-scheme) until the viewer presses the theme toggle; a
6
+ * ?theme=light|dark URL parameter overrides 'auto', as in archify.
7
+ */
8
+ window.D3BlocksTheme = (function () {
9
+ 'use strict';
10
+ var body = document.body;
11
+ var mode = body.getAttribute('data-dark-mode') || 'true';
12
+ var followOs = mode === 'auto';
13
+ var media = null;
14
+
15
+ function isLight() { return body.classList.contains('light'); }
16
+
17
+ function syncButton(btn) {
18
+ if (!btn) return;
19
+ var light = isLight();
20
+ btn.textContent = light ? '☀' : '🌙';
21
+ btn.title = light ? 'Theme: Light' : 'Theme: Dark';
22
+ btn.setAttribute('aria-pressed', light ? 'true' : 'false');
23
+ }
24
+
25
+ var buttons = [];
26
+ function set(light) {
27
+ body.classList.toggle('light', !!light);
28
+ buttons.forEach(syncButton);
29
+ }
30
+
31
+ if (followOs) {
32
+ var param = null;
33
+ try { param = new URLSearchParams(window.location.search).get('theme'); } catch (e) { /* no URL */ }
34
+ if (param === 'light' || param === 'dark') {
35
+ followOs = false;
36
+ set(param === 'light');
37
+ } else if (window.matchMedia) {
38
+ // No OS preference (or no matchMedia) falls back to dark.
39
+ media = window.matchMedia('(prefers-color-scheme: light)');
40
+ set(media.matches);
41
+ var onChange = function (e) { if (followOs) set(e.matches); };
42
+ if (media.addEventListener) media.addEventListener('change', onChange);
43
+ else if (media.addListener) media.addListener(onChange);
44
+ } else {
45
+ set(false);
46
+ }
47
+ }
48
+
49
+ return {
50
+ isLight: isLight,
51
+ // Wire a toggle button; after the first press the toggle wins over the OS theme.
52
+ bind: function (id) {
53
+ var btn = document.getElementById(id);
54
+ if (!btn) return;
55
+ buttons.push(btn);
56
+ syncButton(btn);
57
+ btn.addEventListener('click', function () {
58
+ followOs = false;
59
+ set(!isLight());
60
+ });
61
+ }
62
+ };
63
+ })();