Median cycle time by batch

Why ask this?

Compare typical cycle time by batch 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, Batch = A, Cycle time = 4.

What to say

Show a bar chart of median cycle time by batch.

Recorded with the Moira synthetic voice.

Processing time

Recorded audio to chart ready
2.16 s
Transcript to chart ready
0.59 ms

One local replay from recorded audio through transcription and native chart data preparation. Recording time and screen painting are excluded.

See the transcript in the composerRecorded transcript entered in the native composer

How the canvas produces the result

  1. CSV Input · Read the sample records

    source.csv supplies 3 rows. These records are the inputs to the next step.

  2. Column Filter · Keep matching rows

    Choose Cycle time 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. 3 rows continue to the next step.

  3. Constant · Set Stable order

    Use the same value on each row so a stable rank preserves the sorted order.

  4. Rank · Assign a rank

    The ordered rows receive positions starting at 1. Here, A is #1, B is #2, A is #3.

  5. Rank · Assign a rank

    The ordered rows receive positions starting at 1. Here, A is #2, B is #1, A is #3.

  6. Aggregate · Take the minimum of Source position for each Batch

    If a category appears more than once, its records contribute to one result. The first output row contains Batch = A, min_Source position = 1.

  7. Joiner · Attach the group summary

    Match Batch to Batch in the other branch of the canvas. The first matched row contains Batch = A, Cycle time = 4, Stable order = 1, Source position = 1, Value position = 2, min_Source position = 1.

  8. Sort · Order the results

    Sort by min_Source position (numeric ascending), then Value position (numeric ascending). The first rows in order are A → A → B.

  9. Rank · Assign a rank

    The ordered rows receive positions starting at 1. Here, A is #1, A is #2, B is #3.

  10. Aggregate · Take the minimum of Position, Take the maximum of Position for each Batch

    If a category appears more than once, its records contribute to one result. The first output row contains Batch = A, min_Position = 1, max_Position = 2.

  11. Joiner · Attach the group summary

    Match Batch to Batch in the other branch of the canvas. The first matched row contains Batch = A, Cycle time = 4, Stable order = 1, Source position = 1, Value position = 2, min_Source position = 1, Position = 1, min_Position = 1, max_Position = 2.

  12. 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 1.

  13. Measure Filter · Keep the requested rows

    The filter uses Center distance squared <= 1 in keep mode. 3 rows remain including A.

  14. Aggregate · Average Cycle time for each Batch

    If a category appears more than once, its records contribute to one result. The first output row contains Batch = A, avg_Cycle time = 8.

  15. Column Renamer · Prepare the output columns

    avg_Cycle time becomes median_Cycle time. The result exposes Batch, median_Cycle time.

  16. Charts · Draw the bar chart

    Use Batch for the categories and median_Cycle time 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.

Native n0is canvas for Median cycle time by batch

The chart

Workflow result in n0is
Batchmedian_Cycle time
A8
B3

How to use the result

For Batch A, the sample reports median_Cycle time of 8.

Synthetic test audio. Screenshots from the recorded workflow in n0is.