I'm trying to take census tract linked data (in the form of a CSV I joined to a census tract level map of Washington State) and create a county-level map with it. My census data also has the county listed as a separate variable for each census tract (so basically what county each census tract belongs to). How can I take these census data and aggregate them to a county level in QGIS? More specifically, I'm trying to aggregate median income and percent of unemployment from the census level to the county level.

I've tried spatially joining the census map with the data to a county level map however the new values in the attribute table do not appear to be correct.

  • try join attributes by location (summary) instead of the simple join attributes by location
    – csk
    Commented Mar 6, 2019 at 19:24

2 Answers 2


Try joining by attribute field instead of by location. Add a new vector join to your county layer:

  • Join layer: census tract data
  • Join field: county field of census tract data
  • Target field: county field of county layer

From there, you should be able to properly aggregate the data.


As an aside, since you want to aggregate numbers that are ratios or otherwise not something that can be directly aggregated, you need to aggregate numerators and denominators independently. Consider two tracts:

A. median income 10 (from 0, 0, 10, 10, 50, 100, 10000) B. median income 100 (from 0, 0, 0, 0, 100, 101, 102, 103, 104)

The overall median is (0, 0, 0, 0, 0, 0, 10, 10, 50, 100, 100, 101, 102, 103, 104, 10000) or interpolated between 10 and 10, or 10.

I'm not sure how you should do it, since you won't have the actual numbers. maybe an "average" median income and unemployment? You might be able to calculate the correct unemployment rate if you have the denominator for employment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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