Is there a way to determine if a trade tick is traded on the bid or ask side? (To simulate information offered in a footprint chart)

Thank you in advance for all who would participate in this discussion