How are ecologically diverse organisms added to local assemblages to create the community structure we see today? In general, within a given region or community, a given trait (character state) may either evolve in situ or be added through dispersal after having evolved elsewhere. Here, we develop simple metrics to quantify the relative importance of these processes and then apply them to a case study in Middle American treefrogs. We examined two ecologically important characters (larval habitat and body size) among 39 communities, using phylogenetic and ecological information from 278 species both inside and outside the region. For each character, variation among communities reflects complex patterns of evolution and dispersal. Our results support several general hypotheses about community assembly, which may apply to many other systems: (1) elevation can play an important role in creating patterns of community structure within a region, (2) contrary to expectations, species can invade communities in which species with similar ecological traits are already present, (3) dispersal events tend to occur between areas with similar climatic regimes, and (4) the first lineage to invade a region diversifies the most ecologically, whereas later invasions show limited change.