Skip to content

Commit

Permalink
Pull request for v2.1.0 release
Browse files Browse the repository at this point in the history
v2.1.0 release
  • Loading branch information
stephenholleran authored Jun 1, 2023
2 parents b21ed94 + 391a18a commit 5f20fd2
Show file tree
Hide file tree
Showing 30 changed files with 7,726 additions and 1,534 deletions.
39 changes: 37 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,43 @@ Given a version number MAJOR.MINOR.PATCH, increment the:

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

## [Unreleased]
-
## [2.1.0]
1. Update behaviour of `time_continuity_gaps` to find any gap that
is not equal to the derived temporal resolution.
2. Added `data_resolution` argument to `average_data_by_period`, `monthly_means`, `coverage` and
`merge_datasets_by_period` functions (Issue [#297](https://github.com/brightwind-dev/brightwind/issues/297))
3. Update to work with Pandas 1.3.2. This mostly includes depreciating pd.Timedelta and using pd.DateOffset instead. (Pull request [#312](https://github.com/brightwind-dev/brightwind/pull/312)).
4. Update to work with Pandas 2.0.1, due to `date_format` input update for `pandas.to_datetime`. (Pull request [#387](https://github.com/brightwind-dev/brightwind/issues/387)).
5. Update to work with matplotlib 3.5.2 and bug fix for plot_freq_distribution and dist functions (Issue [#315](https://github.com/brightwind-dev/brightwind/issues/315)).
6. Update to work with numpy>=1.20.0 when pandas=0.25.3. (Issue [#344](https://github.com/brightwind-dev/brightwind/issues/344)).
7. Addressed all Future and Deprecation warnings for matplotlib<=3.6.3, numpy<=1.24.1, pandas<=1.5.3. (Issue [#356](https://github.com/brightwind-dev/brightwind/issues/356)).
8. In`Correl` fix issue when duplicate column names are sent to `SpeedSort` (Issue [#304](https://github.com/brightwind-dev/brightwind/issues/304))
9. Added subplotting functionality to `sector_ratio` and improved user control of plotting (Issue [#309](https://github.com/brightwind-dev/brightwind/issues/309))
10. Allow `dist()` function to take a pd.DataFrame so user can plot multiple distributions on the same plot. (Issue [#264](https://github.com/brightwind-dev/brightwind/issues/264))
1. As part of this added subplotting functionality for bar plots
11. Allow `freq_table()` function to derive a seasonal adjusted frequency distribution if user sets 'seasonal_adjustment'
to true. (Issue [#334](https://github.com/brightwind-dev/brightwind/issues/334))
1. As part of this, added 'monthly_coverage_threshold' option for the user to ensure good coverage months.
12. In `freq_table` added option to give as input target wind speed we want the mean frequency distribution to have
(Issue [#269](https://github.com/brightwind-dev/brightwind/issues/269)).
13. Allow `freq_table` function to apply a `coverage_threshold` for both seasonal adjusted and base methods. (Issue [#386](https://github.com/brightwind-dev/brightwind/issues/386))
14. Updated `plot_timeseries` to use a subplot function (`_timeseries_subplot`) and added arguments _x_label_, _y_label_, _x_tick_label_angle_,
_line_colors_, _legend_ and _figure_size_. (Issue [#349](https://github.com/brightwind-dev/brightwind/issues/349)).
15. In `average_data_by_period()` fixed issue when wind direction average is derived for a period equal to the data resolution period
(Issue [#319](https://github.com/brightwind-dev/brightwind/issues/319)).
16. In `average_data_by_period()` fixed issue when wind direction average is derived for a period equal to the data resolution period (Issue [#319](https://github.com/brightwind-dev/brightwind/issues/319)).
17. Fixed bugs for `TI.by_speed` and `TI.by_sector` and added tests. Solved versions issue that were raised from Pandas 1.3.3. (Issue [#317](https://github.com/brightwind-dev/brightwind/issues/317)).
18. Address errors and warnings generated for `Shear.TimeOfDay` and `Shear` when pandas >=1.0.0 (Issue [#347](https://github.com/brightwind-dev/brightwind/issues/347)).
19. In `_calc_mean_speed_of_freq_tab` for `export_tab_file` fix issue around using wind speed bins less than 1 m/s (Issue [#359](https://github.com/brightwind-dev/brightwind/issues/359)).
20. Update to work with versions 1.0 to 1.2 of IEA WIND Task 43 WRA Data Model (Issue [#306](https://github.com/brightwind-dev/brightwind/issues/306)).
21. Updated `LoadBrightHub` URL and generalised functions used for connecting to BrightHub platform without using `boto3` (Issue [#355](https://github.com/brightwind-dev/brightwind/issues/355)).
22. Removed hardcoded colours for `Shear.TimeOfDay` plots when `plot_type` is 'step' or 'line' and added a colour map. (Issue [#376](https://github.com/brightwind-dev/brightwind/issues/376)).
23. Fixed bug for `SpeedSort` where the `sector_predict` function was not interpolating data using two fit lines. (Issue [#377](https://github.com/brightwind-dev/brightwind/issues/377)).
24. Updated `_ColorPalette` to automatically update color_list, color_map, color_map_cyclical and adjusted lightness color variables when main colors (primary, secondary etc.) are changed. (Issue [#381](https://github.com/brightwind-dev/brightwind/issues/381)).
25. Allow `momm` function to derive a seasonal adjusted mean of monthly mean, if user sets `seasonal_adjustment` to true, and allow to apply a `coverage_threshold` (Issue [#298](https://github.com/brightwind-dev/brightwind/issues/298))
26. Updated `slice_data`, `offset_timestamps`, `_LoadBWPlatform.get_data` functions to use 'less than' data_to if provided as input. (Issue [#385](https://github.com/brightwind-dev/brightwind/issues/385))



## [2.0.0]
- Major changes, notably
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Stephen Holleran
Copyright (c) 2023 Stephen Holleran

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
71 changes: 44 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,52 @@
/_.___/_/ /_/\__, /_/ /_/\__/ |__/|__/_/_/ /_/\__,_/
/____/
```
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**A Python library primarily for wind resource assessments.**

--------------

<br>

The brightwind python library aims to **empower wind resource analysts** and establish a common **industry standard toolset**.
Brightwind is a Python library specifically built for wind analysis. It can load in wind speed, wind direction and
other metrological timeseries data. There are various plots you can use to understand this data and to find any
potential issues. You can perform many common functions to the data such as shear and long-term adjustments. The
resulting adjusted data is then outputted as a frequency distribution tab file which can be used in wind analysis
software such as WAsP.

This library can also be used for solar resource analysis.

<br>

---
### Installation

You can use pip from the command line to install the library.

```
C:\Users\Stephen> pip install brightwind
```
It is advisable to use a separate environment to avoid any dependency clashes with other libraries such as Pandas, Numpy
or Matplotlib you may already have installed.

<br>

For those that do not have Python installed and are just getting started, we recommend installing Anaconda. Anaconda is
a Python distribution for scientific computing and so provides everything you need, Python, pip and Jupyter Notebook
along with libraries such as Pandas, Numpy and Matplotlib. Datacamp provide a good tutorial for [installing
Anaconda on Windows](https://www.datacamp.com/tutorial/installing-anaconda-windows) to get started.

Once Anaconda is installed, you can use the **Anaconda Prompt** to run the above command line `pip install brightwind`.
Or first use **Anaconda Navigator** to create an environment.

---
### Documentation

Documentation on how to get setup and use the library can be found at https://brightwind-dev.github.io/brightwind-docs/

<br>

Example usage is shown below via a Jupyter Notebook.
Example usage of the brightwind library is shown below using Jupyter Notebook. Jupyter Notebook is a powerful way to
immediately see the results of code you have written.
<br>

<p>
Expand All @@ -39,8 +70,8 @@ Example usage is shown below via a Jupyter Notebook.
The library provides wind analysts with easy to use tools for working with
meteorological data. It supports loading of meteorological data, averaging,
filtering, plotting, correlations, shear analysis, long term adjustments, etc.
The library can export a resulting long term adjusted tab file to be used in
other software.
The library can then export a resulting long term adjusted tab file to be used in
other wind analysis software.

<br>

Expand All @@ -61,34 +92,20 @@ The library is licensed under the MIT license.

<br>

---
### Installation

The library can be installed by using pip install from the command line (for those that have pip installed).

<br>

```
C:\Users\Stephen> pip install brightwind
```

<br>

For those that do not already have Python or pip, please follow this tutorial,
[getting started on Windows](https://brightwind-dev.github.io/brightwind-docs/tutorials/getting_started_on_windows.html),
to get set up.

<br>

---
### Test datasets
A test dataset is included in this repository and is used to test functions in the code. The source of the dataset is:
A test dataset is included in this repository and is used to demonstrate function and test functions in the code.
Other files and datasets are also included to complement this demo dataset. These are outlined below:

<br>

| Dataset | Source | Notes |
|:------------------ |:-------------|:-----|
| Demo data | Anonymous | A modified 2 year met mast dataset in various logger formats along with associated 18-yr MERRA-2 data. |
| Dataset | Source | Notes |
|:--------------------- |:-------------|:-----|
| demo_data.csv | BrightWind | A modified 2 year met mast dataset in csv and Campbell Scientific format. |
| MERRA-2_XX_2000-01-01_2017-06-30.csv | NASA [GES DISC](https://disc.gsfc.nasa.gov/) | 4 x MERRA-2 18-yr datasets to complement the demo data for long term analyses. |
| demo_cleaning_file.csv | BrightWind | A file containing information on what periods to clean out from the demo data. |
| windographer_flagging_log.txt | BrightWind | The same cleaning info as found in 'demo_cleaning_file.csv' formatted as a Windographer flagging file. |
| demo_data_iea43_wra_data_model.json | BrightWind | A JSON file formatted according to the IEA Wind Task 43 [WRA Data Model](https://github.com/IEA-Task-43/digital_wra_data_standard) standard which describes the mast configuration for the demo data. |

<br>

Expand Down
2 changes: 1 addition & 1 deletion brightwind/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

__all__ = ['analyse', 'transform', 'export', 'load', 'demo_datasets']

__version__ = '2.0.0'
__version__ = '2.1.0'
Loading

0 comments on commit 5f20fd2

Please sign in to comment.