I'm new to GIS and R-- hope this question makes sense.
I have a dataframe(geo07) containing two variables that record the long/lat values for about 6000 points (mat_long & mat_lat). These points correspond to all health centers of a certain type in the US. I can plot the points on a US by:
map("worldHires","usa", xlim=c(-125,-60),ylim=c(25,52), col="gray95", fill=TRUE) points(x=geo07$mat_lon,y=geo07$mat_lat,pch=19, col="red", cex=0.5)
But what I really want is to color the entire US map based on distance to the closest health center. Conceptually, I need to break the US into points/small areas and color them based on their distance to the nearest health center. Is this a heatmap? Are their R functions to do this?