Households

class Households(model, agents, reduncancy)[source]
assign_household_attributes()[source]

Household locations are already sampled from population map in GEBModel.setup_population().

These are loaded in the spinup() method. Here we assign additional attributes (dummy data) to the households that are used in the decision module.

decide_household_strategy()[source]

This function calculates the utility of adapting to flood risk for each household and decides whether to adapt or not.

get_flood_risk_information_damage_scanner()[source]

Initiate flood risk information for each household.

This information is used in the decision module. For now also only dummy data is created.

load_flood_maps()[source]

Load flood maps for different return periods. This might be quite ineffecient for RAM, but faster then loading them each timestep for now.

water_demand()[source]

Calculate the water demand per household in m3 per day.

This function uses a multiplier to calculate the water demand for for each region with respect to the base year.

from_landuse_raster_to_polygon(mask, transform, crs)[source]

Convert raster data into separate GeoDataFrames for specified land use values.

Parameters:
  • mask – A 2D numpy array representing the land use raster, where each unique value corresponds to a different land use type.

  • transform – A rasterio Affine transform object that defines the spatial reference of the raster.

  • crs – The coordinate reference system (CRS) to use for the resulting GeoDataFrame.

Returns:

A GeoDataFrame containing polygons for the specified land use values.

Return type:

GeoDataFrame