The species diversity can be measured by first taking the weighted mean of species proportional plenty in the dataset, and then taking the opposite of this. The equation is\\[D = 1 - \\frac{\\sum n (n-1)}{N (N-1)}\\]Where : n = number of individuals of each species N = total number of individuals of all species