  This lecture note reviews recently proposed sparse-modeling approaches for
efficient ab initio many-body calculations based on the data compression of
Green's functions. The sparse-modeling techniques are based on a compact
orthogonal basis, an intermediate representation (IR) basis, for imaginary-time
and Matsubara Green's functions. A sparse sampling method based on the IR basis
enables solving diagrammatic equations efficiently. We describe the basic
properties of the IR basis, the sparse sampling method and its applications to
ab initio calculations based on the GW approximation and the Migdal-Eliashberg
theory. We also describe a numerical library for the IR basis and the sparse
sampling method, sparse-ir, and provide its sample codes. This lecture note
follows the Japanese review article with major revisions [H. Shinaoka et al.,
Solid State Physics 56(6), 301 (2021)].
