Next: Aggregation
Up: Opus Variables
Previous: Using Interaction Sets in
Index
Using Aggregation and Disaggregation in Expressions
The methods aggregate and disaggregate are used to
aggregate and disaggregate variable values over two or more datasets.
The aggregate method associates
information from one dataset to another along a many-to-one relationship, while
the disaggregate method does the same along a one-to-many relationship. Some
examples are:
- zone.aggregate(gridcell.population)
- zone.aggregate(2.5*gridcell.population)
- zone.aggregate(urbansim.gridcell.population)
- neighborhood.aggregate(gridcell.population,
intermediates=[zone,faz])
- neighborhood.aggregate(gridcell.population,
intermediates=[zone, faz], function=mean)
- zone.aggregate(gridcell.population, function=mean)
- region.aggregate_all(zone.my_variable)
- region.aggregate_all(zone.my_variable, function=mean)
- faz.disaggregate(neighborhood.population)
- gridcell.disaggregate(neighborhood.population,
intermediates=[zone, faz])
The syntax and semantics for these is as follows.
Subsections
Next: Aggregation
Up: Opus Variables
Previous: Using Interaction Sets in
Index
info (at) urbansim.org