What is a rank? I've been thinking about unifying some notions related to ranking, order theory, ordinal data, and graded posets. While the notion of a grade in order theory is quite general, in some sense the way we talk about ranks is more general. I would like to bring rank-based statistics and order theory together in my theory development and analysis of data.
I would really like to know if there are others (especially but not exclusively in the literature) that have attempted to define ranks in a way that generalizes or interoperates with concepts in order theory.

There are various definitions of ranks depending on context and the purpose for which they are defined.  However, a common definition relates them directly to order statistics.  Given a set of numbers $x_1,...,x_n$ with corresponding order statistics $x_{(1)} \leqslant \cdots \leqslant x_{(n)}$ the typical way to define the ranks $r_1,...,r_n$ for the variables is to require that they satisfy the defining requirement:
$$x_{(r_i)} = x_i
\quad \quad \quad \quad \quad 
\text{for all } i = 1,...,n.$$
This requirement is sufficient to define the ranks in the case where all the initial values are distinct.  In the case of ties there are various definitions of the ranks that will meet this requirement.
