Script for dissolve/ Roll up data with ArcGIS PRO

549
10
01-31-2021 01:55 AM
Akchademir
New Contributor II

I need to make a scripts tools that will consolidate attributes from many rows into to one across a number of columns. 

And the opposite of dissolve date (like drilling into data attributes) .

I have the  Following data attribute:

 

Akchademir_0-1612086856817.png

Thanks for any helps!

0 Kudos
10 Replies
DanPatterson
MVP Esteemed Contributor

What do you want it to look like?

You obviously don't want a concatenation of the values.

Much of the data in the columns is redundant

Even if you summarize by state by county you can only display 1 variable.

Do you want a 3D table effectively? 

What is your end goal since that will affect the reversal process at a minimum


... sort of retired...
0 Kudos
Akchademir
New Contributor II

Yes, for Example i have united states and sub-states:

Akchademir_0-1612090069237.png

i want to roll up into states like this :

Akchademir_1-1612090135552.png

 

 

0 Kudos
DanPatterson
MVP Esteemed Contributor

That is a dissolve

How Dissolve (Data Management) works—ArcGIS Pro | Documentation

You aggregate space based on an attribute or a combination of attributes.

PS

Code examples are at the bottom of the link.


... sort of retired...
0 Kudos
Akchademir
New Contributor II

Yes thanks i know dissolve tool, and for the attributes table? did the table change?

0 Kudos
DanPatterson
MVP Esteemed Contributor

Open the table.  What parameters did you specify for dealing with the tables during the dissolve?

They are limited.

If you expect to keep the whole row's contents for each polygon that was dissolved, then you will be disappointed, because you would have to "relate" the undissolved table back to the dissolved geometry's table


... sort of retired...
0 Kudos
Akchademir
New Contributor II

Is there no other option ?

0 Kudos
DanPatterson
MVP Esteemed Contributor

You haven't said what you want to keep and what you want to do with it.

Also, sometimes having multiple maps with different expressions of the underlying data is the best option.

There is no "tool does everything"


... sort of retired...
0 Kudos
Akchademir
New Contributor II

For example, the three hierarchy levels are country, state and district. These fields are geographic fields and I am able to plot them on three separate maps.

The requirement is to create a top-down analysis such that when the user clicks on the country, the top-down analysis should take the user to the states and show all the states. Then when the user clicks on a state, the drilldown should bring the user to see the districts and show all the sub-districts.

0 Kudos
JeffK
by MVP Regular Contributor
MVP Regular Contributor

Will they be accessing this layer in arcmap, or through a webmap?  I think you are limited to what Dan described with relating aggregated data back to the counties if it is arcmap.  I don't think there is the top-down functionality (without creating your own application) in arcmap to be country, state, county based on mouse clicks.  However, If it is going to be used in a webmap, then you can use Arcade to perform the aggregation of field values for what the user clicks on.

0 Kudos