We present a decomposition of the Koopman operator based on the sparse structure of the underlying dynamical system, allowing one to consider the system as a family of subsystems interconnected by a graph. Using the intrinsic properties of the Koopman operator, we show that eigenfunctions for the subsystems induce eigenfunctions for the whole system. The use of principal eigenfunctions allows to reverse this result. Similarly for the adjoint operator, the Perron-Frobenius operator, invariant measures for the dynamical system induce invariant measures of the subsystems, while constructing invariant measures from invariant measures of the subsystems is less straightforward. We address this question and show that under necessary compatibility assumptions such an invariant measure exists. Based on these results we demonstrate that the a-priori knowledge of a decomposition of a dynamical system allows for a reduction of the computational cost for data driven approaches on the example of the dynamic mode decomposition.