Skip to content

Add a PowerShell DataFrame and Vega-Lite sample - #95

Draft
eosfor wants to merge 5 commits into
DataficationSDK:mainfrom
eosfor:pr/dataframe-vega-lite-sample
Draft

Add a PowerShell DataFrame and Vega-Lite sample#95
eosfor wants to merge 5 commits into
DataficationSDK:mainfrom
eosfor:pr/dataframe-vega-lite-sample

Conversation

@eosfor

@eosfor eosfor commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Important

This PR is stacked on #94, which is itself stacked on #93. Because the branches live in a fork, GitHub cannot use #94's fork branch as the base of an upstream PR. Until the parent PRs are merged, this diff also contains their commits. The sample-specific commit is be2d5bb.

Summary

  • add an English Palmer Penguins notebook demonstrating PowerShell data analysis with Microsoft.Data.Analysis.DataFrame
  • download the public CSV into memory without adding a dataset file to the repository
  • normalize NA values, apply explicit column types, and render DataFrame previews, schema information, descriptive statistics, and grouped aggregates
  • render three interactive Vega-Lite visualizations: a scatter plot, average body mass by species, and faceted body-mass histograms
  • explain prerequisites and each analysis step with Markdown cells

Why

#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:

  1. a typed DataFrame loaded from CSV
  2. null handling and schema inspection
  3. descriptive statistics and grouped aggregation
  4. interactive charts with tooltips and PNG/SVG export actions

The DataFrame PowerShell 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

  • manually ran the complete notebook in the Verso editor
  • dotnet run --project src/Verso.Cli/Verso.Cli.csproj --no-build -- run samples/notebooks/powershell/palmerpenguins/penguins.verso --output none --fail-fast
  • verified all 17 cells execute in a fresh process
  • verified the notebook contains 9 Markdown cells, 8 PowerShell cells, and zero saved outputs
  • validated the .verso document as JSON

eosfor added 5 commits July 31, 2026 21:14
Add a specialized formatter hook to execution contexts, distinguish generic fallback formatters, and centralize formatter resolution for both explicit Display calls and language kernels. Document the extension contract and cover priority, fallback, and failure behavior with tests.

Signed-off-by: eosfor <9363027+eosfor@users.noreply.github.com>
Preserve raw PSObject results until the kernel can offer each runtime value to specialized IDataFormatter extensions. Batch contiguous unhandled objects through the existing PowerShell ETS renderer so native table formatting and mixed-output ordering remain intact.

Signed-off-by: eosfor <9363027+eosfor@users.noreply.github.com>
Signed-off-by: eosfor <9363027+eosfor@users.noreply.github.com>
Signed-off-by: eosfor <9363027+eosfor@users.noreply.github.com>
Signed-off-by: eosfor <9363027+eosfor@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant