  Human mobility, contact patterns, and their interplay are key aspects of our
social behavior that shape the spread of infectious diseases across different
regions. In the light of new evidence and data sets about these two elements,
epidemic models should be refined to incorporate both the heterogeneity of
human contacts and the complexity of mobility patterns. Here, we propose a
theoretical framework that allows accommodating these two aspects in the form
of a set of Markovian equations. We validate these equations with extensive
mechanistic simulations and derive analytically the epidemic threshold. The
expression of this critical value allows us to evaluate its dependence on the
specific demographic distribution, the structure of mobility flows, and the
heterogeneity of contact patterns.
