windkit.get_tutorial_data
- windkit.get_tutorial_data(name, force_download=False)[source]
Downloads and extracts tutorial data from Zenodo if not already cached.
The local cache is stored in the user data directory under the name “windkit”. On Windows, this is typically located at:
‘C:Users<username>AppDataRoamingwindkittutorial_data’
On Linux, it is typically located at:
‘/home/<username>/.local/share/windkit/tutorial_data’
You can check the location of the user data directory using the
user_data_dir
function from theplatformdirs
package.- Parameters:
- Returns:
Object with all the contents of a specific tutorial dataset or a specific object if requested
- Return type:
SimpleNamespace
- Raises:
ValueError – If the name is not valid or the dataset is not available.
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 = get_tutorial_data("serra_santa_luzia") >>> data namespace(turbines=<xarray.Dataset> bwc=<xarray.Dataset> elev=<geopandas.geodataframe.GeoDataFrame> rgh=<geopandas.geodataframe.GeoDataFrame> wtg=<xarray.Dataset>) >>> data.bwc <xarray.Dataset> Size: 4kB Dimensions: (point: 1, sector: 12, wsbin: 32) Coordinates: height (point) float64 8B ... crs int8 1B ... wsceil (wsbin) float64 256B ... wsfloor (wsbin) float64 256B ... sector_ceil (sector) float64 96B ... sector_floor (sector) float64 96B ... * wsbin (wsbin) float64 256B 0.5 1.5 2.5 3.5 ... 28.5 29.5 30.5 31.5 * sector (sector) float64 96B 0.0 30.0 60.0 90.0 ... 270.0 300.0 330.0 west_east (point) float64 8B ... south_north (point) float64 8B ... Dimensions without coordinates: point Data variables: wdfreq (sector, point) float64 96B ... wsfreq (wsbin, sector, point) float64 3kB ...