Functions for deriving trending posts