windkit.wind_turbines.create_wind_turbines_from_dataframe

windkit.wind_turbines.create_wind_turbines_from_dataframe(location_df: DataFrame | GeoDataFrame, crs: str | int = None) Dataset[source]

Creates a point dataset with required metadata from a dataframe.

Parameters:
  • location_df (pd.DataFrame | gpd.GeoDataFrame) – Dataframe with columns west_east, south_north, height, and wtg_key. Optional columns turbine_id, group_id can be set to give names to the turbine positions and groups. If not set turbine_id defaults to an integer from 0 to to the number of rows, and group_id defaults to 0.

  • crs (str | int, optional) – Projection of the locations, by default None

Returns:

Windkit point dataset that includes the metadata needed for AEP calculations.

Return type:

xr.Dataset

Raises:

ValueError – ValueError: if input is ill-formed.

Examples

>>> import pandas as pd
>>> import windkit as wk
>>> wts = create_wind_turbines_from_dataframe(pd.DataFrame(dict(west_east=[100., 200], south_north=[50., 150.], height=100., turbine_id=["Turb1", "Turb2"], wtg_key="DTU_10MW")), 32632)