Encoding Categorical Data Without Increasing the Dimension I've been exploring methods for encoding categorical data. I was hoping to find a good method that does not increase the dimension of the dataset, similar to the one used on this dataset about drug use: Drug consumption (quantified) Data Set 

Each piece of categorical data in this dataset was converted to some real number, but yet the dimension of the dataset was not increased. Instead of just randomly replacing values with numbers, there appears to be some thought out method behind this. Can anyone shed some light on this matter?
I would strongly advise against doing anything like this: a features which is semantically discrete should be typed as such. There's nothing to be gained about casting categorical values into real numbers:


It obfuscates the meaning to a human analyzer
For categorical variables which are not ordinal (i.e. have no natural order), it introduces a serious bias for learning algorithms (note: most attributes in the dataset mentioned in the question are ordinal).
Real number binary representation can lead to approximations, thus possible errors when used as labels and compared for strict equality (something that a categorical variable should support)
It becomes impossible to fix errors in the data


Any conversion in the data should always rely on reasons which are specific to the problem/method to be used, not on some agnostic technical transformation. There's no universal recipe for encoding features (categorical or other), one has to understand what they represent and how an algorithm could use them in order to determine the best representation.