diff --git a/climada/entity/exposures/base.py b/climada/entity/exposures/base.py index 580e649a7..738dec0ff 100644 --- a/climada/entity/exposures/base.py +++ b/climada/entity/exposures/base.py @@ -91,6 +91,10 @@ class Exposures(): metadata - reference year value_unit : str metadata - unit of the exposures values + data : GeoDataFrame + containing at least the columns 'geometry' and 'value' for locations and assets + optionally more, a.o., 'region_id', 'category_id', columns for (hazard specific) assigned + centroids and (hazard specific) impact funcitons. """ _metadata = ['description', 'ref_year', 'value_unit'] """List of attributes, which are by default read, e.g., from hdf5""" @@ -288,20 +292,26 @@ def __init__(self, ---------- data : dict, iterable, DataFrame, ndarray data of the initial DataFrame, see ``pandas.DataFrame()`` - index : Index or array, optional - index of the initial DataFrame, see ``pandas.DataFrame()`` columns : Index or array, optional columns of the initial DataFrame, see ``pandas.DataFrame()`` + to be provided if `data` is an array + index : Index or array, optional + columns of the initial DataFrame, see ``pandas.DataFrame()`` + can optionally be provided if `data` is an array or for defining a specific row index dtype : dtype, optional data type of the initial DataFrame, see ``pandas.DataFrame()`` + can be used to assign specific data types to the columns in `data` copy : bool, optional - Whether to make a copy of the input data, see ``pandas.DataFrame()`` + Whether to make a copy of the input `data`, see ``pandas.DataFrame()`` + default is False, i.e. by default `data` may be altered by the ``Exposures`` object. geometry : array, optional Geometry column, see ``geopandas.GeoDataFrame()`` + must be provided if `lat` and `lon` are None and `data` has no "geometry" column. crs : value, optional Coordinate Reference System, see ``geopandas.GeoDataFrame()`` meta : dict, optional Metadata dictionary. Default: {} (empty dictionary) + may be used to provide any of `description`, `ref_year`, `value_unit` and `crs` description : str, optional Default: None ref_year : int, optional @@ -310,10 +320,13 @@ def __init__(self, Unit of the exposed value. Defaults to the entry of the same name in `meta` or 'USD'. value : array, optional Exposed value column + must be provided if `data` has no "value" column lat : array, optional Latitude column + can be provided together with `lon`, alternative to `geometry` lon : array, optional Longitude column + can be provided together with `lat`, alternative to `geometry` """ geodata = GeoDataFrame(data=data, index=index, columns=columns, dtype=dtype, copy=False)