windkit.load_tutorial_data#
- windkit.load_tutorial_data(name, force_download=False)[source]#
Download, extract, and load tutorial data into memory.
Convenience function that downloads the tutorial data, extracts it, and loads all files into memory as windkit-compatible objects.
The local cache is stored in the user data directory under the name “windkit”. On Windows, this is typically located at:
C:\Users\<username>\AppData\Roaming\windkit\tutorial_dataOn Linux, it is typically located at:
/home/<username>/.local/share/windkit/tutorial_data- Parameters:
- Returns:
Object with loaded datasets as attributes. For “serra_santa_luzia”:
bwc- Binned Wind Climate (xarray.Dataset)wtg- Wind Turbine Generator (xarray.Dataset)turbines- Wind Turbines (xarray.Dataset)elev- Elevation Map (geopandas.GeoDataFrame)rgh- Roughness Map (geopandas.GeoDataFrame)
- Return type:
SimpleNamespace
- Raises:
ValueError – If the name is not a valid dataset name.
ConnectionError – If there is no internet connection when trying to download the data.
RuntimeError – If the download fails or the status code is not 200.
Examples
>>> data = load_tutorial_data("serra_santa_luzia") >>> data.bwc <xarray.Dataset> Size: 4kB Dimensions: (point: 1, sector: 12, wsbin: 32) ... >>> data.turbines <xarray.Dataset> Size: 1kB Dimensions: (point: 15) ...
See also
get_tutorial_dataGet the path to tutorial data without loading into memory.