Data and code for "Exploring microbiome functional dynamics through space and time with trait-based theory"