Map and Table Calculation

AGGMED( ) or ColumnAggregateMed() function

Returns the median value of an entire column, median values per group, the weighted median value of an entire column, or weighted medians per group.

Syntax

AGGMED(Column)
AGGMED(Column, Group)
AGGMED(Column, , Weight)
AGGMED(Column, Group, Weight)
ColumnAggregateMed(Column)
ColumnAggregateMed(Column, Group)
ColumnAggregateMed(Column, , Weight)
ColumnAggregateMed(Column, Group, Weight)

Input

Column is a column
Domain type: any domain
Group is the 'group by' column
Domain type: any Class, ID, Group or Bool domain
Weight is the weight column
Domain type: any Value domain

Output

AGGMED(Column) or ColumnAggregateMed(Column)

returns:

the median value of a column

Domain: the domain of the input column

 

AGGMED(Column, Group) or ColumnAggregateMed(Column, Group)

returns:

median values per group

Domain: the domain of the input column

 

AGGMED(Column, , Weight) or ColumnAggregateMed(Column, , Weight)

returns:

a weighted median value

Domain: the domain of the input column

 

AGGMED(Column, Group, Weight) or ColumnAggregateMed(Column, Group, Weight)

returns:

weighted median values per group

Domain: the domain of the input column

Notes:

Tip:

When the definition symbol = is used, a dependent output column is created; when the assignment symbol := is used, the dependency link is immediately broken after the output column has been calculated.

Usable in

TabCalc

Examples

TabCalc example:

OutCol1 = AGGMED(Area)

OutCol2 = AGGMED(Area,Landuse)

OutCol3 = AGGMED(Area,,Weights)

OutCol4 = AGGMED(Area,Landuse,Weights)

 

Parcel

Landuse

Area

Weights

OutCol1

OutCol2

OutCol3

OutCol4

00123

Residential

4000

2

7500

5000

12500

4000

00124

Residential

3500

1

7500

5000

12500

4000

00125

Commercial

17500

4

7500

17500

12500

17500

00126

Residential

7500

1

7500

5000

12500

4000

00127

Industrial

20000

?

7500

20000

12500

?

01272

Institutional

12500

2

7500

12500

12500

12500

04625

Residential

5000

1

7500

5000

12500

4000

 

See also: