Skip to content

Feature: bundled sample dataset / quickstart for the CLI, mirroring the web's "Try it with a sample dataset" #741

Description

@yakew7

Where: faircode/cli.py, assets/profiler-ui.js (buildSampleCSV, sampleBtn).

Current gap: the web profiler ships a built-in, deliberately-imbalanced synthetic health dataset behind a one-click "Try it with a sample dataset" button (comment: "elderly band and an under-sampled region - so the audit clearly fires") plus a shareable profiler.html?demo URL that auto-runs it. The CLI has no equivalent: grep -n "sample" faircode/cli.py returns zero hits - a new CLI user must supply their own CSV before they can see what a profile looks like at all, unlike a first-time web visitor.

Repro:

$ grep -n "sample" faircode/cli.py
(no output)
$ grep -n "buildSampleCSV\|sample-health-data" assets/profiler-ui.js
... present and wired to a button + ?demo URL param

Suggested approach: add a faircode profile --sample flag (or a small faircode demo subcommand) that runs profile() against the same embedded sample-dataset generator logic already written in JS (reimplemented once in Python, or exported to a small shared fixture both engines read), printing the terminal report immediately - a zero-argument way to see the tool work, useful for README.md quickstart snippets and first-run docs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions