# Is there any history into the methodology that Balmer used for the spectral line formula?

What I am referring to is the Balmer formula as it appears in Wikipedia. To come up with this series by trial and error along with its constants is asking a little too much but I can't understand how one would go about deriving this formula which involve such exquisite measurements of its constants. Specifically was there some perhaps experimental methodology that makes the formula a little more easy to see how he may have arrived at it? It appears to be an ad hoc truly amazing leap in intuition. Which may be the case. Certainly doesn't hurt to ask.

$\lambda = \frac{m^2h}{m^2-n^2}$ where $n = 2$ and $m = 3, 4, 5, ...$