Rank / Computation Layer

Calculate rankings for values in a column with sophisticated tie-handling methods. Similar to pandas.rank(), R's rank(), or SQL's RANK functions. Converts values to their relative positions with multiple options for handling ties.

Common applications:

  • Sports and competition rankings
  • Academic grading and class ranking
  • Statistical analysis (rank correlation)
  • Financial analysis (performance ranking)
  • Market position analysis
  • Employee performance evaluation
  • Customer segmentation
  • Feature importance ranking

Note: Null values are assigned null ranks. Rankings start from 1 (not 0-based).

Table
0
0
Table

Select

column

The column to compute rankings for. Common input types:

  • Numeric scores (test scores, ratings)
  • Performance metrics (sales figures, KPIs)
  • Temporal data (timestamps, durations)
  • Measurement data (scientific readings) Any sortable data type is supported.

Method

enum
Average

Methods for handling tied values in ranking calculations. Different methods are suitable for different analytical needs and tie-breaking requirements.

Average ~

Assign the mean rank to tied values. Example:

  • Data: [10, 20, 20, 30]
  • Ranks: [1, 2.5, 2.5, 4]

Best for statistical analysis and fair ranking systems.

Min ~

Assign the lowest possible rank to tied values (competition ranking). Example:

  • Data: [10, 20, 20, 30]
  • Ranks: [1, 2, 2, 4]

Ideal for competition scenarios where ties share the higher position.

Max ~

Assign the highest possible rank to tied values. Example:

  • Data: [10, 20, 20, 30]
  • Ranks: [1, 3, 3, 4]

Useful for conservative ranking where ties share the lower position.

Dense ~

Like 'Min' but with no rank gaps after ties. Example:

  • Data: [10, 20, 20, 30]
  • Ranks: [1, 2, 2, 3]

Suitable for compact ranking systems where rank gaps are undesirable.

Ordinal ~

Assign unique ranks based on occurrence order. Example:

  • Data: [10, 20, 20, 30]
  • Ranks: [1, 2, 3, 4]

Best when unique ranks are required and order matters.

Random ~

Randomly assign ranks to tied values. Example:

  • Data: [10, 20, 20, 30]
  • Possible Ranks: [1, 2, 3, 4] or [1, 3, 2, 4]

Useful for tie-breaking in simulations or when unbiased random ordering is needed.

false

When true, assigns rank 1 to the highest value (like competition rankings). When false, assigns rank 1 to the lowest value (like percentile rankings). Common uses:

  • True for 'best is highest' scenarios (sports rankings)
  • False for 'best is lowest' scenarios (golf scores, time trials)

Seed

u64
0

Random seed for the Random ranking method. Ensures reproducible results when using random tie-breaking. Ignored for other ranking methods. Same seed produces identical random rankings across runs.

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.