pymyio 0.1.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.
- pymyio-0.1.0/.gitignore +15 -0
- pymyio-0.1.0/LICENSE +21 -0
- pymyio-0.1.0/PKG-INFO +276 -0
- pymyio-0.1.0/README.md +209 -0
- pymyio-0.1.0/app/README.md +26 -0
- pymyio-0.1.0/examples/quickstart.py +25 -0
- pymyio-0.1.0/pyproject.toml +101 -0
- pymyio-0.1.0/src/pymyio/__init__.py +31 -0
- pymyio-0.1.0/src/pymyio/_version.py +24 -0
- pymyio-0.1.0/src/pymyio/chart.py +1132 -0
- pymyio-0.1.0/src/pymyio/shiny/__init__.py +122 -0
- pymyio-0.1.0/src/pymyio/standalone.py +310 -0
- pymyio-0.1.0/src/pymyio/static/lib/d3-hexbin.js +1 -0
- pymyio-0.1.0/src/pymyio/static/lib/d3-sankey.min.js +1 -0
- pymyio-0.1.0/src/pymyio/static/lib/d3.min.js +1 -0
- pymyio-0.1.0/src/pymyio/static/myIOapi.js +1 -0
- pymyio-0.1.0/src/pymyio/static/style.css +1 -0
- pymyio-0.1.0/src/pymyio/static/widget.js +121 -0
- pymyio-0.1.0/src/pymyio/transforms.py +973 -0
- pymyio-0.1.0/src/pymyio/widget.py +47 -0
- pymyio-0.1.0/tests/conftest.py +59 -0
- pymyio-0.1.0/tests/test_chart_config.py +153 -0
- pymyio-0.1.0/tests/test_jupyter_smoke.py +151 -0
- pymyio-0.1.0/tests/test_packaging.py +36 -0
- pymyio-0.1.0/tests/test_parity.py +463 -0
- pymyio-0.1.0/tests/test_public_api_freeze.py +58 -0
- pymyio-0.1.0/tests/test_regression_shinywidgets_footgun.py +67 -0
- pymyio-0.1.0/tests/test_shiny_app.py +106 -0
- pymyio-0.1.0/tests/test_shiny_integration.py +73 -0
- pymyio-0.1.0/tests/test_standalone_html.py +270 -0
- pymyio-0.1.0/tests/test_transform_density.py +71 -0
- pymyio-0.1.0/tests/test_transform_fit_distribution.py +85 -0
- pymyio-0.1.0/tests/test_transform_loess.py +66 -0
- pymyio-0.1.0/tests/test_transform_pairwise_test.py +99 -0
- pymyio-0.1.0/tests/test_transform_smooth.py +77 -0
- pymyio-0.1.0/tests/test_transform_survfit.py +82 -0
- pymyio-0.1.0/tests/test_transforms_json_safety.py +116 -0
- pymyio-0.1.0/tests/test_wheel_contents.py +80 -0
- pymyio-0.1.0/tests/test_widget_js_contract.py +98 -0
- pymyio-0.1.0/tests/test_widget_runtime_script_count.py +167 -0
- pymyio-0.1.0/vendor/myIO/LICENSE +2 -0
- pymyio-0.1.0/vendor/myIO/README.md +107 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/lib/d3-hexbin.js +2 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/lib/d3-sankey.min.js +2 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/lib/d3.min.js +2 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/lib/w3.css +232 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/lib/jspdf/jspdf.umd.min.js +398 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/myIOapi.js +6751 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/Chart.js +537 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/a11y/aria.js +103 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/a11y/data-table.js +75 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/a11y/descriptions.js +39 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/a11y/keyboard-nav.js +201 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/derive/chart-render.js +58 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/derive/scale-semantics.js +89 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/derive/scales.js +190 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/derive/validate.js +159 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/index.js +6 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/interactions/annotate.js +160 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/interactions/bottom-sheet.js +698 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/interactions/brush.js +167 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/interactions/buttons.js +143 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/interactions/drag.js +28 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/interactions/linked-cursor.js +178 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/interactions/linked.js +105 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/interactions/popover.js +113 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/interactions/rollover.js +398 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/interactions/slider.js +76 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/interactions/status-bar.js +35 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/layout/axes.js +79 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/layout/facet-controller.js +182 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/layout/facet-panel.js +309 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/layout/legend-data.js +115 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/layout/legend.js +34 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/layout/reference-lines.js +84 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/layout/scaffold.js +87 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/registry.js +148 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/AreaRenderer.js +63 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/BarRenderer.js +130 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/BeeswarmRenderer.js +100 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/BracketRenderer.js +89 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/BumpRenderer.js +91 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/CalendarHeatmapRenderer.js +196 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/CandlestickRenderer.js +95 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/DonutRenderer.js +124 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/DumbbellRenderer.js +150 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/FunnelRenderer.js +113 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/GaugeRenderer.js +77 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/GroupedBarRenderer.js +49 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/HeatmapRenderer.js +78 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/HexbinRenderer.js +57 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/HistogramRenderer.js +53 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/LineRenderer.js +111 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/LollipopRenderer.js +119 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/ParallelRenderer.js +130 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/PointRenderer.js +289 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/RadarRenderer.js +179 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/RangeBarRenderer.js +75 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/SankeyRenderer.js +144 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/TextRenderer.js +60 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/TreemapRenderer.js +95 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/WaffleRenderer.js +93 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/WaterfallRenderer.js +114 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/renderers/groupedBarHelpers.js +112 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/theme/palettes.js +64 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/theme/theme-manager.js +157 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/themes/palettes.js +10 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/tooltip.js +179 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/utils/export-clipboard.js +47 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/utils/export-csv.js +34 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/utils/export-legend.js +189 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/utils/export-pdf.js +59 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/utils/export-svg.js +137 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/utils/file-saver.js +5 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/utils/load-jspdf.js +50 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/utils/math.js +41 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/utils/resolve-css-vars.js +91 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/src/utils/responsive.js +29 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO/style.css +872 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO.js +60 -0
- pymyio-0.1.0/vendor/myIO/inst/htmlwidgets/myIO.yaml +18 -0
- pymyio-0.1.0/vendor/myIO/tests/fixtures/spec-contract.json +16 -0
- pymyio-0.1.0/vendor/myIO/tests/js/a11y.test.js +83 -0
- pymyio-0.1.0/vendor/myIO/tests/js/bottom-sheet.test.js +295 -0
- pymyio-0.1.0/vendor/myIO/tests/js/bracket-renderer.test.js +91 -0
- pymyio-0.1.0/vendor/myIO/tests/js/calendar-heatmap.test.js +210 -0
- pymyio-0.1.0/vendor/myIO/tests/js/chart-render.test.js +156 -0
- pymyio-0.1.0/vendor/myIO/tests/js/chart.test.js +136 -0
- pymyio-0.1.0/vendor/myIO/tests/js/contract-export-clipboard.test.js +19 -0
- pymyio-0.1.0/vendor/myIO/tests/js/contract-export-css-vars.test.js +21 -0
- pymyio-0.1.0/vendor/myIO/tests/js/contract-export-toolbar.test.js +69 -0
- pymyio-0.1.0/vendor/myIO/tests/js/export-buttons.test.js +72 -0
- pymyio-0.1.0/vendor/myIO/tests/js/export-csv.test.js +55 -0
- pymyio-0.1.0/vendor/myIO/tests/js/export-legend.test.js +154 -0
- pymyio-0.1.0/vendor/myIO/tests/js/export-svg.test.js +70 -0
- pymyio-0.1.0/vendor/myIO/tests/js/legend.test.js +116 -0
- pymyio-0.1.0/vendor/myIO/tests/js/linked-cursor-integration.test.js +206 -0
- pymyio-0.1.0/vendor/myIO/tests/js/linked-cursor.test.js +115 -0
- pymyio-0.1.0/vendor/myIO/tests/js/math.test.js +59 -0
- pymyio-0.1.0/vendor/myIO/tests/js/palettes.test.js +22 -0
- pymyio-0.1.0/vendor/myIO/tests/js/registry.test.js +9 -0
- pymyio-0.1.0/vendor/myIO/tests/js/renderers.test.js +707 -0
- pymyio-0.1.0/vendor/myIO/tests/js/resolve-css-vars.test.js +82 -0
- pymyio-0.1.0/vendor/myIO/tests/js/responsive.test.js +94 -0
- pymyio-0.1.0/vendor/myIO/tests/js/scaffold.test.js +34 -0
- pymyio-0.1.0/vendor/myIO/tests/js/scale-semantics.test.js +98 -0
- pymyio-0.1.0/vendor/myIO/tests/js/sparkline.test.js +118 -0
- pymyio-0.1.0/vendor/myIO/tests/js/theme.test.js +113 -0
- pymyio-0.1.0/vendor/myIO/tests/js/tooltip.test.js +166 -0
- pymyio-0.1.0/vendor/myIO/tests/js/validate-extended.test.js +255 -0
- pymyio-0.1.0/vendor/myIO/tests/js/validate.test.js +25 -0
- pymyio-0.1.0/vendor/myIO/tests/js/widget-shell.test.js +18 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test-linkCharts-cursor.R +60 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test-linked-coverage.R +62 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test-myIO.R +40 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test-sizing-policy.R +30 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_assert.R +22 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_beeswarm.R +26 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_bump.R +35 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_calendar_heatmap.R +62 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_candlestick.R +45 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_check_helpers.R +70 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_composite.R +14 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_composite_boxplot.R +44 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_composite_comparison.R +57 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_composite_qq.R +64 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_composite_regression.R +110 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_composite_ridgeline.R +47 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_composite_violin.R +46 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_dumbbell.R +53 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_e2e_widgets.R +558 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_edge_cases.R +197 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_error_messages.R +75 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_funnel.R +24 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_grouped_df.R +67 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_heatmap.R +46 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_histogram_fit.R +102 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_interaction_conflicts.R +47 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_layer.R +121 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_linkCharts.R +63 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_lollipop.R +40 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_options.R +61 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_parallel.R +15 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_radar.R +24 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_sankey.R +41 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_setAnnotation.R +37 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_setBrush.R +26 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_setExportOptions.R +42 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_setFacet.R +64 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_setLayerOpacity.R +32 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_setLinked.R +51 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_setSlider.R +60 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_setters_extended.R +178 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_sparkline.R +68 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_spec_contract.R +30 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_survfit.R +97 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_theme_mode.R +78 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_theme_presets.R +16 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_ci.R +108 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_cumulative.R +26 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_density.R +29 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_input_contracts.R +61 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_loess.R +65 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_mean.R +62 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_mean_ci.R +95 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_median.R +33 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_outliers.R +35 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_pairwise_test.R +166 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_polynomial.R +50 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_qq.R +111 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_quantiles.R +40 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_residuals.R +68 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_smooth.R +84 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_transform_summary.R +78 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_util.R +5 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_util_extended.R +137 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_waffle.R +40 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat/test_waterfall.R +39 -0
- pymyio-0.1.0/vendor/myIO/tests/testthat.R +4 -0
pymyio-0.1.0/.gitignore
ADDED
pymyio-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Morton Analytics
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
pymyio-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pymyio
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python bindings for the myIO d3.js chart library
|
|
5
|
+
Project-URL: Homepage, https://github.com/mortonanalytics/pymyIO
|
|
6
|
+
Project-URL: Source, https://github.com/mortonanalytics/pymyIO
|
|
7
|
+
Project-URL: Sister R package, https://github.com/mortonanalytics/myIO
|
|
8
|
+
Author: Morton Analytics
|
|
9
|
+
License: MIT License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2026 Morton Analytics
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
in the Software without restriction, including without limitation the rights
|
|
16
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
furnished to do so, subject to the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in all
|
|
21
|
+
copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
+
SOFTWARE.
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Keywords: anywidget,charts,d3,jupyter,myio,visualization
|
|
32
|
+
Classifier: Development Status :: 3 - Alpha
|
|
33
|
+
Classifier: Framework :: Jupyter
|
|
34
|
+
Classifier: Framework :: Jupyter :: JupyterLab
|
|
35
|
+
Classifier: Intended Audience :: Science/Research
|
|
36
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
37
|
+
Classifier: Operating System :: OS Independent
|
|
38
|
+
Classifier: Programming Language :: Python :: 3
|
|
39
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
45
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
46
|
+
Requires-Python: >=3.9
|
|
47
|
+
Requires-Dist: anywidget<0.11,>=0.10.0
|
|
48
|
+
Requires-Dist: ipywidgets>=8.0
|
|
49
|
+
Requires-Dist: numpy>=1.24
|
|
50
|
+
Requires-Dist: scipy>=1.11
|
|
51
|
+
Requires-Dist: traitlets<6,>=5.9
|
|
52
|
+
Provides-Extra: dev
|
|
53
|
+
Requires-Dist: pandas>=1.5; extra == 'dev'
|
|
54
|
+
Requires-Dist: pytest-playwright>=0.5; extra == 'dev'
|
|
55
|
+
Requires-Dist: pytest>=7; extra == 'dev'
|
|
56
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
57
|
+
Requires-Dist: shiny>=1.0; extra == 'dev'
|
|
58
|
+
Requires-Dist: shinywidgets>=0.8.0; extra == 'dev'
|
|
59
|
+
Provides-Extra: pandas
|
|
60
|
+
Requires-Dist: pandas>=1.5; extra == 'pandas'
|
|
61
|
+
Provides-Extra: polars
|
|
62
|
+
Requires-Dist: polars>=0.20; extra == 'polars'
|
|
63
|
+
Provides-Extra: shiny
|
|
64
|
+
Requires-Dist: shiny>=1.0; extra == 'shiny'
|
|
65
|
+
Requires-Dist: shinywidgets>=0.8.0; extra == 'shiny'
|
|
66
|
+
Description-Content-Type: text/markdown
|
|
67
|
+
|
|
68
|
+
# pymyIO
|
|
69
|
+
|
|
70
|
+
Python bindings for [myIO](https://github.com/mortonanalytics/myIO) — the
|
|
71
|
+
d3.js-based interactive chart library originally shipped as an R package.
|
|
72
|
+
|
|
73
|
+
`pymyIO` is feature-equivalent to the R package: every R export is reachable
|
|
74
|
+
from Python, every chart type renders identically, and the JSON config the
|
|
75
|
+
Python builder produces matches what R emits, byte for byte where possible.
|
|
76
|
+
Both packages drive the **same** d3 engine (`myIOapi.js`), wired in via a git
|
|
77
|
+
submodule so there is one canonical source of truth — no duplicated JS to
|
|
78
|
+
drift.
|
|
79
|
+
|
|
80
|
+
- **Docs:** [https://mortonanalytics.github.io/pymyIO/](https://mortonanalytics.github.io/pymyIO/)
|
|
81
|
+
- **Live gallery:** [https://pymyio.morton-analytics.com/](https://pymyio.morton-analytics.com/) (Shiny for Python, source in [`app/app.py`](app/app.py))
|
|
82
|
+
|
|
83
|
+
> Status: alpha (0.1.0). API is settled and matches R's `setMargin`/`setBrush`/
|
|
84
|
+
> etc. surface. All 19 registry transforms are implemented, including
|
|
85
|
+
> `loess`, `smooth`, `density`, `survfit`, `fit_distribution`, and
|
|
86
|
+
> `pairwise_test` (scipy-backed, Python-native — numeric output may differ
|
|
87
|
+
> from the R package's `stats`-based versions).
|
|
88
|
+
|
|
89
|
+
## Installation
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pip install pymyio # once published to PyPI
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
For development:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
git clone --recurse-submodules https://github.com/mortonanalytics/pymyIO
|
|
99
|
+
cd pymyIO
|
|
100
|
+
pip install -e ".[dev]"
|
|
101
|
+
pytest
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
If you cloned without `--recurse-submodules`, fetch the engine afterwards:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
git submodule update --init --recursive
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Quickstart
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
import pandas as pd
|
|
114
|
+
from pymyio import MyIO
|
|
115
|
+
|
|
116
|
+
mtcars = pd.DataFrame({
|
|
117
|
+
"wt": [2.62, 2.875, 2.32, 3.215, 3.44, 3.46],
|
|
118
|
+
"mpg": [21.0, 21.0, 22.8, 21.4, 18.7, 18.1],
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
(
|
|
122
|
+
MyIO(data=mtcars)
|
|
123
|
+
.add_layer(type="point", label="points",
|
|
124
|
+
mapping={"x_var": "wt", "y_var": "mpg"}, color="#E69F00")
|
|
125
|
+
.add_layer(type="line", label="trend", transform="lm",
|
|
126
|
+
mapping={"x_var": "wt", "y_var": "mpg"}, color="red")
|
|
127
|
+
.set_axis_format(x_label="Weight (1000 lbs)", y_label="MPG")
|
|
128
|
+
)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
In a Jupyter cell, the trailing expression renders as an interactive widget.
|
|
132
|
+
Outside notebooks, call `.render()` to get a `MyIOWidget`, or `.to_config()`
|
|
133
|
+
for the underlying JSON spec.
|
|
134
|
+
|
|
135
|
+
## Where pymyIO runs
|
|
136
|
+
|
|
137
|
+
| Host | Tier | Render idiom |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| [JupyterLab](docs/hosts/jupyterlab.md) | 1 | trailing expression in a cell |
|
|
140
|
+
| [VS Code (Jupyter extension)](docs/hosts/vscode.md) | 1 | trailing expression in a cell |
|
|
141
|
+
| [Shiny for Python](docs/hosts/shiny.md) | 1 | `from pymyio.shiny import render_myio, output_myio` |
|
|
142
|
+
| [Classic Notebook 7.x](docs/hosts/classic-notebook.md) | 2 | trailing expression |
|
|
143
|
+
| [Google Colab](docs/hosts/colab.md) | 2 | trailing expression |
|
|
144
|
+
| [marimo](docs/hosts/marimo.md) | 2 | `mo.ui.anywidget(MyIO(...).render())` |
|
|
145
|
+
| [Panel](docs/hosts/panel.md) | 2 | `pn.pane.IPyWidget(MyIO(...).render())` |
|
|
146
|
+
| [Solara](docs/hosts/solara.md) | 2 | `solara.display(MyIO(...).render())` |
|
|
147
|
+
| [Quarto (HTML)](docs/hosts/quarto.md) | 2 | interactive HTML only; PDF/docx not supported |
|
|
148
|
+
| static HTML / email / Quarto PDF workaround | — | `pymyio.to_standalone_html(chart)` |
|
|
149
|
+
|
|
150
|
+
**Tier 1** hosts are covered by CI and release-block on regressions.
|
|
151
|
+
**Tier 2** hosts are documented best-effort and verified on the
|
|
152
|
+
[pre-release smoke checklist](docs/hosts/_release-checklist.md).
|
|
153
|
+
|
|
154
|
+
## Shiny for Python
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
from shiny import App, ui
|
|
158
|
+
from pymyio.shiny import render_myio, output_myio, reactive_brush, example_app
|
|
159
|
+
|
|
160
|
+
# Copy-paste the whole app:
|
|
161
|
+
app = example_app()
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The `pymyio.shiny` submodule ships thin aliases over
|
|
165
|
+
[`shinywidgets`](https://github.com/posit-dev/py-shinywidgets) so R-myIO
|
|
166
|
+
users get `renderMyIO`/`myIOOutput` muscle memory, plus
|
|
167
|
+
`reactive_brush`/`reactive_annotated`/`reactive_rollover` helpers that wrap
|
|
168
|
+
`shinywidgets.reactive_read(widget, trait_name)`.
|
|
169
|
+
|
|
170
|
+
Install with `pip install 'pymyio[shiny]'` (pulls `shinywidgets >= 0.8.0`
|
|
171
|
+
and `shiny >= 1.0`). Don't import `shinywidgets` directly in vanilla
|
|
172
|
+
Jupyter notebooks — it installs a process-wide callback that breaks widget
|
|
173
|
+
construction outside a Shiny session. pymyio's top-level never touches
|
|
174
|
+
`shinywidgets`; the submodule is opt-in for exactly this reason.
|
|
175
|
+
|
|
176
|
+
## Static HTML export (Quarto, nbconvert, email embeds)
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
from pymyio import to_standalone_html
|
|
180
|
+
|
|
181
|
+
html = to_standalone_html(MyIO(data=df).add_layer(...))
|
|
182
|
+
open("chart.html", "w").write(html)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
`include_assets="inline"` (default) produces one self-contained HTML
|
|
186
|
+
string; `include_assets="bundled"` returns `(html_str, assets_dict)` for
|
|
187
|
+
publishing pipelines that prefer sidecar assets. Interactive-only features
|
|
188
|
+
(`set_brush`, `set_annotation`, `drag_points`) emit a
|
|
189
|
+
`MyIOStaticWarning` — the chart renders, but round-trip callbacks need a
|
|
190
|
+
live Python kernel.
|
|
191
|
+
|
|
192
|
+
## Supported chart types (34 total)
|
|
193
|
+
|
|
194
|
+
`line`, `point`, `bar`, `groupedBar`, `area`, `histogram`, `heatmap`,
|
|
195
|
+
`hexbin`, `treemap`, `gauge`, `donut`, `candlestick`, `waterfall`, `sankey`,
|
|
196
|
+
`boxplot`, `violin`, `ridgeline`, `rangeBar`, `text`, `regression`,
|
|
197
|
+
`bracket`, `comparison`, `qq`, `lollipop`, `dumbbell`, `waffle`, `beeswarm`,
|
|
198
|
+
`bump`, `radar`, `funnel`, `parallel`, `survfit`, `histogram_fit`,
|
|
199
|
+
`calendarHeatmap`.
|
|
200
|
+
|
|
201
|
+
## R → Python function map
|
|
202
|
+
|
|
203
|
+
| R export | Python equivalent |
|
|
204
|
+
|---|---|
|
|
205
|
+
| `myIO()` | `MyIO()` |
|
|
206
|
+
| `addIoLayer()` | `MyIO.add_layer()` |
|
|
207
|
+
| `setMargin()` | `MyIO.set_margin()` |
|
|
208
|
+
| `setAxisFormat()` | `MyIO.set_axis_format()` |
|
|
209
|
+
| `setAxisLimits()` | `MyIO.set_axis_limits()` |
|
|
210
|
+
| `setColorScheme()` | `MyIO.set_color_scheme()` |
|
|
211
|
+
| `setReferenceLines()` | `MyIO.set_reference_lines()` |
|
|
212
|
+
| `setTheme()` | `MyIO.set_theme()` |
|
|
213
|
+
| `setTransitionSpeed()` | `MyIO.set_transition_speed()` |
|
|
214
|
+
| `setToolTipOptions()` | `MyIO.set_tooltip_options()` |
|
|
215
|
+
| `defineCategoricalAxis()` | `MyIO.define_categorical_axis()` |
|
|
216
|
+
| `flipAxis()` | `MyIO.flip_axis()` |
|
|
217
|
+
| `suppressLegend()` | `MyIO.suppress_legend()` |
|
|
218
|
+
| `suppressAxis()` | `MyIO.suppress_axis()` |
|
|
219
|
+
| `setBrush()` | `MyIO.set_brush()` |
|
|
220
|
+
| `setAnnotation()` | `MyIO.set_annotation()` |
|
|
221
|
+
| `setExportOptions()` | `MyIO.set_export_options()` |
|
|
222
|
+
| `setFacet()` | `MyIO.set_facet()` |
|
|
223
|
+
| `setLayerOpacity()` | `MyIO.set_layer_opacity()` |
|
|
224
|
+
| `setSlider()` | `MyIO.set_slider()` |
|
|
225
|
+
| `setToggle()` | `MyIO.set_toggle()` |
|
|
226
|
+
| `setLinkedCursor()` | `MyIO.set_linked_cursor()` |
|
|
227
|
+
| `dragPoints()` | `MyIO.drag_points()` |
|
|
228
|
+
| `linkCharts()` | `pymyio.link_charts()` (module-level) |
|
|
229
|
+
| `setLinked()` | n/a — Crosstalk-specific; use `link_charts()` |
|
|
230
|
+
| `myIO_last_error()` | `MyIOWidget.last_error` traitlet |
|
|
231
|
+
| `myIOOutput`/`renderMyIO` | n/a — Shiny-specific |
|
|
232
|
+
|
|
233
|
+
## Reading interactions back into Python
|
|
234
|
+
|
|
235
|
+
```python
|
|
236
|
+
chart = MyIO(data=mtcars).add_layer(...).set_brush().render()
|
|
237
|
+
chart # display in a cell
|
|
238
|
+
chart.brushed # last brush selection (dict, syncs from JS)
|
|
239
|
+
chart.annotated # last annotation event
|
|
240
|
+
chart.last_error # most recent JS render error, if any
|
|
241
|
+
chart.observe(handler, names=["brushed"]) # react to selections
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Architecture: one engine, two wrappers
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
mortonanalytics/myIO (R package)
|
|
248
|
+
└── inst/htmlwidgets/myIO/ ← canonical engine source
|
|
249
|
+
├── myIOapi.js
|
|
250
|
+
├── style.css
|
|
251
|
+
└── lib/d3*.js
|
|
252
|
+
|
|
253
|
+
mortonanalytics/pymyIO (this repo)
|
|
254
|
+
├── vendor/myIO/ ← git submodule pinned to a myIO commit
|
|
255
|
+
└── src/pymyio/static/ ← symlinks pointing into vendor/myIO/
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Wheels built by `python -m build` follow the symlinks and ship real files,
|
|
259
|
+
so end-users pip-install a self-contained package. Developers and CI work
|
|
260
|
+
against the submodule directly. To pull in upstream chart fixes:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
git submodule update --remote vendor/myIO
|
|
264
|
+
git add vendor/myIO && git commit -m "bump myIO engine to <sha>"
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Roadmap
|
|
268
|
+
|
|
269
|
+
| ID | Item | Disposition |
|
|
270
|
+
|----|------|-------------|
|
|
271
|
+
| PYMYIO-DOC | Sphinx docs site | Out of scope for 0.1.0 |
|
|
272
|
+
|
|
273
|
+
## License
|
|
274
|
+
|
|
275
|
+
MIT. See [LICENSE](LICENSE). The vendored myIO engine is also MIT-licensed
|
|
276
|
+
(see `vendor/myIO/LICENSE`).
|
pymyio-0.1.0/README.md
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# pymyIO
|
|
2
|
+
|
|
3
|
+
Python bindings for [myIO](https://github.com/mortonanalytics/myIO) — the
|
|
4
|
+
d3.js-based interactive chart library originally shipped as an R package.
|
|
5
|
+
|
|
6
|
+
`pymyIO` is feature-equivalent to the R package: every R export is reachable
|
|
7
|
+
from Python, every chart type renders identically, and the JSON config the
|
|
8
|
+
Python builder produces matches what R emits, byte for byte where possible.
|
|
9
|
+
Both packages drive the **same** d3 engine (`myIOapi.js`), wired in via a git
|
|
10
|
+
submodule so there is one canonical source of truth — no duplicated JS to
|
|
11
|
+
drift.
|
|
12
|
+
|
|
13
|
+
- **Docs:** [https://mortonanalytics.github.io/pymyIO/](https://mortonanalytics.github.io/pymyIO/)
|
|
14
|
+
- **Live gallery:** [https://pymyio.morton-analytics.com/](https://pymyio.morton-analytics.com/) (Shiny for Python, source in [`app/app.py`](app/app.py))
|
|
15
|
+
|
|
16
|
+
> Status: alpha (0.1.0). API is settled and matches R's `setMargin`/`setBrush`/
|
|
17
|
+
> etc. surface. All 19 registry transforms are implemented, including
|
|
18
|
+
> `loess`, `smooth`, `density`, `survfit`, `fit_distribution`, and
|
|
19
|
+
> `pairwise_test` (scipy-backed, Python-native — numeric output may differ
|
|
20
|
+
> from the R package's `stats`-based versions).
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install pymyio # once published to PyPI
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
For development:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git clone --recurse-submodules https://github.com/mortonanalytics/pymyIO
|
|
32
|
+
cd pymyIO
|
|
33
|
+
pip install -e ".[dev]"
|
|
34
|
+
pytest
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If you cloned without `--recurse-submodules`, fetch the engine afterwards:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git submodule update --init --recursive
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quickstart
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
import pandas as pd
|
|
47
|
+
from pymyio import MyIO
|
|
48
|
+
|
|
49
|
+
mtcars = pd.DataFrame({
|
|
50
|
+
"wt": [2.62, 2.875, 2.32, 3.215, 3.44, 3.46],
|
|
51
|
+
"mpg": [21.0, 21.0, 22.8, 21.4, 18.7, 18.1],
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
(
|
|
55
|
+
MyIO(data=mtcars)
|
|
56
|
+
.add_layer(type="point", label="points",
|
|
57
|
+
mapping={"x_var": "wt", "y_var": "mpg"}, color="#E69F00")
|
|
58
|
+
.add_layer(type="line", label="trend", transform="lm",
|
|
59
|
+
mapping={"x_var": "wt", "y_var": "mpg"}, color="red")
|
|
60
|
+
.set_axis_format(x_label="Weight (1000 lbs)", y_label="MPG")
|
|
61
|
+
)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
In a Jupyter cell, the trailing expression renders as an interactive widget.
|
|
65
|
+
Outside notebooks, call `.render()` to get a `MyIOWidget`, or `.to_config()`
|
|
66
|
+
for the underlying JSON spec.
|
|
67
|
+
|
|
68
|
+
## Where pymyIO runs
|
|
69
|
+
|
|
70
|
+
| Host | Tier | Render idiom |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| [JupyterLab](docs/hosts/jupyterlab.md) | 1 | trailing expression in a cell |
|
|
73
|
+
| [VS Code (Jupyter extension)](docs/hosts/vscode.md) | 1 | trailing expression in a cell |
|
|
74
|
+
| [Shiny for Python](docs/hosts/shiny.md) | 1 | `from pymyio.shiny import render_myio, output_myio` |
|
|
75
|
+
| [Classic Notebook 7.x](docs/hosts/classic-notebook.md) | 2 | trailing expression |
|
|
76
|
+
| [Google Colab](docs/hosts/colab.md) | 2 | trailing expression |
|
|
77
|
+
| [marimo](docs/hosts/marimo.md) | 2 | `mo.ui.anywidget(MyIO(...).render())` |
|
|
78
|
+
| [Panel](docs/hosts/panel.md) | 2 | `pn.pane.IPyWidget(MyIO(...).render())` |
|
|
79
|
+
| [Solara](docs/hosts/solara.md) | 2 | `solara.display(MyIO(...).render())` |
|
|
80
|
+
| [Quarto (HTML)](docs/hosts/quarto.md) | 2 | interactive HTML only; PDF/docx not supported |
|
|
81
|
+
| static HTML / email / Quarto PDF workaround | — | `pymyio.to_standalone_html(chart)` |
|
|
82
|
+
|
|
83
|
+
**Tier 1** hosts are covered by CI and release-block on regressions.
|
|
84
|
+
**Tier 2** hosts are documented best-effort and verified on the
|
|
85
|
+
[pre-release smoke checklist](docs/hosts/_release-checklist.md).
|
|
86
|
+
|
|
87
|
+
## Shiny for Python
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
from shiny import App, ui
|
|
91
|
+
from pymyio.shiny import render_myio, output_myio, reactive_brush, example_app
|
|
92
|
+
|
|
93
|
+
# Copy-paste the whole app:
|
|
94
|
+
app = example_app()
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The `pymyio.shiny` submodule ships thin aliases over
|
|
98
|
+
[`shinywidgets`](https://github.com/posit-dev/py-shinywidgets) so R-myIO
|
|
99
|
+
users get `renderMyIO`/`myIOOutput` muscle memory, plus
|
|
100
|
+
`reactive_brush`/`reactive_annotated`/`reactive_rollover` helpers that wrap
|
|
101
|
+
`shinywidgets.reactive_read(widget, trait_name)`.
|
|
102
|
+
|
|
103
|
+
Install with `pip install 'pymyio[shiny]'` (pulls `shinywidgets >= 0.8.0`
|
|
104
|
+
and `shiny >= 1.0`). Don't import `shinywidgets` directly in vanilla
|
|
105
|
+
Jupyter notebooks — it installs a process-wide callback that breaks widget
|
|
106
|
+
construction outside a Shiny session. pymyio's top-level never touches
|
|
107
|
+
`shinywidgets`; the submodule is opt-in for exactly this reason.
|
|
108
|
+
|
|
109
|
+
## Static HTML export (Quarto, nbconvert, email embeds)
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from pymyio import to_standalone_html
|
|
113
|
+
|
|
114
|
+
html = to_standalone_html(MyIO(data=df).add_layer(...))
|
|
115
|
+
open("chart.html", "w").write(html)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`include_assets="inline"` (default) produces one self-contained HTML
|
|
119
|
+
string; `include_assets="bundled"` returns `(html_str, assets_dict)` for
|
|
120
|
+
publishing pipelines that prefer sidecar assets. Interactive-only features
|
|
121
|
+
(`set_brush`, `set_annotation`, `drag_points`) emit a
|
|
122
|
+
`MyIOStaticWarning` — the chart renders, but round-trip callbacks need a
|
|
123
|
+
live Python kernel.
|
|
124
|
+
|
|
125
|
+
## Supported chart types (34 total)
|
|
126
|
+
|
|
127
|
+
`line`, `point`, `bar`, `groupedBar`, `area`, `histogram`, `heatmap`,
|
|
128
|
+
`hexbin`, `treemap`, `gauge`, `donut`, `candlestick`, `waterfall`, `sankey`,
|
|
129
|
+
`boxplot`, `violin`, `ridgeline`, `rangeBar`, `text`, `regression`,
|
|
130
|
+
`bracket`, `comparison`, `qq`, `lollipop`, `dumbbell`, `waffle`, `beeswarm`,
|
|
131
|
+
`bump`, `radar`, `funnel`, `parallel`, `survfit`, `histogram_fit`,
|
|
132
|
+
`calendarHeatmap`.
|
|
133
|
+
|
|
134
|
+
## R → Python function map
|
|
135
|
+
|
|
136
|
+
| R export | Python equivalent |
|
|
137
|
+
|---|---|
|
|
138
|
+
| `myIO()` | `MyIO()` |
|
|
139
|
+
| `addIoLayer()` | `MyIO.add_layer()` |
|
|
140
|
+
| `setMargin()` | `MyIO.set_margin()` |
|
|
141
|
+
| `setAxisFormat()` | `MyIO.set_axis_format()` |
|
|
142
|
+
| `setAxisLimits()` | `MyIO.set_axis_limits()` |
|
|
143
|
+
| `setColorScheme()` | `MyIO.set_color_scheme()` |
|
|
144
|
+
| `setReferenceLines()` | `MyIO.set_reference_lines()` |
|
|
145
|
+
| `setTheme()` | `MyIO.set_theme()` |
|
|
146
|
+
| `setTransitionSpeed()` | `MyIO.set_transition_speed()` |
|
|
147
|
+
| `setToolTipOptions()` | `MyIO.set_tooltip_options()` |
|
|
148
|
+
| `defineCategoricalAxis()` | `MyIO.define_categorical_axis()` |
|
|
149
|
+
| `flipAxis()` | `MyIO.flip_axis()` |
|
|
150
|
+
| `suppressLegend()` | `MyIO.suppress_legend()` |
|
|
151
|
+
| `suppressAxis()` | `MyIO.suppress_axis()` |
|
|
152
|
+
| `setBrush()` | `MyIO.set_brush()` |
|
|
153
|
+
| `setAnnotation()` | `MyIO.set_annotation()` |
|
|
154
|
+
| `setExportOptions()` | `MyIO.set_export_options()` |
|
|
155
|
+
| `setFacet()` | `MyIO.set_facet()` |
|
|
156
|
+
| `setLayerOpacity()` | `MyIO.set_layer_opacity()` |
|
|
157
|
+
| `setSlider()` | `MyIO.set_slider()` |
|
|
158
|
+
| `setToggle()` | `MyIO.set_toggle()` |
|
|
159
|
+
| `setLinkedCursor()` | `MyIO.set_linked_cursor()` |
|
|
160
|
+
| `dragPoints()` | `MyIO.drag_points()` |
|
|
161
|
+
| `linkCharts()` | `pymyio.link_charts()` (module-level) |
|
|
162
|
+
| `setLinked()` | n/a — Crosstalk-specific; use `link_charts()` |
|
|
163
|
+
| `myIO_last_error()` | `MyIOWidget.last_error` traitlet |
|
|
164
|
+
| `myIOOutput`/`renderMyIO` | n/a — Shiny-specific |
|
|
165
|
+
|
|
166
|
+
## Reading interactions back into Python
|
|
167
|
+
|
|
168
|
+
```python
|
|
169
|
+
chart = MyIO(data=mtcars).add_layer(...).set_brush().render()
|
|
170
|
+
chart # display in a cell
|
|
171
|
+
chart.brushed # last brush selection (dict, syncs from JS)
|
|
172
|
+
chart.annotated # last annotation event
|
|
173
|
+
chart.last_error # most recent JS render error, if any
|
|
174
|
+
chart.observe(handler, names=["brushed"]) # react to selections
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Architecture: one engine, two wrappers
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
mortonanalytics/myIO (R package)
|
|
181
|
+
└── inst/htmlwidgets/myIO/ ← canonical engine source
|
|
182
|
+
├── myIOapi.js
|
|
183
|
+
├── style.css
|
|
184
|
+
└── lib/d3*.js
|
|
185
|
+
|
|
186
|
+
mortonanalytics/pymyIO (this repo)
|
|
187
|
+
├── vendor/myIO/ ← git submodule pinned to a myIO commit
|
|
188
|
+
└── src/pymyio/static/ ← symlinks pointing into vendor/myIO/
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Wheels built by `python -m build` follow the symlinks and ship real files,
|
|
192
|
+
so end-users pip-install a self-contained package. Developers and CI work
|
|
193
|
+
against the submodule directly. To pull in upstream chart fixes:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
git submodule update --remote vendor/myIO
|
|
197
|
+
git add vendor/myIO && git commit -m "bump myIO engine to <sha>"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Roadmap
|
|
201
|
+
|
|
202
|
+
| ID | Item | Disposition |
|
|
203
|
+
|----|------|-------------|
|
|
204
|
+
| PYMYIO-DOC | Sphinx docs site | Out of scope for 0.1.0 |
|
|
205
|
+
|
|
206
|
+
## License
|
|
207
|
+
|
|
208
|
+
MIT. See [LICENSE](LICENSE). The vendored myIO engine is also MIT-licensed
|
|
209
|
+
(see `vendor/myIO/LICENSE`).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# pymyIO Shiny gallery
|
|
2
|
+
|
|
3
|
+
A Shiny-for-Python app demonstrating every working chart type. Mirrors the
|
|
4
|
+
R-myIO gallery at [https://www.morton-analytics.com/myio/](https://www.morton-analytics.com/myio/).
|
|
5
|
+
|
|
6
|
+
## Run locally
|
|
7
|
+
|
|
8
|
+
From the repo root:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install -e ".[shiny]"
|
|
12
|
+
shiny run --reload --launch-browser app/app.py
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or with uv:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
uv pip install -e ".[shiny]"
|
|
19
|
+
uv run shiny run --reload --launch-browser app/app.py
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Deployment
|
|
23
|
+
|
|
24
|
+
Built with the [Dockerfile](../Dockerfile) at the repo root and the
|
|
25
|
+
[`.do/app.yaml`](../.do/app.yaml) App Spec. Push to `main`; Digital Ocean
|
|
26
|
+
rebuilds and redeploys.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Quickstart: build a scatter + trend overlay and dump the JSON config."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
|
|
5
|
+
from pymyio import MyIO
|
|
6
|
+
|
|
7
|
+
mtcars = [
|
|
8
|
+
{"wt": 2.620, "mpg": 21.0, "cyl": 6},
|
|
9
|
+
{"wt": 2.875, "mpg": 21.0, "cyl": 6},
|
|
10
|
+
{"wt": 2.320, "mpg": 22.8, "cyl": 4},
|
|
11
|
+
{"wt": 3.215, "mpg": 21.4, "cyl": 6},
|
|
12
|
+
{"wt": 3.440, "mpg": 18.7, "cyl": 8},
|
|
13
|
+
{"wt": 3.460, "mpg": 18.1, "cyl": 6},
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
chart = (
|
|
17
|
+
MyIO(data=mtcars)
|
|
18
|
+
.add_layer(type="point", label="points",
|
|
19
|
+
mapping={"x_var": "wt", "y_var": "mpg"}, color="#E69F00")
|
|
20
|
+
.add_layer(type="line", label="trend", transform="lm",
|
|
21
|
+
mapping={"x_var": "wt", "y_var": "mpg"}, color="red")
|
|
22
|
+
.set_axis_format(x_label="Weight", y_label="MPG")
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
print(json.dumps(chart.to_config(), indent=2)[:600], "...")
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling", "hatch-vcs"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pymyio"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Python bindings for the myIO d3.js chart library"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { file = "LICENSE" }
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
authors = [{ name = "Morton Analytics" }]
|
|
13
|
+
keywords = ["d3", "visualization", "charts", "jupyter", "anywidget", "myio"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Framework :: Jupyter",
|
|
17
|
+
"Framework :: Jupyter :: JupyterLab",
|
|
18
|
+
"Intended Audience :: Science/Research",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
23
|
+
"Programming Language :: Python :: 3.9",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Topic :: Scientific/Engineering :: Visualization",
|
|
29
|
+
]
|
|
30
|
+
dependencies = [
|
|
31
|
+
"anywidget>=0.10.0,<0.11",
|
|
32
|
+
"traitlets>=5.9,<6",
|
|
33
|
+
"ipywidgets>=8.0",
|
|
34
|
+
"numpy>=1.24",
|
|
35
|
+
"scipy>=1.11",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.optional-dependencies]
|
|
39
|
+
shiny = ["shinywidgets>=0.8.0", "shiny>=1.0"]
|
|
40
|
+
pandas = ["pandas>=1.5"]
|
|
41
|
+
polars = ["polars>=0.20"]
|
|
42
|
+
dev = [
|
|
43
|
+
"pytest>=7",
|
|
44
|
+
"pytest-playwright>=0.5",
|
|
45
|
+
"pandas>=1.5",
|
|
46
|
+
"shinywidgets>=0.8.0",
|
|
47
|
+
"shiny>=1.0",
|
|
48
|
+
"ruff>=0.4",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
[project.urls]
|
|
52
|
+
Homepage = "https://github.com/mortonanalytics/pymyIO"
|
|
53
|
+
Source = "https://github.com/mortonanalytics/pymyIO"
|
|
54
|
+
"Sister R package" = "https://github.com/mortonanalytics/myIO"
|
|
55
|
+
|
|
56
|
+
[tool.hatch.version]
|
|
57
|
+
source = "vcs"
|
|
58
|
+
|
|
59
|
+
[tool.hatch.build.hooks.vcs]
|
|
60
|
+
version-file = "src/pymyio/_version.py"
|
|
61
|
+
|
|
62
|
+
[tool.hatch.build.targets.wheel]
|
|
63
|
+
packages = ["src/pymyio"]
|
|
64
|
+
# Skip the symlinks under static/ — force-include below materializes them
|
|
65
|
+
# from the submodule so the wheel contains a single, canonical copy.
|
|
66
|
+
exclude = [
|
|
67
|
+
"src/pymyio/static/myIOapi.js",
|
|
68
|
+
"src/pymyio/static/style.css",
|
|
69
|
+
"src/pymyio/static/lib/d3.min.js",
|
|
70
|
+
"src/pymyio/static/lib/d3-hexbin.js",
|
|
71
|
+
"src/pymyio/static/lib/d3-sankey.min.js",
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
# Materialize the engine into the wheel by following the symlinks under
|
|
75
|
+
# src/pymyio/static/ that point into the vendored myIO submodule. This way
|
|
76
|
+
# end-users who `pip install pymyio` get real files even though developers
|
|
77
|
+
# work from a single source of truth in vendor/myIO/.
|
|
78
|
+
[tool.hatch.build.targets.wheel.force-include]
|
|
79
|
+
"vendor/myIO/inst/htmlwidgets/myIO/myIOapi.js" = "pymyio/static/myIOapi.js"
|
|
80
|
+
"vendor/myIO/inst/htmlwidgets/myIO/style.css" = "pymyio/static/style.css"
|
|
81
|
+
"vendor/myIO/inst/htmlwidgets/lib/d3.min.js" = "pymyio/static/lib/d3.min.js"
|
|
82
|
+
"vendor/myIO/inst/htmlwidgets/lib/d3-hexbin.js" = "pymyio/static/lib/d3-hexbin.js"
|
|
83
|
+
"vendor/myIO/inst/htmlwidgets/lib/d3-sankey.min.js" = "pymyio/static/lib/d3-sankey.min.js"
|
|
84
|
+
|
|
85
|
+
# Sdist must include the submodule contents so wheels can be built from the
|
|
86
|
+
# tarball alone (PyPI doesn't fetch git submodules).
|
|
87
|
+
[tool.hatch.build.targets.sdist]
|
|
88
|
+
include = [
|
|
89
|
+
"src/pymyio",
|
|
90
|
+
"vendor/myIO/inst/htmlwidgets",
|
|
91
|
+
"vendor/myIO/LICENSE",
|
|
92
|
+
"tests",
|
|
93
|
+
"examples",
|
|
94
|
+
"README.md",
|
|
95
|
+
"LICENSE",
|
|
96
|
+
"pyproject.toml",
|
|
97
|
+
]
|
|
98
|
+
|
|
99
|
+
[tool.ruff]
|
|
100
|
+
line-length = 100
|
|
101
|
+
target-version = "py39"
|