1

I have what should be a simple task to perform: join ~47K census blocks from the PL redistricting files with pop and racial data joined to Chicago Public Schools High School boundaries to get an aggregate total of >18 population.

I converted the blocks from polygon to point using centroids to avoid blocks from intersecting two boundary attributes in the target feature and thus being counted twice. However, when I run the spatial join tool with Completely Contains, One_to_One aggregate, I still get an overcount of approximately 10k blocks and 700K people. I know there is a simple problem underlying this, so I'm hoping someone can spot the obvious and help me out here.

I've attached a dropbox link here:Direct Dropbox URL of Files to the two files that need to be joined for further clarification.

All Districts Merge refers to the target for the join, ...Centroids, the blocks to be joined to the Districts.

As an added bonus, if anyone knows of any FOSS redistricting tools--my end goal is to create 12-13 amalgamated districts composed of these boundaries.

Boundaries, with blocks as point feature underlaid--should have applied a transparency effect.

Edit: I'm looking to summarize the pop total. That attribute is joined to the point file. It's a tabulation of pop over 18.

Before spatial join it amounts to approx 2,100,000, which is correct for Chicago city. There should be~47 k blocks too. When joined to the districts file however I get a sum of all districts of 2,800,000 and a join count for all districts of 57k.

This leads me to think that when joining blocks to districts I'm getting a double count of blocks that might slightly overlap two districts.

Even after setting join to completely contains parameters I had the same overcount.

Can you do a join where each feature is counted once and assigned to only one district?

  • The .shx (shape index) file for AllDistrictsMergeNAD83ft.shp seems to be missing from the Dropbox folder. – Simbamangu Nov 8 '13 at 16:39
  • shx should be added Simbangu. If you could take a look I'd greatly appreciate it. Thanks for your time. – Grant Malcolm Nov 9 '13 at 2:40
  • 1
    Could you edit your question to add some more information about the process you're following? Which of the (many!) fields are the ones you want to summarise for each district? What results do you get, and what is expected? Have opened the files and run them through QGIS (simple Spatial Join / sum) but don't know what to compare with. – Simbamangu Nov 9 '13 at 8:20
  • Added the edits. Hope it helps – Grant Malcolm Nov 9 '13 at 22:45
  • PL_Field_4 is the population > 18 field? It adds up to 2,073,865? – Simbamangu Nov 10 '13 at 5:42
1

You have some topological issues with the polygon dataset - seems there are a lot of overlapping areas.

Importing the layer into GRASS (which checks and tries to fix these kinds of errors) gives:

16 areas represent more (overlapping) features, because polygons overlap in input 
layer(s). Such areas are linked to more than 1 row in attribute table. The number of 
features for those areas is stored as category in layer 2

-----------------------------------------------------

75 input polygons

Total area: 5.80666E+08 (64 areas)

Overlapping area: 1.45036E+08 (16 areas)

Area without category: 8.81782E+06 (5 areas)

You'll note that the overlapping area as a percentage of the total area is about the same percentage as the 'extra' population you're finding in your spatial join.

To check that it's an overlap issue, you can do the other side of the spatial join, joining the first-found district to the centroid points and then summarising them by label - the total comes to 2073865 as expected.

If you look at the attribute table, you'll also see that you have some duplicated rows such as "Morgan Park HS" and "Corliss HS". Most likely you can simply delete those duplicates and be OK - however, make sure you check in GRASS again after cleaning.

  • Did a v.clean and that took care of the problem just fine. Thanks so much Simbamangu. – Grant Malcolm Nov 11 '13 at 10:26

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.