For binX, the first object channels correspond to the second object channels. In this case, the first object specified that the y channel is a sum aggregate, so it checks the y channel of the second object. That specified the y channel as a function that returns true when the species matches and false otherwise. It isn't directly related to any of the columns from the data. This relies on the fact that JS will coerce boolean values into numbers by making true 1 and false 0