Quantile / Aggregation Layer

Calculate quantiles across specified columns, similar to numpy percentile() or pandas quantile(). Quantiles divide sorted data into equal-sized portions, providing insights into data distribution.

Common quantile values:

  • 0.25: First quartile (Q1)
  • 0.50: Median (Q2)
  • 0.75: Third quartile (Q3)
  • 0.10, 0.90: Deciles
  • 0.01, 0.99: Percentiles

Applications:

  • Statistical summaries
  • Box plot generation
  • Income distribution analysis
  • Performance benchmarking
  • Risk assessment (Value at Risk)
  • Quality control limits

Provides a simpler interface for single-column quantile analysis.

Table
0
0
Table

Select

[column, ...]

Numeric columns to analyze. Each selected column must contain numeric data suitable for quantile calculation. Non-numeric columns will result in null values.

Quantiles

[f64, ...]
0.25, 0.5, 0.75

Quantile values to compute (0 to 1). Default quartiles [0.25, 0.50, 0.75]. Examples:

  • [0.5]: Median only
  • [0.1, 0.9]: 10th and 90th percentiles
  • [0.01, 0.25, 0.5, 0.75, 0.99]: Detailed distribution
Linear

Methods for estimating quantile values between discrete data points. Choice affects results when exact quantile falls between observations.

Linear ~

Linear interpolation between points. Most common method, provides smooth transitions. Example: value = v1 + fraction * (v2 - v1)

Lower ~

Use lower value. Conservative estimate, ensures value exists in dataset. Example: floor function

Higher ~

Use higher value. Liberal estimate, ensures value exists in dataset. Example: ceiling function

Nearest ~

Use nearest value. Minimizes interpolation error, maintains existing values. Example: round function

Midpoint ~

Average of lower and higher. Balanced approach between extremes. Example: (lower + higher) / 2