I'm fairly new to GIS, but I've got the basics down. I'm utilizing QGIS and Python to calculate election statistics by legislative and congressional districts. I'm trying to aggregate precinct level results up to the district level but have a small problem. In some districts (about 10%) precincts are split unevenly into 2 or more districts.

The good news is that I have census blocks that are intact across the board even among precincts. Is there anyway I can take the population statistics from the block level to disaggregate the precinct election returns down to the census block level in QGIS? If not, are there tools in Python or PostGIS that will help?

  • 1
    "Disaggregating" is properly termed apportioning. I've added that tag which leads to a few other questions on the subject, and searching on apportion will return a few more. gis.stackexchange.com/questions/133832 is a QGIS specific one, but some of the ArcGIS ones have more info. There are a few ways to do it (see gis.stackexchange.com/questions/104219) but by area is the most common and as mentioned it makes the assumption of uniform distribution which may or may not be accurate. – Chris W Apr 2 '15 at 19:12
  • The biggest problem for you is going to be the fact that a precinct may have a total for two district candidates. However only people in that district can vote for those candidates, while the other people in the precinct have a different set of candidates. That means you wouldn't need to apportion those particular results, because 100% of the precinct votes for a district apply to that district, and apportioning will actually cut that number down when it shouldn't. Elections where the district doesn't matter, you're fine. Hope that makes sense, but I can explain further if need be. – Chris W Apr 2 '15 at 19:15

The method I have used to do this makes a bad assumption (that population is evenly distributed across the block). However it is AFAIK the only way to do it.

You can use the percentage of the area of split precincts occurring in different districts to get the estimated population values that you want. The method works like this.

  1. Create a field to represent the original area of the precincts (or use the census blocks). Calculate the area before doing any spatial analysis to get the original area.

  2. Intersect the precincts or blocks by the congressional districts so you have them split into their respective districts.

  3. Create a new area field and calculate the area geometry again.

  4. Create a new field for the percentage of area and calculate that to (the new area over the old area) * 100. This percentage can be multiplied (into a new field) by any of the census values (population for example) to be used as an estimate of the value (population) in that new area (percentage * value).

If necessary to aggregate the multiple values up to the districts (you may want to do this if there are a lot to do), you could do a spatial join and sum up the value(s) of interest by congressional district.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.