COUNT ROWS PER BIN FOR COLUMNS (BAR-CHART READY)¶
For each specified numeric column, bins the values into nicely-rounded bins and reports how many rows fall in each bin. Returns a tidy table of column, bin, count and percent that can be charted directly as a bar chart for every column.
When to use¶
Classification: process.
Tagged: bin, binning, count, histogram, distribution, bar_chart, dataset, transform.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Dataset | dataset | dataset | — | Input dataset whose columns will be binned and counted. | |
| Columns | columns | scalar | — | ✓ | Comma-separated numeric columns to count bin membership for. |
| Number of bins | num_bins | scalar | 5 | Number of equal-width bins (edges are nicely rounded). | |
| Round minimum | round_min | select | no | When Yes, the lowest bin starts at a nicely-rounded value near the data minimum instead of a step multiple such as zero. | |
| Label format | label_format | select | range | How each bin is labelled in the report. | |
| Rating direction | rating_direction | select | none | Add a rating column to the count report, from best to worst. Choose which end of the value range is best. | |
| Rating columns | rating_columns | scalar | — | Comma-separated subset of the columns above to rate. Leave blank to rate all columns. | |
| Rating style | rating_style | select | words | How each bin rating is displayed: words, letter grade, or stars. |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| dataset_bin_counts_output_1 | dataset_bin_counts_output_1 | dataset | Long/tidy count report: one row per (column, bin) with column, bin, count and percent. Ready for bar charts (x = bin, y = count, series = column). |
Disciplines¶
- data.dataset.transform
Runnable example¶
A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=dataset_bin_counts
Auto-generated from transformation schema. Worker id: dataset_bin_counts. Schema hash: 4711f436fb70. Hand-curated docs in workerexamples/ override this page when present.