0

I am currently using Arcgis to map UK Election Data. I merged a shapefile and a datatset together and have starting looking at trends. See image below.

enter image description here

Then I looked at the attribute table of the merged item and realised I'd done something very stupid; My dataset had 20,000 observations, whereas my district map of the UK contained just over 400 items, since it's based on local authority level. In looking at the attribute table I realised that 400 records have been merged and the rest of the observations seemingly not there.

Thinking about it now, of course this would happen. I suppose what I wanted instead is a density or average of all the records relating to a particular polygon. For example, every observation contains a 1 - 10 score on a question around how succesfull the government has been. Obviously I don't want tp map just one observation per area, but instead want to aggregate ALL OBSERVATIONS per area.

Therefore my question is how to accomplish this in ArcGis, and how to merge layers without deleting all the 'excess' observations unneeded by the shapefile?

5
  • Try looking into using spatial join tool in arc and using the sum stat option. Also are you just wanting to aggregate one variable for each observation?
    – artwork21
    Aug 11, 2016 at 20:28
  • @artwork21, Yes I suppose that's pretty much what I need, although for some variables it would be creating an average(e.G left-right political placement) whereas for something like gender I suppose it's more about summing each level of the attribute if that makes sense?
    – Henry Dark
    Aug 11, 2016 at 20:36
  • If your data has an Id that links it to the polygon, then you can summarise the data using the summary tool then join the resulting table to the polygon data set.
    – Hornbydd
    Aug 11, 2016 at 20:39
  • Ok, so what I'd been doing when Joining/relating was to to choose the option to join Based on spatial location from another layer. This option doesn't offer a choice of what to base the join on. However, the join from table does; is this what I should be using?
    – Henry Dark
    Aug 11, 2016 at 20:47
  • See my answer. With the spatial join tool, you can specify how the attributes are merged.
    – jbalk
    Aug 23, 2016 at 3:26

2 Answers 2

1

Use the spatial join tool to get the attributes from your polygons into your observations. Then summarize whatever attributes you need an join back to the polygon data.

Alternatively, use the spatial join tool to either SUM, MEAN, COUNT, FIRST, LAST... attributes. You set this by setting the join operation to 'JOIN_ONE_TO_MANY', then in the field mapping section, right click and select the merge rule: numeric field Numeric Field

text field Text Field

This way you can summarize whatever attributes from the observations you need and they will be added to the polygon attributes in the output file of the spatial join.

0
0

As my comment has noted, you may use Spatial Join tool to spatial join the observation layer to the district layer and summarize your variable field by using the stat options within the field mapping merge rule.

Your Answer

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

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