Median weight by dock
Why ask this?
Compare typical weight by dock when an unusually large observation could move the average. The chart uses the middle observation for an odd-sized group and averages the two middle observations for an even-sized group.
Start with the sample data
Open source.csv. In the first row of source.csv, Dock = East, Weight = 2.
What to say
Show a bar chart of median weight by dock.
Recorded with the Karen synthetic voice.
Processing time
- Recorded audio to chart ready
- 2.21 s
- Transcript to chart ready
- 0.63 ms
One local replay from recorded audio through transcription and native chart data preparation. Includes processing of the clarification and reply. Time waiting for a person to answer is excluded. Recording time and screen painting are excluded.
See the transcript in the composer

What n0is transcribed
Show a bar chart of median weight by dog.
When n0is asks
Which column should group the chart? I heard “dog”.
- Dock
Option one.
How the canvas produces the result
- CSV Input · Read the sample records
source.csv supplies 5 rows. These records are the inputs to the next step.
- Column Filter · Keep matching rows
Choose Weight as the column and set Mode to keep. Enable regular expressions and enter ^\s*[+-]?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[eE][+-]?[0-9]+)?\s*$ as the pattern. Leave case-sensitive matching off. 5 rows continue to the next step.
- Constant · Set Stable order
Use the same value on each row so a stable rank preserves the sorted order.
- Rank · Assign a rank
The ordered rows receive positions starting at 1. Here, East is #1, West is #2, East is #3.
- Rank · Assign a rank
The ordered rows receive positions starting at 1. Here, East is #1, West is #3, East is #5.
- Aggregate · Take the minimum of Source position for each Dock
If a category appears more than once, its records contribute to one result. The first output row contains Dock = East, min_Source position = 1.
- Joiner · Attach the group summary
Match Dock to Dock in the other branch of the canvas. The first matched row contains Dock = East, Weight = 2, Stable order = 1, Source position = 1, Value position = 1, min_Source position = 1.
- Sort · Order the results
Sort by min_Source position (numeric ascending), then Value position (numeric ascending). The first rows in order are East → East → East → West.
- Rank · Assign a rank
The ordered rows receive positions starting at 1. Here, East is #1, East is #2, East is #3.
- Aggregate · Take the minimum of Position, Take the maximum of Position for each Dock
If a category appears more than once, its records contribute to one result. The first output row contains Dock = East, min_Position = 1, max_Position = 3.
- Joiner · Attach the group summary
Match Dock to Dock in the other branch of the canvas. The first matched row contains Dock = East, Weight = 2, Stable order = 1, Source position = 1, Value position = 1, min_Source position = 1, Position = 1, min_Position = 1, max_Position = 3.
- Math · Calculate Center distance squared
Apply (2 * [Position] - [min_Position] - [max_Position]) * (2 * [Position] - [min_Position] - [max_Position]) to each input row. The first row yields 4.
- Measure Filter · Keep the requested rows
The filter uses Center distance squared <= 1 in keep mode. 3 rows remain including East.
- Aggregate · Average Weight for each Dock
If a category appears more than once, its records contribute to one result. The first output row contains Dock = East, avg_Weight = 8.
- Column Renamer · Prepare the output columns
avg_Weight becomes median_Weight. The result exposes Dock, median_Weight.
- Charts · Draw the bar chart
Use Dock for the categories and median_Weight for the plotted values. In Display Options, enable Signed value axis to keep both sides of zero visible.
To reproduce the bar scale, select the chart on the canvas. In its settings, enable Signed value axis. Negative and positive values use opposite sides of zero.

The chart

| Dock | median_Weight |
|---|---|
| East | 8 |
| West | 5 |
How to use the result
For Dock East, the sample reports median_Weight of 8.
Synthetic test audio. Screenshots from the recorded workflow in n0is.