Inverse distance weighting for panel data set

See the FAQ: How to do a minimal reproducible example reprex for beginners for framing questions to attract more specific answers.

Given a data frame with the variables

station,county,long,lat,t1,t2,...t120 #t1 = 2007-01-01, etc.

the location variables can be converted to a simple feature point object, using the {sf} package. If counties are in the US, the {tidycensus} package will fetch counties as simple feature polygon objects. sf can derive the centroid of each county. Depending on preferences, you can then calculate either simple euclidian distances or geodetic distances.