Skip to main content
Solved

Replace name of those with less count value with majority group name

  • February 3, 2020
  • 2 replies
  • 16 views

I need to create a workspace that I can use to find groups (brands) that are wrong or do not fit with the majority of what is in my existing shapefile. For example: If 1000 Boston Pizza have group of 'Boston Pizza' and 5 have a group of 'Boston Pizza Restaurant and Bar' - then the logic should replace those 5 with the majority group.

Best answer by andreaatsafe

Hi @plasmajay,

You could try using the StatisticsCalculator and analyze the group attribute and specify an attribute to hold the mode value:

 

Then using the results from the complete port of the StatisticsCalculator, you can use the AttributeManager to set the value for the "group" attribute to be the value of the "mode" attribute.

Hope that helps!

Andrea

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

andreaatsafe
Safer
Forum|alt.badge.img+15
  • Safer
  • Best Answer
  • February 3, 2020

Hi @plasmajay,

You could try using the StatisticsCalculator and analyze the group attribute and specify an attribute to hold the mode value:

 

Then using the results from the complete port of the StatisticsCalculator, you can use the AttributeManager to set the value for the "group" attribute to be the value of the "mode" attribute.

Hope that helps!

Andrea


  • Author
  • February 4, 2020

Hi @plasmajay,

You could try using the StatisticsCalculator and analyze the group attribute and specify an attribute to hold the mode value:

 

Then using the results from the complete port of the StatisticsCalculator, you can use the AttributeManager to set the value for the "group" attribute to be the value of the "mode" attribute.

Hope that helps!

Andrea

Hello @andreaatsafe, thank you for your reply, I will try that and let you know if it works.

Thank you.