Data preprocessing : Aggregation, feature creation, or else?
You are looking for names to attribute to the two items listed? For (1) I would just call it a transformation as it is a straight mapping with no change in distribution of the feature. When working with data, make sure you make copies of your data transformation and do not alter the original data set.

For (2), since it is a single number per group, where group here is the full data set I would call it an aggregation. Likewise if you did a similar calculation per user. If however, you computed a new value from existing features for each record, this would be feature generation or creation.