Correction to: Nature https://doi.org/10.1038/s41586-019-1441-7Published online 07 August 2019

In this Letter, affiliation 12, for Jean-Michel Vouillamoz, should begin “Université Grenoble Alpes, Institut de Recherche pour le Développement”, rather than “Institut de Recherche pour le Développement, Université Grenoble Alpes”. The primary affiliation , for Guillaume Favreau should be affiliation 5, “Université Grenoble Alpes, IRD, CNRS, Grenoble INP, IGE, Grenoble, France” and his secondary affiliation should be affiliation 30, "Institut de Recherche pour le Développement, Niamey, Niger". These errors have been corrected online.