Given a vector in the standard cartesian basis \begin{equation} v = \left( \begin{aligned} x\\ y \end{aligned}\right) \end{equation}
We may write its components in terms of the polar coordinates as follows: $$ v=\left( \begin{aligned} r \cos\theta\\ r \sin\theta \end{aligned}\right) $$
To put this in terms of the spherical basis, we can apply the jacobian transform: $$ \frac{\partial (x,y)}{\partial (r,\theta)} = \left(\begin{array}[cc] \cos\cos\theta & \sin\theta \\ -r \sin\theta & r \cos\theta \end{array}\right) $$
Which when applied to the vector $v$ gives
$$ \left( \begin{aligned} r \\ 0 \end{aligned}\right) $$
Clearly $\theta$ is not always $0$, what on earth am I doing wrong?
We have $v = (r\cos \theta, r\sin \theta) = f(r,\theta)$. To recover $(r,\theta)$, we simply apply the inverse map $f^{-1}(f(r,\theta))=(r,\theta)$. The inverse map is given by $f^{-1}(x,y) = (\sqrt{x^2+y^2},\tan^{-1}(y/x))$.