Ideally you should stick to one language and do everything - from cleaning data or solving a model numerically to (spatial) data analysis/econometrics - therein in order to reduce frictions and avoid copying around intermediate results. I am going to show you how to do this in R.
Here is a good cross-language introductory programmers guide that is worth having a look at: Ristovska - Coding for Economists.
The number of very good R stuff is growing rapidly. I am pointing to a proven tiny subset (in general a good indicator these days for a tutorial or solution being up to date is when it uses dplyr for general data wrangling and sf for spatial analysis):
R in general
Econometrics in R
More General Resources
Intro to GIS and Spatial Analysis by Mainuel Gimond is a very good, cross-platform treatment that for sure will be of help when it comes to clarifying certain concepts.
Make sure that you have R and RStudio installed (see resources above for guidance).
We will download my SpatialRDD package from GitHub. All the instructions can be found there.