Although I'm not sure that Piketty ever directly discusses the exact definition of $r$, he does make it clear indirectly. On page 52 of the hardcover English-language edition of his book, Piketty declares his "first fundamental law of capitalism":

Piketty obtains the share of income $\alpha$ from capital in national income from the income side of the national accounts, dividing "capital income" by national income. The capital share $\alpha$ is just the inverse of the aggregate labor share of income, on which there is an extensive literature. (Of course, there are several methodological choices that must be made when defining these concepts, and some of Piketty's choices differ from choices elsewhere.)
When finding $\beta$, Piketty appears to take the aggregate value of capital from respective countries' national accounts as well (though alternative sources are needed for older values). There is lots of information on the relevant choices in the technical appendix of Piketty and Zucman (2014), which is the basis of most discussion of $\alpha$ and $\beta$ in the book.
Since Piketty makes clear that $r=\alpha/\beta$, his definition of $r$ for a given year is essentially
$$r=\frac{\alpha}{\beta}=\frac{\text{aggregate capital income taken from national accounts}}{\text{aggregate value of capital taken from national accounts}}$$
Note that this actually does not (directly) involve tax data. Tax data is the basis of much of Piketty's other work, but not this.