Next: Aggregation
Up: Expressions
Previous: Interaction Sets
Index
Aggregation and Disaggregation
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: Expressions
Previous: Interaction Sets
Index
info (at) urbansim.org