Pandemics through the lens of occupations