hvplot 0.10.0rc2__tar.gz → 0.11.0a2__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 (203) hide show
  1. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/.github/workflows/build.yaml +1 -3
  2. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/.github/workflows/docs.yaml +1 -5
  3. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/.github/workflows/test.yaml +9 -14
  4. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/PKG-INFO +12 -8
  5. hvplot-0.11.0a2/doc/_static/home/geopandas.gif +0 -0
  6. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/conftest.py +21 -1
  7. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/developer_guide/index.md +1 -1
  8. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/getting_started/installation.md +2 -2
  9. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/index.md +3 -3
  10. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/geopandas/points.ipynb +13 -3
  11. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/geopandas/polygons.ipynb +10 -5
  12. hvplot-0.11.0a2/doc/reference/tabular/paths.ipynb +80 -0
  13. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/xarray/image.ipynb +16 -0
  14. hvplot-0.11.0a2/doc/reference/xarray/vectorfield.ipynb +230 -0
  15. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Customization.ipynb +44 -3
  16. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Geographic_Data.ipynb +16 -14
  17. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Large_Timeseries.ipynb +23 -0
  18. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/NetworkX.ipynb +1 -1
  19. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Plotting_with_Matplotlib.ipynb +39 -0
  20. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Timeseries_Data.ipynb +27 -0
  21. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/envs/py3.10-tests.yaml +8 -5
  22. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/envs/py3.11-docs.yaml +6 -5
  23. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/envs/py3.11-tests.yaml +8 -5
  24. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/envs/py3.12-tests.yaml +8 -5
  25. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/envs/py3.9-tests.yaml +7 -5
  26. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/__init__.py +28 -2
  27. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/_version.py +2 -2
  28. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/converter.py +222 -133
  29. hvplot-0.11.0a2/hvplot/cudf.py +30 -0
  30. hvplot-0.11.0a2/hvplot/dask.py +46 -0
  31. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/fugue.py +10 -6
  32. hvplot-0.11.0a2/hvplot/ibis.py +25 -0
  33. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/intake.py +9 -5
  34. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/interactive.py +1 -64
  35. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/networkx.py +1 -2
  36. hvplot-0.11.0a2/hvplot/pandas.py +33 -0
  37. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/plotting/core.py +3 -2
  38. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/plotting/scatter_matrix.py +0 -9
  39. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/polars.py +6 -4
  40. hvplot-0.11.0a2/hvplot/streamz.py +24 -0
  41. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/conftest.py +1 -3
  42. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/plotting/testcore.py +0 -13
  43. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testcharts.py +164 -33
  44. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testgeo.py +14 -0
  45. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testgeowithoutgv.py +8 -0
  46. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testgridplots.py +7 -0
  47. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testinteractive.py +1 -92
  48. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testoperations.py +1 -11
  49. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testoptions.py +23 -2
  50. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testpanel.py +4 -15
  51. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testpatch.py +1 -6
  52. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testplotting.py +1 -18
  53. hvplot-0.11.0a2/hvplot/tests/teststatplots.py +24 -0
  54. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testui.py +7 -0
  55. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testutil.py +27 -24
  56. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/ui.py +36 -29
  57. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/util.py +36 -8
  58. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/utilities.py +1 -1
  59. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/xarray.py +7 -5
  60. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot.egg-info/PKG-INFO +12 -8
  61. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot.egg-info/SOURCES.txt +2 -1
  62. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot.egg-info/requires.txt +14 -5
  63. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/pyproject.toml +17 -8
  64. hvplot-0.10.0rc2/doc/_static/home/geopandas.gif +0 -0
  65. hvplot-0.10.0rc2/doc/reference/xarray/vectorfield.ipynb +0 -126
  66. hvplot-0.10.0rc2/envs/py3.8-tests.yaml +0 -76
  67. hvplot-0.10.0rc2/hvplot/cudf.py +0 -26
  68. hvplot-0.10.0rc2/hvplot/dask.py +0 -42
  69. hvplot-0.10.0rc2/hvplot/ibis.py +0 -21
  70. hvplot-0.10.0rc2/hvplot/pandas.py +0 -30
  71. hvplot-0.10.0rc2/hvplot/streamz.py +0 -21
  72. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/.git-blame-ignore-revs +0 -0
  73. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/.git_archival.txt +0 -0
  74. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/.gitattributes +0 -0
  75. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/.github/CONTRIBUTING.md +0 -0
  76. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/.github/FUNDING.yml +0 -0
  77. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/.gitignore +0 -0
  78. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/.pre-commit-config.yaml +0 -0
  79. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/CHANGELOG.md +0 -0
  80. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/CODE_OF_CONDUCT.md +0 -0
  81. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/LICENSE +0 -0
  82. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/README.md +0 -0
  83. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/binder/environment.yml +0 -0
  84. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/binder/postBuild +0 -0
  85. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/conda.recipe/meta.yaml +0 -0
  86. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/custom.css +0 -0
  87. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/favicon.ico +0 -0
  88. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/bokeh.gif +0 -0
  89. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/dask.gif +0 -0
  90. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/explorer.gif +0 -0
  91. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/geo.gif +0 -0
  92. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/intake.gif +0 -0
  93. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/interactive_hvplot.gif +0 -0
  94. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/interactive_pandas.gif +0 -0
  95. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/interactive_xarray.gif +0 -0
  96. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/large_data.gif +0 -0
  97. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/layout.gif +0 -0
  98. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/matplotlib.png +0 -0
  99. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/networkx.gif +0 -0
  100. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/overlay.png +0 -0
  101. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/pandas.gif +0 -0
  102. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/plotly.gif +0 -0
  103. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/widgets.gif +0 -0
  104. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/home/xarray.gif +0 -0
  105. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/images/heat_and_trees.png +0 -0
  106. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/images/portfolio.png +0 -0
  107. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/logo.png +0 -0
  108. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/logo_horizontal.svg +0 -0
  109. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/_static/logo_stacked.svg +0 -0
  110. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/about.md +0 -0
  111. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/assets/console.png +0 -0
  112. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/assets/console_server.gif +0 -0
  113. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/assets/diagram.png +0 -0
  114. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/assets/diagram.svg +0 -0
  115. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/assets/hvplot-wm.png +0 -0
  116. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/assets/streamz_demo.gif +0 -0
  117. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/conf.py +0 -0
  118. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/getting_started/explorer.ipynb +0 -0
  119. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/getting_started/hvplot.ipynb +0 -0
  120. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/getting_started/index.md +0 -0
  121. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/getting_started/interactive.ipynb +0 -0
  122. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/governance/project-docs/CONTRIBUTING.md +0 -0
  123. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/governance/project-docs/GOVERNANCE.md +0 -0
  124. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/governance/project-docs/LICENSE.md +0 -0
  125. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/governance/project-docs/MEMBERS.md +0 -0
  126. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/andrewscurves.ipynb +0 -0
  127. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/area.ipynb +0 -0
  128. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/bar.ipynb +0 -0
  129. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/barh.ipynb +0 -0
  130. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/bivariate.ipynb +0 -0
  131. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/box.ipynb +0 -0
  132. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/errorbars.ipynb +0 -0
  133. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/heatmap.ipynb +0 -0
  134. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/hexbin.ipynb +0 -0
  135. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/hist.ipynb +0 -0
  136. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/kde.ipynb +0 -0
  137. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/labels.ipynb +0 -0
  138. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/lagplot.ipynb +0 -0
  139. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/line.ipynb +0 -0
  140. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/ohlc.ipynb +0 -0
  141. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/parallelcoordinates.ipynb +0 -0
  142. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/scatter.ipynb +0 -0
  143. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/scattermatrix.ipynb +0 -0
  144. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/step.ipynb +0 -0
  145. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/table.ipynb +0 -0
  146. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/tabular/violin.ipynb +0 -0
  147. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/xarray/bar.ipynb +0 -0
  148. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/xarray/contour.ipynb +0 -0
  149. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/xarray/contourf.ipynb +0 -0
  150. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/xarray/hist.ipynb +0 -0
  151. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/xarray/kde.ipynb +0 -0
  152. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/xarray/line.ipynb +0 -0
  153. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/xarray/quadmesh.ipynb +0 -0
  154. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/xarray/rgb.ipynb +0 -0
  155. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/reference/xarray/violin.ipynb +0 -0
  156. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/releases.md +0 -0
  157. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/roadmap.md +0 -0
  158. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/topics.md +0 -0
  159. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Explorer.ipynb +0 -0
  160. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Gridded_Data.ipynb +0 -0
  161. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Integrations.ipynb +0 -0
  162. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Interactive.ipynb +0 -0
  163. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Introduction.ipynb +0 -0
  164. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Pandas_API.ipynb +0 -0
  165. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Plotting.ipynb +0 -0
  166. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Plotting_Extensions.ipynb +0 -0
  167. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Plotting_with_Plotly.ipynb +0 -0
  168. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Statistical_Plots.ipynb +0 -0
  169. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Streaming.ipynb +0 -0
  170. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Subplots.ipynb +0 -0
  171. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Viewing.ipynb +0 -0
  172. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/Widgets.ipynb +0 -0
  173. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/images/simple.svg +0 -0
  174. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/doc/user_guide/index.md +0 -0
  175. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/backend_transforms.py +0 -0
  176. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/data/crime.csv +0 -0
  177. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/datasets.yaml +0 -0
  178. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/plotting/__init__.py +0 -0
  179. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/plotting/andrews_curves.py +0 -0
  180. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/plotting/lag_plot.py +0 -0
  181. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/plotting/parallel_coordinates.py +0 -0
  182. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/sample_data.py +0 -0
  183. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/__init__.py +0 -0
  184. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/data/README.md +0 -0
  185. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/data/RGB-red.byte.tif +0 -0
  186. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/plotting/__init__.py +0 -0
  187. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/plotting/testohlc.py +0 -0
  188. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/plotting/testscattermatrix.py +0 -0
  189. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/test_links.py +0 -0
  190. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testbackend_transforms.py +0 -0
  191. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testfugue.py +0 -0
  192. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testhelp.py +0 -0
  193. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testibis.py +0 -0
  194. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testnetworkx.py +0 -0
  195. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testoverrides.py +0 -0
  196. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/teststreaming.py +0 -0
  197. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/testtransforms.py +0 -0
  198. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot/tests/util.py +0 -0
  199. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot.egg-info/dependency_links.txt +0 -0
  200. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot.egg-info/entry_points.txt +0 -0
  201. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/hvplot.egg-info/top_level.txt +0 -0
  202. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/scripts/update_conda_envs.py +0 -0
  203. {hvplot-0.10.0rc2 → hvplot-0.11.0a2}/setup.cfg +0 -0
@@ -62,9 +62,7 @@ jobs:
62
62
  with:
63
63
  python-version: ${{ env.PYTHON_VERSION }}
64
64
  - name: env setup
65
- run: |
66
- python -m pip install --upgrade pip setuptools
67
- python -m pip install build
65
+ run: python -m pip install build
68
66
  - name: pip build
69
67
  run: python -m build
70
68
  - name: Publish package to PyPI
@@ -50,8 +50,6 @@ jobs:
50
50
  run: |
51
51
  echo "Deploying from ref ${GITHUB_REF#refs/*/}"
52
52
  echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
53
- - name: bokeh sampledata
54
- run: bokeh sampledata
55
53
  - name: install dev nbsite
56
54
  run: pip install --pre -U nbsite
57
55
  - name: conda info
@@ -105,7 +103,7 @@ jobs:
105
103
  with:
106
104
  python-version: ${{ env.PYTHON_VERSION }}
107
105
  - name: install
108
- run: pip install ."[doc, examples, geo]"
106
+ run: pip install -v --prefer-binary -e ."[doc, examples, geo]"
109
107
  - name: install dev nbsite
110
108
  run: pip install --pre -U nbsite
111
109
  - name: pip list
@@ -115,8 +113,6 @@ jobs:
115
113
  run: |
116
114
  echo "Deploying from ref ${GITHUB_REF#refs/*/}"
117
115
  echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
118
- - name: bokeh sampledata
119
- run: bokeh sampledata
120
116
  - name: build docs
121
117
  run: sphinx-build -b html doc builtdocs
122
118
  - name: report failure
@@ -60,10 +60,10 @@ jobs:
60
60
  run: |
61
61
  MATRIX=$(jq -nsc '{
62
62
  "os": ["ubuntu-latest", "macos-latest", "windows-latest"],
63
- "python-version": ["3.8", "3.12"],
63
+ "python-version": ["3.9", "3.12"],
64
64
  "exclude": [
65
65
  {
66
- "python-version": "3.8",
66
+ "python-version": "3.9",
67
67
  "os": "macos-latest"
68
68
  }
69
69
  ]
@@ -74,7 +74,7 @@ jobs:
74
74
  run: |
75
75
  MATRIX=$(jq -nsc '{
76
76
  "os": ["ubuntu-latest", "macos-latest", "windows-latest"],
77
- "python-version": ["3.8", "3.12"],
77
+ "python-version": ["3.9", "3.12"],
78
78
  "include": [
79
79
  {
80
80
  "python-version": "3.9",
@@ -91,7 +91,7 @@ jobs:
91
91
  ],
92
92
  "exclude": [
93
93
  {
94
- "python-version": "3.8",
94
+ "python-version": "3.9",
95
95
  "os": "macos-latest"
96
96
  }
97
97
  ]
@@ -132,13 +132,14 @@ jobs:
132
132
  - name: conda list
133
133
  run: conda list
134
134
  - name: bokeh sampledata
135
+ if: ${{ matrix.python-version == '3.9'}}
135
136
  run: bokeh sampledata
136
137
  - name: unit tests
137
138
  run: pytest -v hvplot --cov=hvplot --cov-append
138
139
  - name: unit tests geo
139
140
  run: pytest -v hvplot --geo --cov=hvplot --cov-append
140
141
  - name: examples tests
141
- run: pytest -n auto --dist loadscope --nbval-lax -p no:python
142
+ run: pytest -n logical --dist loadscope --nbval-lax -p no:python
142
143
  pip_test:
143
144
  name: pip tests:${{ matrix.os }}:${{ matrix.python-version }}
144
145
  needs: [pre_commit, setup]
@@ -157,25 +158,19 @@ jobs:
157
158
  - uses: actions/setup-python@v5
158
159
  with:
159
160
  python-version: ${{ matrix.python-version }}
160
- - name: upgrade pip / setuptools
161
- run: pip install -U pip setuptools
162
- - name: install without geo
163
- # Because cartopy cannot be installed on Python 3.8 on these platforms
164
- if: matrix.python-version == '3.8' && contains(fromJSON('["ubuntu-latest", "windows-latest"]'), matrix.os)
165
- run: pip install -ve '.[tests, examples-tests, hvdev, dev-extras]'
166
161
  - name: install with geo
167
- if: matrix.python-version != '3.8' || !contains(fromJSON('["ubuntu-latest", "windows-latest"]'), matrix.os)
168
- run: pip install -ve '.[tests, examples-tests, geo, hvdev, hvdev-geo, dev-extras]'
162
+ run: pip install -v --prefer-binary -e '.[tests, examples-tests, geo, hvdev, hvdev-geo, dev-extras]'
169
163
  - name: pip list
170
164
  run: pip list
171
165
  - name: bokeh sampledata
166
+ if: ${{ matrix.python-version == '3.9'}}
172
167
  run: bokeh sampledata
173
168
  - name: unit tests
174
169
  run: pytest -v hvplot --cov=hvplot --cov-append
175
170
  - name: unit tests geo
176
171
  run: pytest -v hvplot --geo --cov=hvplot --cov-append
177
172
  - name: examples tests
178
- run: pytest -n auto --dist loadscope --nbval-lax -p no:python
173
+ run: pytest -n logical --dist loadscope --nbval-lax -p no:python
179
174
  - name: Upload coverage reports to Codecov
180
175
  if: github.event_name == 'push' || github.event_name == 'pull_request'
181
176
  uses: codecov/codecov-action@v4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hvplot
3
- Version: 0.10.0rc2
3
+ Version: 0.11.0a2
4
4
  Summary: A high-level plotting API for the PyData ecosystem built on HoloViews.
5
5
  Author-email: Philipp Rudiger <developers@holoviz.org>
6
6
  Maintainer-email: HoloViz developers <developers@holoviz.org>
@@ -10,7 +10,6 @@ Project-URL: Source, http://github.com/holoviz/hvplot
10
10
  Project-URL: HoloViz, https://holoviz.org/
11
11
  Classifier: License :: OSI Approved :: BSD License
12
12
  Classifier: Development Status :: 5 - Production/Stable
13
- Classifier: Programming Language :: Python :: 3.8
14
13
  Classifier: Programming Language :: Python :: 3.9
15
14
  Classifier: Programming Language :: Python :: 3.10
16
15
  Classifier: Programming Language :: Python :: 3.11
@@ -21,16 +20,16 @@ Classifier: Intended Audience :: Developers
21
20
  Classifier: Natural Language :: English
22
21
  Classifier: Topic :: Scientific/Engineering
23
22
  Classifier: Topic :: Software Development :: Libraries
24
- Requires-Python: >=3.8
23
+ Requires-Python: >=3.9
25
24
  Description-Content-Type: text/markdown
26
25
  License-File: LICENSE
27
- Requires-Dist: bokeh>=1.0.0
26
+ Requires-Dist: bokeh>=3.1
28
27
  Requires-Dist: colorcet>=2
29
- Requires-Dist: holoviews>=1.11.0
30
- Requires-Dist: numpy>=1.15
28
+ Requires-Dist: holoviews>=1.19.0
29
+ Requires-Dist: numpy>=1.21
31
30
  Requires-Dist: packaging
32
- Requires-Dist: pandas
33
- Requires-Dist: panel>=0.11.0
31
+ Requires-Dist: pandas>=1.3
32
+ Requires-Dist: panel>=1.0
34
33
  Requires-Dist: param<3.0,>=1.12.0
35
34
  Provides-Extra: tests-core
36
35
  Requires-Dist: dask[dataframe]; extra == "tests-core"
@@ -45,12 +44,16 @@ Requires-Dist: pytest; extra == "tests-core"
45
44
  Requires-Dist: ruff; extra == "tests-core"
46
45
  Requires-Dist: scipy; extra == "tests-core"
47
46
  Requires-Dist: xarray; extra == "tests-core"
47
+ Requires-Dist: bokeh_sampledata; python_version >= "3.10" and extra == "tests-core"
48
+ Requires-Dist: psutil; extra == "tests-core"
48
49
  Provides-Extra: tests
49
50
  Requires-Dist: hvplot[tests-core]; extra == "tests"
50
51
  Requires-Dist: fugue[sql]; extra == "tests"
51
52
  Requires-Dist: hvplot[fugue-sql]; extra == "tests"
52
53
  Requires-Dist: ibis-framework[duckdb]; extra == "tests"
53
54
  Requires-Dist: polars; extra == "tests"
55
+ Requires-Dist: dask; extra == "tests"
56
+ Requires-Dist: spatialpandas; extra == "tests"
54
57
  Provides-Extra: fugue-sql
55
58
  Requires-Dist: qpd>=0.4.4; extra == "fugue-sql"
56
59
  Requires-Dist: fugue-sql-antlr>=0.2.0; extra == "fugue-sql"
@@ -93,6 +96,7 @@ Requires-Dist: streamz>=0.3.0; extra == "examples"
93
96
  Requires-Dist: xarray>=0.18.2; extra == "examples"
94
97
  Requires-Dist: xyzservices>=2022.9.0; extra == "examples"
95
98
  Requires-Dist: geodatasets>=2023.12.0; extra == "examples"
99
+ Requires-Dist: bokeh_sampledata; python_version >= "3.10" and extra == "examples"
96
100
  Provides-Extra: tests-nb
97
101
  Requires-Dist: pytest-xdist; extra == "tests-nb"
98
102
  Requires-Dist: nbval; extra == "tests-nb"
@@ -1,7 +1,11 @@
1
- import dask
2
1
  from importlib.util import find_spec
2
+
3
+ import dask
4
+
5
+ from packaging.version import Version
3
6
  from bokeh.io.webdriver import webdriver_control
4
7
 
8
+
5
9
  collect_ignore_glob = [
6
10
  'user_guide/Streaming.ipynb',
7
11
  ]
@@ -45,3 +49,19 @@ finally:
45
49
  # From Dask 2024.3.0 they now use `dask_expr` by default
46
50
  # https://github.com/dask/dask/issues/10995
47
51
  dask.config.set({'dataframe.query-planning': False})
52
+
53
+
54
+ # https://github.com/pydata/xarray/pull/9182
55
+ try:
56
+ import xarray as xr
57
+ except ImportError:
58
+ pass
59
+ else:
60
+ import numpy as np
61
+
62
+ if Version(np.__version__) >= Version('2.0.0') and Version(xr.__version__) <= Version(
63
+ '2024.6.0'
64
+ ):
65
+ collect_ignore_glob += [
66
+ 'user_guide/Gridded_Data.ipynb',
67
+ ]
@@ -79,7 +79,7 @@ source .venv/bin/activate
79
79
  Install the test dependencies:
80
80
 
81
81
  ``` bash
82
- pip install -e '.[tests, examples-tests, geo, hvdev, hvdev-geo, dev-extras]'
82
+ pip install --prefer-binary -e '.[tests, examples-tests, geo, hvdev, hvdev-geo, dev-extras]'
83
83
  ```
84
84
 
85
85
  :::
@@ -5,7 +5,7 @@
5
5
  | Latest release | [![Github release](https://img.shields.io/github/release/holoviz/hvplot.svg?label=tag&colorB=11ccbb)](https://github.com/holoviz/hvplot/releases) [![PyPI version](https://img.shields.io/pypi/v/hvplot.svg?colorB=cc77dd)](https://pypi.python.org/pypi/hvplot) [![hvplot version](https://img.shields.io/conda/v/pyviz/hvplot.svg?colorB=4488ff&style=flat)](https://anaconda.org/pyviz/hvplot) [![conda-forge version](https://img.shields.io/conda/v/conda-forge/hvplot.svg?label=conda%7Cconda-forge&colorB=4488ff)](https://anaconda.org/conda-forge/hvplot) [![defaults version](https://img.shields.io/conda/v/anaconda/hvplot.svg?label=conda%7Cdefaults&style=flat&colorB=4488ff)](https://anaconda.org/anaconda/hvplot) |
6
6
  | Python | [![Python support](https://img.shields.io/pypi/pyversions/hvplot.svg)](https://pypi.org/project/hvplot/) |
7
7
 
8
- hvPlot supports Python 3.8 and above on Linux, Windows, or Mac. hvPlot can be installed with [conda](https://conda.io/en/latest/):
8
+ hvPlot supports Python 3.9 and above on Linux, Windows, or Mac. hvPlot can be installed with [conda](https://conda.io/en/latest/):
9
9
 
10
10
  conda install hvplot
11
11
 
@@ -13,7 +13,7 @@ or with `pip`:
13
13
 
14
14
  pip install hvplot
15
15
 
16
- For versions of `jupyterlab>=3.0` the necessary extension is automatically bundled in the `pyviz_comms` package, which must be >=2.0. However note that for version of `jupyterlab<3.0` you must also manually install the JupyterLab extension with:
16
+ Note that `hvplot` needs to run in a Jupyter environment to automatically show output plots. However, if you are using a raw Python or IPython console, it is still possible to [show the plots](https://hvplot.holoviz.org/user_guide/Viewing.html#python-command-prompt-scripts) with `hvplot.show()` or [save the plots](https://hvplot.holoviz.org/user_guide/Viewing.html#saving-plots) even if you cannot view them interactively. For versions of `jupyterlab>=3.0` the necessary extension is automatically bundled in the `pyviz_comms` package, which must be >=2.0. However note that for version of `jupyterlab<3.0` you must also manually install the JupyterLab extension with:
17
17
 
18
18
  conda install jupyterlab
19
19
  jupyter labextension install @pyviz/jupyterlab_pyviz
@@ -89,11 +89,11 @@ align: center
89
89
 
90
90
  :::{tab-item} GeoPandas
91
91
  ```python
92
- import geopandas as gpd
92
+ import geopandas as gpd, geodatasets
93
93
  import hvplot.pandas
94
94
 
95
- gdf = gpd.read_file(gpd.datasets.get_path('naturalearth_cities'))
96
- gdf.hvplot(global_extent=True, tiles=True)
95
+ chicago = gpd.read_file(geodatasets.get_path("geoda.chicago_commpop"))
96
+ chicago.hvplot.polygons(geo=True, c='POP2010', hover_cols='all')
97
97
  ```
98
98
  ```{image} ./_static/home/geopandas.gif
99
99
  ---
@@ -31,8 +31,18 @@
31
31
  "source": [
32
32
  "import geopandas as gpd\n",
33
33
  "\n",
34
- "cities = gpd.read_file(gpd.datasets.get_path('naturalearth_cities'))\n",
35
- "cities.sample(5)"
34
+ "\n",
35
+ "data = {\n",
36
+ " 'City': ['London', 'Paris', 'Berlin', 'Madrid', 'Rome', 'Vienna', 'Warsaw', 'Amsterdam'],\n",
37
+ " 'Country': ['United Kingdom', 'France', 'Germany', 'Spain', 'Italy', 'Austria', 'Poland', 'Netherlands'],\n",
38
+ " 'Latitude': [51.5074, 48.8566, 52.5200, 40.4168, 41.9028, 48.2082, 52.2297, 52.3676],\n",
39
+ " 'Longitude': [-0.1278, 2.3522, 13.4050, -3.7038, 12.4964, 16.3738, 21.0122, 4.9041]\n",
40
+ "}\n",
41
+ "cities = gpd.GeoDataFrame(\n",
42
+ " data,\n",
43
+ " geometry=gpd.points_from_xy(data['Longitude'], data['Latitude']),\n",
44
+ " crs=\"EPSG:4326\",\n",
45
+ ")"
36
46
  ]
37
47
  },
38
48
  {
@@ -82,7 +92,7 @@
82
92
  "metadata": {},
83
93
  "outputs": [],
84
94
  "source": [
85
- "cities.hvplot(coastline=True, projection=ccrs.Geostationary(central_longitude=-30), global_extent=True)"
95
+ "cities.hvplot(coastline=True, projection=ccrs.Geostationary(central_longitude=10), global_extent=True)"
86
96
  ]
87
97
  }
88
98
  ],
@@ -29,10 +29,11 @@
29
29
  "metadata": {},
30
30
  "outputs": [],
31
31
  "source": [
32
+ "import geodatasets\n",
32
33
  "import geopandas as gpd\n",
33
34
  "\n",
34
- "countries = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))\n",
35
- "countries.sample(5)"
35
+ "chicago = gpd.read_file(geodatasets.get_path(\"geoda.chicago_commpop\"))\n",
36
+ "chicago.sample(3)"
36
37
  ]
37
38
  },
38
39
  {
@@ -41,7 +42,7 @@
41
42
  "metadata": {},
42
43
  "outputs": [],
43
44
  "source": [
44
- "countries.hvplot(geo=True)"
45
+ "chicago.hvplot(geo=True)"
45
46
  ]
46
47
  },
47
48
  {
@@ -57,7 +58,7 @@
57
58
  "metadata": {},
58
59
  "outputs": [],
59
60
  "source": [
60
- "countries.hvplot.polygons(geo=True, c='pop_est', hover_cols='all')"
61
+ "chicago.hvplot.polygons(geo=True, c='POP2010', hover_cols='all')"
61
62
  ]
62
63
  },
63
64
  {
@@ -73,7 +74,11 @@
73
74
  "metadata": {},
74
75
  "outputs": [],
75
76
  "source": [
76
- "countries.hvplot.polygons(geo=True, c=countries.pop_est/countries.area, clabel='pop density')"
77
+ "chicago.hvplot.polygons(\n",
78
+ " geo=True,\n",
79
+ " c=chicago.POP2010/chicago.to_crs('EPSG:32616').area,\n",
80
+ " clabel='pop density',\n",
81
+ ")"
77
82
  ]
78
83
  }
79
84
  ],
@@ -0,0 +1,80 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {},
6
+ "source": [
7
+ "# Paths"
8
+ ]
9
+ },
10
+ {
11
+ "cell_type": "code",
12
+ "execution_count": null,
13
+ "metadata": {},
14
+ "outputs": [],
15
+ "source": [
16
+ "import pandas as pd\n",
17
+ "import hvplot.pandas # noqa\n",
18
+ "import cartopy.crs as ccrs"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "markdown",
23
+ "metadata": {},
24
+ "source": [
25
+ "Paths are useful if you are plotting lines on a geographic map."
26
+ ]
27
+ },
28
+ {
29
+ "cell_type": "code",
30
+ "execution_count": null,
31
+ "metadata": {},
32
+ "outputs": [],
33
+ "source": [
34
+ "df = pd.DataFrame({\"city\": [\"NY\", \"Delhi\"], \"lon\": [-75, 77.23], \"lat\": [43, 28.61]})"
35
+ ]
36
+ },
37
+ {
38
+ "cell_type": "markdown",
39
+ "metadata": {},
40
+ "source": [
41
+ "Notice how the line in blue between New York and Delhi is not straight on a flat PlateCarree map, this is because the Geodetic coordinate system is a truly spherical coordinate system, where a line between two points is defined as the shortest path between those points on the globe rather than 2d Cartesian space."
42
+ ]
43
+ },
44
+ {
45
+ "cell_type": "code",
46
+ "execution_count": null,
47
+ "metadata": {},
48
+ "outputs": [],
49
+ "source": [
50
+ "common_kwargs = dict(\n",
51
+ " x=\"lon\",\n",
52
+ " y=\"lat\",\n",
53
+ " geo=True,\n",
54
+ " project=True,\n",
55
+ " projection=ccrs.GOOGLE_MERCATOR,\n",
56
+ " global_extent=True\n",
57
+ ")\n",
58
+ "shortest_path = df.hvplot.paths(color=\"blue\", crs=ccrs.Geodetic(), tiles=True, **common_kwargs)\n",
59
+ "straight_path = df.hvplot.paths(color=\"grey\", line_dash=\"dashed\", **common_kwargs)\n",
60
+ "labels = df.hvplot.labels(text_color=\"black\", text=\"city\", **common_kwargs)\n",
61
+ "shortest_path * straight_path * labels"
62
+ ]
63
+ },
64
+ {
65
+ "cell_type": "markdown",
66
+ "metadata": {},
67
+ "source": [
68
+ "Example adapted from https://scitools.org.uk/cartopy/docs/latest/matplotlib/intro.html."
69
+ ]
70
+ }
71
+ ],
72
+ "metadata": {
73
+ "language_info": {
74
+ "name": "python",
75
+ "pygments_lexer": "ipython3"
76
+ }
77
+ },
78
+ "nbformat": 4,
79
+ "nbformat_minor": 2
80
+ }
@@ -79,6 +79,22 @@
79
79
  "data.hvplot.image(x='lon', y='lat', z='air', title=time, clabel='T [C]')"
80
80
  ]
81
81
  },
82
+ {
83
+ "cell_type": "markdown",
84
+ "metadata": {},
85
+ "source": [
86
+ "We can also override the colorbar ticks and labels with `cticks`, specified as an integer, list of ticks positions, or list of tuples of the tick positions and labels."
87
+ ]
88
+ },
89
+ {
90
+ "cell_type": "code",
91
+ "execution_count": null,
92
+ "metadata": {},
93
+ "outputs": [],
94
+ "source": [
95
+ "data.hvplot.image(x='lon', y='lat', z='air', title=time, clabel='T [C]', cticks=[(-40, \"Below Freezing\"), (0, \"Freezing\"), (40, \"Above Freezing\")])"
96
+ ]
97
+ },
82
98
  {
83
99
  "cell_type": "markdown",
84
100
  "metadata": {},
@@ -0,0 +1,230 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {},
6
+ "source": [
7
+ "# Vectorfield"
8
+ ]
9
+ },
10
+ {
11
+ "cell_type": "code",
12
+ "execution_count": null,
13
+ "metadata": {},
14
+ "outputs": [],
15
+ "source": [
16
+ "import hvplot.xarray # noqa"
17
+ ]
18
+ },
19
+ {
20
+ "cell_type": "markdown",
21
+ "metadata": {},
22
+ "source": [
23
+ "`vectorfield` accepts 2d arrays of magnitude and angle on a grid and produces an array of vectors. x and y can be 2d or 1d coordinates. "
24
+ ]
25
+ },
26
+ {
27
+ "cell_type": "code",
28
+ "execution_count": null,
29
+ "metadata": {},
30
+ "outputs": [],
31
+ "source": [
32
+ "import numpy as np\n",
33
+ "import xarray as xr\n",
34
+ "import holoviews as hv\n",
35
+ "import cartopy.crs as ccrs"
36
+ ]
37
+ },
38
+ {
39
+ "cell_type": "code",
40
+ "execution_count": null,
41
+ "metadata": {},
42
+ "outputs": [],
43
+ "source": [
44
+ "def sample_data(shape=(20, 30)):\n",
45
+ " \"\"\"\n",
46
+ " Return ``(x, y, u, v, crs)`` of some vector data\n",
47
+ " computed mathematically. The returned crs will be a rotated\n",
48
+ " pole CRS, meaning that the vectors will be unevenly spaced in\n",
49
+ " regular PlateCarree space.\n",
50
+ "\n",
51
+ " \"\"\"\n",
52
+ " crs = ccrs.RotatedPole(pole_longitude=177.5, pole_latitude=37.5)\n",
53
+ "\n",
54
+ " x = np.linspace(311.9, 391.1, shape[1])\n",
55
+ " y = np.linspace(-23.6, 24.8, shape[0])\n",
56
+ "\n",
57
+ " x2d, y2d = np.meshgrid(x, y)\n",
58
+ " u = 10 * (2 * np.cos(2 * np.deg2rad(x2d) + 3 * np.deg2rad(y2d + 30)) ** 2)\n",
59
+ " v = 20 * np.cos(6 * np.deg2rad(x2d))\n",
60
+ "\n",
61
+ " return x, y, u, v, crs\n",
62
+ "\n",
63
+ "xs, ys, U, V, crs = sample_data()\n",
64
+ "\n",
65
+ "mag = np.sqrt(U**2 + V**2)\n",
66
+ "angle = (np.pi/2.) - np.arctan2(U/mag, V/mag)\n",
67
+ "\n",
68
+ "ds = xr.Dataset({'mag': xr.DataArray(mag, dims=('y', 'x'), coords={'y': ys, 'x': xs}),\n",
69
+ " 'angle': xr.DataArray(angle, dims=('y', 'x'), coords={'y': ys, 'x': xs})}, \n",
70
+ " attrs={'crs': crs})\n",
71
+ "ds"
72
+ ]
73
+ },
74
+ {
75
+ "cell_type": "code",
76
+ "execution_count": null,
77
+ "metadata": {},
78
+ "outputs": [],
79
+ "source": [
80
+ "ds.hvplot.vectorfield(x='x', y='y', angle='angle', mag='mag', hover=False).opts(magnitude='mag')"
81
+ ]
82
+ },
83
+ {
84
+ "cell_type": "markdown",
85
+ "metadata": {},
86
+ "source": [
87
+ "## Geographic Data\n",
88
+ "If a dataset has an attr called `crs` which is a cartopy object or a proj4 string, then just by setting the option `geo=True` will use the correct crs."
89
+ ]
90
+ },
91
+ {
92
+ "cell_type": "code",
93
+ "execution_count": null,
94
+ "metadata": {},
95
+ "outputs": [],
96
+ "source": [
97
+ "ds.hvplot.vectorfield(x='x', y='y', angle='angle', mag='mag',\n",
98
+ " hover=False, geo=True, tiles=\"CartoLight\")"
99
+ ]
100
+ },
101
+ {
102
+ "cell_type": "markdown",
103
+ "metadata": {},
104
+ "source": [
105
+ "If you set `coastline` or `features` it will keep the original crs and transform the features to the data crs."
106
+ ]
107
+ },
108
+ {
109
+ "cell_type": "code",
110
+ "execution_count": null,
111
+ "metadata": {},
112
+ "outputs": [],
113
+ "source": [
114
+ "ds.hvplot.vectorfield(x='x', y='y', angle='angle', mag='mag',\n",
115
+ " hover=False, geo=True, coastline=True)"
116
+ ]
117
+ },
118
+ {
119
+ "cell_type": "markdown",
120
+ "metadata": {},
121
+ "source": [
122
+ "## Large Data"
123
+ ]
124
+ },
125
+ {
126
+ "cell_type": "markdown",
127
+ "metadata": {},
128
+ "source": [
129
+ "The visualization of vector fields from large datasets often presents a challenge. Direct plotting methods can quickly consume excessive memory, leading to crashes or unresponsive applications. To address this issue, we introduce a dynamic downsampling technique that enables interactive exploration of vector fields without sacrificing performance. We first create a `sample_data` that contains 4,000,000 points."
130
+ ]
131
+ },
132
+ {
133
+ "cell_type": "code",
134
+ "execution_count": null,
135
+ "metadata": {},
136
+ "outputs": [],
137
+ "source": [
138
+ "xs, ys, U, V, crs = sample_data(shape=(2000, 2000))\n",
139
+ "\n",
140
+ "mag = np.sqrt(U**2 + V**2)\n",
141
+ "angle = (np.pi/2.) - np.arctan2(U/mag, V/mag)\n",
142
+ "\n",
143
+ "ds = xr.Dataset({'mag': xr.DataArray(mag, dims=('y', 'x'), coords={'y': ys, 'x': xs}),\n",
144
+ " 'angle': xr.DataArray(angle, dims=('y', 'x'), coords={'y': ys, 'x': xs})}, \n",
145
+ " attrs={'crs': crs})\n",
146
+ "ds"
147
+ ]
148
+ },
149
+ {
150
+ "cell_type": "markdown",
151
+ "metadata": {},
152
+ "source": [
153
+ "If we just try to call `ds.hvplot.vectorfield` this is probably returning `MemoryError`. The alternative is to dynamically downsample the data based on the visible range. This helps manage memory consumption when dealing with large datasets, especially when plotting vector fields. We are going to use HoloViews to create a view (`hv.DynamicMap`) whose content is dynamically updated based on the data range displayed (tracked by the `hv.streams.RangeXY` stream), [find out more about these concepts](https://holoviews.org/user_guide/Custom_Interactivity.html)."
154
+ ]
155
+ },
156
+ {
157
+ "cell_type": "code",
158
+ "execution_count": null,
159
+ "metadata": {},
160
+ "outputs": [],
161
+ "source": [
162
+ "def downsample_quiver(x_range=None, y_range=None, nmax=10):\n",
163
+ " \"\"\"\n",
164
+ " Creates a HoloViews vector field plot from a dataset, dynamically downsampling \n",
165
+ " data based on the visible range to optimize memory usage.\n",
166
+ "\n",
167
+ " Args:\n",
168
+ " x_range (tuple, optional): Range of x values to include. Defaults to None (full range).\n",
169
+ " y_range (tuple, optional): Range of y values to include. Defaults to None (full range).\n",
170
+ " nmax (int, optional): Maximum number of points along each axis after coarsening. \n",
171
+ " Defaults to 10.\n",
172
+ "\n",
173
+ " Returns:\n",
174
+ " HoloViews DynamicMap: A dynamic vector field plot that updates based on the visible range.\n",
175
+ " \"\"\"\n",
176
+ "\n",
177
+ " if x_range is None or y_range is None:\n",
178
+ " # No range provided, downsample the entire dataset for initial display\n",
179
+ " xs, ys = ds.x.size, ds.y.size # Get dataset dimensions\n",
180
+ " ix, iy = xs // nmax, ys // nmax # Calculate downsampling intervals\n",
181
+ "\n",
182
+ " ix = max(1, ix) # Ensure interval is at least 1\n",
183
+ " iy = max(1, iy)\n",
184
+ "\n",
185
+ " sub = ds.coarsen(x=ix, y=iy, side=\"center\", boundary=\"trim\").mean() # Downsample\n",
186
+ " else:\n",
187
+ " # Select data within the specified range\n",
188
+ " sub = ds.sel(x=slice(*x_range), y=slice(*y_range))\n",
189
+ "\n",
190
+ " # Downsample the selected data\n",
191
+ " xs, ys = sub.x.size, sub.y.size\n",
192
+ " ix, iy = xs // nmax, ys // nmax\n",
193
+ " ix = max(1, ix)\n",
194
+ " iy = max(1, iy)\n",
195
+ " sub = sub.coarsen(x=ix, y=iy, side=\"center\", boundary=\"trim\").mean()\n",
196
+ "\n",
197
+ " # Create the vector field plot\n",
198
+ " quiver = sub.hvplot.vectorfield(\n",
199
+ " x=\"x\",\n",
200
+ " y=\"y\",\n",
201
+ " mag=\"mag\",\n",
202
+ " angle=\"angle\",\n",
203
+ " hover=False,\n",
204
+ " ).opts(magnitude=\"mag\")\n",
205
+ "\n",
206
+ " return quiver"
207
+ ]
208
+ },
209
+ {
210
+ "cell_type": "code",
211
+ "execution_count": null,
212
+ "metadata": {},
213
+ "outputs": [],
214
+ "source": [
215
+ "# Create interactive plot components\n",
216
+ "range_xy = hv.streams.RangeXY() # Stream to capture range changes\n",
217
+ "filtered = hv.DynamicMap(downsample_quiver, streams=[range_xy]) # Dynamic plot\n",
218
+ "filtered # Display the plot"
219
+ ]
220
+ }
221
+ ],
222
+ "metadata": {
223
+ "language_info": {
224
+ "name": "python",
225
+ "pygments_lexer": "ipython3"
226
+ }
227
+ },
228
+ "nbformat": 4,
229
+ "nbformat_minor": 4
230
+ }