# Generating ordinal data

I would like to generate synthetic data which are ordinal, i.e. ordered, in Python. But how would I do this? What are the differences in generating ordinal data vs categorical data?

I'm reading the paper "Automatic Discovery of the Statistical Types of Variables in a Dataset," by Valera and Ghahramani. In it, they write: "We account for categorical data by sampling a multinomial variable with $R$ categories, where the probability of the categories is sampled from a Dirichlet distribution....To account for ordinal observations, we first sample the first variable in our dataset from a uniform distribution in the interval $(0,R)$, which we randomly divide into $R$ categories that correspond to the ordinal variable in our dataset."

Can someone help me understand the latter part about generating ordinal data? Thank you!

Ordinal data deals with categories, which themselves are ordered by meaning somehow, but we cannot strictly talk about the distance between the categories. In the example below, you can see that the ordinal data runs from awesome to terrible, with 5 categories explaining an entire ordinal range:

Having a look at the paper, it seems the define a uniform distribution $U(a, b)$ (probably continuous), which they then divide into some random categories, let's say 5, to follow the table above. So if we set the bound of the distribution, $a = 0$ and $b = 1$, we might randomly create five categories, such as:

Category :  a      b
----------------------
Awesome  : 0.00 - 0.09
Great    : 0.10 - 0.44
OK       : 0.45 - 0.46