Joining points based on attribute (id of respondent)

211
5
09-13-2021 05:50 AM
hwiskey
New Contributor

Hi all! 

I have a scenario where I'd like to display points listed by respondents in a survey in relation to their home. I have a dataset where every respondent is a row and the long and lat for respective point is a column. The respondents listed 1-8 locations. 

I have been able to display the points with 'xy to point', with a separate layer for all locations 1, 2, 3 etc. What I'd like to do now is displaying each point listed by the respondents in relation to their home. I'd also like to be able to highlight all points listed based on each individual respondent and would therefor like to join based on each points corresponding respondent id.

I have gathered that the 'points to line' could accomplish the line between the home address and listed location, but what is the best way to structure the data to join all locations to their respondent? 

Best regards.

 

0 Kudos
5 Replies
DavidPike
MVP Frequent Contributor

I don't know if it's just me, but I find this very hard to read and make sense of.  Some pictures of the data and tables would probably help.

0 Kudos
hwiskey
New Contributor

I'm sorry that it's hard to read, English isn't my native language, I'll try to clarify with some examples.

The picture describes the original data set is structured and how the points for each home address and place has been placed in ArcGIS. I have merged the points into a new feature with all the points, but I haven't been able to group the points based on respondent id. 

What I'd like to do now is connect each respondents home address to the places listed by the specific respondent with a line. Any tips on how to do this? Cheers!

0 Kudos
DavidPike
MVP Frequent Contributor

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/xy-to-line.htm

xy to line would accomplish this.  If you don't want to restructure your data, you could run it multiple times keeping the same startX and startY fields but changing the endX and enY fields for each placename lat long, then merging the multiple outputs at the end. https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/merge.htm

 

0 Kudos
hwiskey
New Contributor

This accomplished the lines, thanks! I ended up cleaning the data for each mentioned location (1, 2 etc) with the same column names ('Place' instead of 'Place 1' etc) and merging them. 

A final question: is there any way to link points with the same respondent ID? For example for popup and selection purposes? Thanks in advance!

0 Kudos
DavidPike
MVP Frequent Contributor

You could Dissolve based on a common attribute to create multipart features.
https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/dissolve.htm

i.e.
dissolve fields - respondent ID

ensure 'create multipart features' box is checked

Run