Select to view content in your preferred language

Emmanuel Katto Uganda : How do I use the groupby function to group my data effectively?

202
1
3 weeks ago
emmanuelkatto23
New Contributor II

Hello everyone,

I am Emmanuel Katto from Uganda, looking for guidance on using the groupby function to group each type of hazard in my dataset. Can someone explain how to apply the groupby function effectively with data expressions? Your help would be greatly appreciated. Thank you!

Regards

Emmanuel Katto Uganda

1 Reply
jcarlson
MVP Esteemed Contributor

Hi, Emmanuel!

The documentation for GroupBy has some good examples, if you've seen that. You used the phrase "data expression", but you've posted in the Pro board. Usually, "data expression" refers to a specific kind of Arcade expression used in Dashboards, but I'm guessing that's not what you meant?

A general expression for grouping by hazard level might look like this:

GroupBy(
  $layer,
  'hazard_level',
  { name: 'count', expression: '1', statistic: 'COUNT' }
)

"Effective" is a moving target, though. If you need something more specific than this, please share more details about your data and what you're attempting to accomplish.

- Josh Carlson
Kendall County GIS
0 Kudos