I have a dataset on some villages like this on a grid:
I want to fill the space of the whole grid so that each grid cell has a value that reflects the pressure from the surrounding villages (i.e., the value would be something like average distance to all villages, weighted by the size of each village).
As a first attempt, I tried to smooth it with:
villageRaster <- focal(villageRaster, w=matrix(1, 9, 9), mean)
to give:
But there are still large white areas with no values.
Can someone suggest a nice way to smooth across the whole space?
I am using R for this preferably.
Best Answer
You could look into this approach as suggested Smoothing raster map using R?:
Here are some ideas.
With base plot you can do
You can also resample your data using disaggregate (x, 5, method='bilinear')
Or indeed smooth it using a focal operation
Or a combination
The question whether doing this is a good idea or not is another matter, that I'll leave to you to decide