Select to view content in your preferred language

Raster attribute table to frequency table

1258
3
Jump to solution
06-30-2021 10:18 AM
ChrisM
by
Emerging Contributor

Is there a way to easy convert the attribute tables associated with a raster to a frequency table? I imagine that for most raster datasets such a table would be unwieldy

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

@DavidPike is correct.  A frequency table would have Value, Count as the fields... 2, 60

If the Value field were order and had values measured on an interval or ratio scale, the frequency table could be converted to an ogive (aka, cumulative frequency distribution) on of the fundamentals of statistics.

What you describe in an unravelled meshgrid.


... sort of retired...

View solution in original post

3 Replies
DavidPike
MVP Frequent Contributor

Isn't the raster attribute table a frequency table?  I may be misunderstanding what a frequency table is, could you elaborate please.

ChrisM
by
Emerging Contributor

Maybe I am misunderstanding. The attribute table groups cells with the same value. So, and you already know this, row one might have a value of 2 (whatever that is) with a cell count of, say, 60, meaning that 60 cells in the raster have a value of 2. Would not a frequency table have instead each cell listed as an individual in the table with a value of 2? This is not a huge issue since you ostensibly would not what the total number of cells are in the raster. But if you export the attribute table and treat it like a frequency table in some stats packages, it might assume the sample size is the number of rows, not the number of pixels.

0 Kudos
DanPatterson
MVP Esteemed Contributor

@DavidPike is correct.  A frequency table would have Value, Count as the fields... 2, 60

If the Value field were order and had values measured on an interval or ratio scale, the frequency table could be converted to an ogive (aka, cumulative frequency distribution) on of the fundamentals of statistics.

What you describe in an unravelled meshgrid.


... sort of retired...