Ecological and evolutionary connections between genetic and species diversity