Recovery rate by depot, including zero-denominator rows

Why ask this?

Compare the overall recovery rate for each depot. Add the two columns separately within each group, then divide their totals and multiply by 100. A group with a zero denominator has no rate and is left off the chart.

Start with the sample data

Open source.csv. In the first row of source.csv, Depot = East, Recovered = 1, Processed = 0.

What to say

Chart the recovery rate by depot using total recovered divided by total processed. Include rows with zero processed in the totals.

Recorded with the Karen synthetic voice.

Processing time

Recorded audio to chart ready
5.20 s
Transcript to chart ready
0.49 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 4 rows. These records are the inputs to the next step.

  2. Aggregate · Sum Recovered, Sum Processed for each Depot

    If a category appears more than once, its records contribute to one result. The first output row contains Depot = East, sum_Recovered = 3, sum_Processed = 8.

  3. Measure Filter · Keep the requested rows

    The filter uses sum_Processed != 0 in keep mode. 2 rows remain including East.

  4. Math · Calculate Recovery rate

    Apply 100 * [sum_Recovered] / [sum_Processed] to each input row. Set Decimal places to 2 to round the result. The first row yields 37.5.

  5. Charts · Draw the bar chart

    Use Depot for the categories and Recovery rate 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 Recovery rate by depot, including zero-denominator rows

The chart

Workflow result in n0is
DepotRecovery rate
East37.5
West75

For East, skipping zero-denominator rows changes the rate from 37.5% to 25% on this same CSV. Hear the other request and compare the chart.

How to use the result

For Depot East, the sample reports Recovery rate of 37.5.

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