Persistence homology with applications in analysis and data science