There are a number of assumptions in your question which need to be addressed before you get to the implementation question. The example you provide is a biodiversity analysis that is based on a sample of varieties of a given plant species. I looked at the manual for the software that was used to generate this raster, and there is no indication that this is appropriate for or has been applied to human populations. The centroid of a human cultural area (which you propose to use for your analysis) is not in any way analogous to a sample (i.e., actual observation) of a plant collection.
Proximity of human subgroups (divided along any dimension, here the dimension is ethnicity) may be expressed as a diversity measure or a segregation measure. One widely used diversity measure is the Herfindahl index, which varies from 0 to 1 and is small when an area has many small groups and large when an area has many large groups. It is calculated within a population or area without reference to anything outside that population or area. This is problematic since you are interested in spatial interaction across administrative boundaries.
One widely used measure of segregation is the index of dissimilarity, which varies from 0 to 1 and is small when subareas have the same population distribution as the greater region, and large when subareas are exclusively one group or another. It is usually calculated within a region for which demographic information is available for many subareas (e.g., you can calculate the Black-White index of dissimilarity for metropolitan area based on demographic data for all Census tracts within the metropolitan area). Wong (2002) has modeled local segregation by calculating the index of dissimilarity for each subarea based on the population of neighboring (i.e., contiguous) subareas rather than the region as a whole. A limitation of this measure is that it can only work for two groups at a time. However, I have used it in my own research by using the two most populous groups within each zone of neighbors.
You have indicated that you want to calculate diversity for each administrative unit (AU). But you also say that you need to create a continuous raster of diversity. It's not clear to me if you actually want a continuous raster of diversity or if you think you need that in order to calculate AU diversity. If you do in fact want continuous diversity, I would recommend taking a look at O'Sullivan & Wong (2007), which visualizes continuous diversity using a kernel density estimator. This has the effect of accounting for population interaction across administrative boundaries, which you indicate that you want.
OTOH, if you really want diversity by administrative unit, you could do that using either the Herfindahl index or the local index of dissimilarity. But that requires information about demographic characteristics within each AU. I assume that the reason you are using the ethnic areas map is because you don't have ethnic population data for the AUs. But if you know the population of each AU, and you intersect it with the ethnic areas grid, you can allocate the population of AUs to ethnic areas. The important assumption with this and the other answers proposed so far is that they assume that population density is constant throughout either the AU or the ethnic area. This assumption seems prima facie implausible, but you know the data better than me, and may be comfortable with this assumption.
Based on my understanding of your goals, I think my approach would be as follows:
- Model population within subunits where subunits may be the intersection of AUs and ethnic areas, or a vector or raster grid. Given enough time, I would want to try it both ways.
- Calculate the Herfindahl index for each AU, but, following Wong (2002), I would calculate the Herfindahl index based on the neighborhood of each AU rather than just the population within the AU. Given enough time I would experiment with both contiguity-based and distance-based neighborhoods.
Of course, none of this gets to technical implementation, but if you give me some feedback on this, we can move on from there.
PS: The academic papers I linked to are gated. If OP does not have access to an academic library, feel free to contact me via email and I will provide them for you.