Skip to content

Commit

Permalink
pydoc Exposures.__init__
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel-schmid committed Sep 16, 2024
1 parent 32b48f0 commit 7e58137
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions climada/entity/exposures/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down Expand Up @@ -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
Expand All @@ -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)

Expand Down

0 comments on commit 7e58137

Please sign in to comment.