Repository navigation
Add a PowerShell DataFrame and Vega-Lite sample - #95
Conversation
Signed-off-by: Andrey Vernigora <[email protected]>
be2d5bb to
e5bb2b8
Compare
Store the executed tables and Vega-Lite widgets in the notebook so the read-only viewer can render the sample without running its cells. Signed-off-by: Andrey Vernigora <[email protected]>
|
Hello @TorreyBetts I’m moving this PR back to draft while we clarify whether the observed behavior is part of the intended Verso Viewer contract. The primary issue can be reproduced using the notebook at commit
Each saved widget is a self-contained HTML document. Its From what I can observe, the Viewer does not preserve the widget’s Commit
With that workaround, all three charts render correctly in Chromium. In Safari, however, the first two charts are still blank. Those specifications use Vega-Lite’s Commit These changes make the sample work with the current Viewer, but the additional widget-specific loading logic and fixed chart widths feel more like compatibility workarounds than a good final solution. Are the following Viewer behaviors expected?
If these are Viewer limitations rather than intentional behavior, would it be possible to address them in the Viewer? I would prefer not to build these workarounds into the sample if the underlying behavior can be fixed. |
|
Hi @eosfor, No, none of that behavior was expected. I fixed the viewer and updated the site so you don't need to build workarounds into the sample. Could you confirm on your side that everything looks right? Assuming it does, then you could drop the two workaround commits. |
2024148 to
44f3dbe
Compare
|
Hi @TorreyBetts , Thank you for fixing this! I confirmed the original notebook output at The text and tables render correctly, and all three Vega-Lite charts now render as expected, including the two charts that use I dropped the two workaround commits and force-pushed the cleaned-up branch. The PR now contains only the sample commit and the commit that persists the notebook outputs. |
|
Thanks for another nice contribution. Also, thanks for the Verso mention in your article on powershell.org. |
|
No problem at all, and thanks for merging! If you’re happy with that, I’d love to write a couple more posts with examples using Verso — I have a few ideas in mind. |
Summary
Microsoft.Data.Analysis.DataFrameNAvalues, apply explicit column types, and render DataFrame previews, schema information, descriptive statistics, and grouped aggregatesWhy
#94 adds rich DataFrame rendering but intentionally contains no end-user walkthrough. This notebook provides a compact, recognizable dataset and demonstrates how the formatter fits into a complete PowerShell notebook workflow, including interactive browser-native visualization.
The sample keeps its Vega-Lite helper local to the notebook. That makes the workflow usable today without coupling the DataFrame formatter package to a charting library, while leaving room for a dedicated visualization extension later.
User impact
Users can run the notebook from top to bottom to see:
The
DataFramePowerShell module must be installed before starting Verso. The first run requires internet access for the public dataset and pinned Vega browser libraries. No CSV is written to disk, and the committed notebook contains no saved outputs or embedded dataset copy.Validation
dotnet run --project src/Verso.Cli/Verso.Cli.csproj --no-build -- run samples/notebooks/powershell/palmerpenguins/penguins.verso --output none --fail-fast.versodocument as JSON