stilt.Footprint.aggregate#

Footprint.aggregate(target, time_bins)[source]#

Sum the footprint onto the cells of another grid or set of polygons, per time bin.

A footprint value belongs to its whole cell, so it is summed when cells are combined. Each footprint cell is split among the target cells it overlaps, in proportion to the overlapping area. For a target whose cells are whole blocks of footprint cells, this is a plain block sum. Footprint values outside the target are dropped. Time steps are summed within each of time_bins.

Parameters:
  • target (Grid | Mesh | Zones) –

    Cells to sum onto:

    • Grid, every cell of a regular grid, in Grid.index order.

    • Mesh, any polygons (a shapefile, H3 hexagons, nested grids). Rows are indexed by cell id.

    • Zones, groups of the cells of a grid or mesh. Use it to keep only some cells of a grid.

    A target in another coordinate system is projected onto the footprint grid.

  • time_bins (IntervalIndex) – Time intervals to sum over, such as the time steps of a flux inventory. Each includes its left edge and excludes its right.

Returns:

One row per target cell and one column per time bin, labelled by the bin’s left edge. Rows are indexed by (x, y) for grid targets and by cell id for meshes and zones. Cells and bins the footprint does not reach are 0.

Return type:

DataFrame