Mathematical Principles of Topological and Geometric Data Analysis