I have GPS coordinates in a CSV file that I predict it using a regression model, just two columns with longitudes and latitudes that represent a race track. Now I want to plot it on Google Maps to see how it looks like.
When I do that, I noticed that the curve is not smooth which make sense since I predicted those value with my regression model and they are not taking directly from a GPS.
I made a search on how to solve this problem and I find out that usually a spline interpolation is used for this, but I have no idea how to use it. All the examples that I found in the internet assume that we have the x which are the data and y which is the function, in my case there is no function, I just give the data to the model and it predict those values that's it. so if I have longitudes and latitudes, is it possible to make some sort of interpolation so that the curve would look smooth if I plot it?
Example:
Let's say these are my data:
latitudes = array([58.846563, 58.846573, 58.846586, 58.846601, 58.846618, 58.846637,
58.846658, 58.846681, 58.846705, 58.846731])
longitudes = array([9.903741, 9.903733, 9.903724, 9.903713, 9.9037 , 9.903686,
9.90367 , 9.903652, 9.903633, 9.903612])
and when I plot this data it give me some sort of a plot where each point is connected to the other point with a straight line but what I want is to smooth it up. Is this possible to do only if I have longitudes and latitudes as variables and nothing more?