Read the time series data for all quantities at these locations into a DataFrame.
Parameters
Name
Type
Description
Default
column_mode
str(optional)
Specifies the type of column index of returned DataFrame. ‘all’ - column MultiIndex with levels matching TimeSeriesId objects. ‘compact’ - same as ‘all’, but removes levels with default values. ‘timeseries’ - column index of TimeSeriesId objects
None
include_derived
bool
Include derived quantities.
False
Returns
Name
Type
Description
pd.DataFrame
Time series data of every quantity at these locations.
Read the time series data for all quantities at these locations into a DataFrame.
Alias for read() method.
Parameters
Name
Type
Description
Default
column_mode
str(optional)
Specifies the type of column index of returned DataFrame. ‘all’ - column MultiIndex with levels matching TimeSeriesId objects. ‘compact’ - same as ‘all’, but removes levels with default values. ‘timeseries’ - column index of TimeSeriesId objects
None
include_derived
bool
Include derived quantities.
False
Returns
Name
Type
Description
pd.DataFrame
Time series data of every quantity at these locations.
Convert reaches to a geopandas.GeoDataFrame object.
By default, quantities are not included. To include quantities, use the agg and agg_kwargs parameters.
Parameters
Name
Type
Description
Default
agg
str or callable
Defines how to aggregate the quantities in time and space. Accepts any str or callable that is accepted by pandas.DataFrame.agg.
None
Examples
- 'mean' : mean value of all quantities
- 'max' : maximum value of all quantities
- np.max : maximum value of all quantities
agg_kwargs : dict, default None Aggregation function for specific column levels (e.g. {time=‘min’, chainage=‘first’}). segmented : bool, (default=True) True - one LineString per IRes1DReach object. False - one LineString per reach name. include_derived : bool, default False Include derived quantities.
Returns
Name
Type
Description
gdf
geopandas.GeoDataFrame
A GeoDataFrame object with reaches as LineString geometries.
Examples
Convert reaches to a GeoDataFrame (without quantities)
>>> gdf = res1d.reaches.to_geopandas()
Convert reaches to a GeoDataFrame with aggregated quantities