The wikipedia pages on Auguste Bravais,Karl Pearson, the Pearson correlation coefficient,and Francis Galton all cite the following book:
Piovani 2007 cites Pearson 1896 and Yule 1909 as claiming that Bravais 1846 was the first discussion of correlation:
"Pearson (1896: 261) offers one of the earliest reconstructions of the origins of cor- relation, singling out the essay, Analyse Mathématique sur les Probabilités des Erreurs de Situation d’un Point by Bravais (1846) as the place where the notion was first discussed."
"The fundamental theorems of correlation were for the first time and almost exhaustively discussed by Bravais [...] He deals completely with the correlation of two and three variables [...] The ‘Galton’s function’ or coefficient of correla- tion [...] indeed appears in Bravais’ work, but a single symbol is not used for it (Pearson 1896: 261)."
Of the numerous memoirs on the theory of error the most important in [...] connection [to correlation] is that of A. Bravais, who as long ago as 1846 discussed the theory of error for points in space, regarding the errors as either independent or correlated, from the standpoint of the normal law of errors. He did not, however, use a single symbol for a correlation coefficient, although the product-sum formula may be regarded as due to him (Yule 1909: 722).
In Sewall Wright's "Correlation and Causation" (1921), where he introduces his method of path coefficients, he claims that Bravais developed the equation first.
The formula for what Galton later called the coefficient of correlation was, in fact, first presented in this connection by Bravais (I) in 1846.
Purportedly it was in this book that Bravais derived the correlation coefficient, but going through the pages of the book I did not see the equation in its modern form. That could be due to limitations of the translation tool combined with not being able to read French, but I would like to confirm from the original document where he worked out the equation.