# How to redistribute population data using Python in ArcGIS?

I am trying to redistribute population data from census centroids among to housing density. Would you please help me to do that? I do have census area centroids (points) and the boundaries belong to each centroid. Point data has population value. Also I have a raster set housing density. I would like to redistribute population data (points) in their own site-boundaries among housing density. Output data needs to be a raster data 100×100 meter pixels.

I am familiar with FORTRAN and VB but I am not a programmer. I have access to ArcGIS 10.1 however I have never used Python.

• I'm not familiar with the technique but it sounds like you may be wanting to use Dasymetric Mapping – PolyGeo Nov 27 '12 at 15:28
• @Underdark recently posted an article about her user of Dasymetric Mapping, too. – RyanKDalton Nov 27 '12 at 16:22

Let's pin down the workflow conceptually, then determine how to do it. I understand the input data consist of

1. A vector point layer of total population, one point per Census unit;

2. A vector (or raster) polygon layer representing the Census units; and

3. A raster layer of housing density.

The output needs to be a corresponding raster layer of estimated population density. Its defining properties are:

1. The integrated population density within each Census unit equals its population and

2. Within any given Census unit, the ratio of population density to housing density is a constant.

Observe that these descriptions apply on a unit-by-unit basis, so if we can figure out how to solve the problem for a single Census unit (a polygon), we can solve the whole problem by iterating over these (nonoverlapping) polygons. In ESRI software, any procedure that iterates over nonoverlapping (raster) polygons, or "zones," is called a zonal operation. As an example of a zonal operation, by "integrated" density I mean the discrete analog of the Riemann integral: sum all the density values within a zone and multiply the result by the area of a single grid cell. This zonal sum (multiplied by cell area) thereby converts density grids to totals within zones.

These two properties--or "invariants" of the problem--show how to solve it. First, notice from (2) that within each Census unit the ratio of the integrated population density to the integrated housing density must equal the common ratio of the densities throughout the unit. This tells us how to find the ratio: divide the population at any input point by the total housing for the zone in which the point is contained. Now multiply the housing density grid by the ratio grid to get the desired result.

In summary, the work will proceed like this:

• Use a zonal sum to integrate the housing density over the Census units.

• Spatially join the point population data to the Census unit zones.

• Divide the zone population total by the zone housing total, giving one ratio per zone. Convert that to raster format so that every cell within each zone has a constant value equal to the zone's population:housing ratio.

• Multiply the housing density grid by the ratio grid.

This construction clearly guarantees that both invariants are preserved, demonstrating that it is a correct solution.

It seems like this would be somewhat programming dependent. You can learn some Python from ESRI slides that are online by just googling them. Basically I would say add a Python scripting module to a custom toolbox and through that create parameters that you can add in according to what you want to populate. It seems to me that depending on what fields your population data is from you can access that programmatically using an iterative for loop and then create a new field housing density or simply access it programmatically and set the values accordingly.