Skip to main content

A package for collecting and assigning wind turbine metrics

Project description

OpenOA

Binder Badge Gitter Badge Journal of Open Source Software Badge

Documentation Badge Tests Badge Code Coverage Badge

pre-commit Code style: black Imports: isort


This library provides a framework for working with large timeseries data from wind plants, such as SCADA. Its development has been motivated by the WP3 Benchmarking (PRUF) project, which aims to provide a reference implementation for plant-level performance assessment.

Analysis routines are grouped by purpose into methods, and these methods in turn rely on more abstract toolkits. In addition to the provided analysis methods, anyone can write their own, which is intended to provide natural growth of tools within this framework.

The library is written around Pandas Data Frames, utilizing a flexible backend so that data loading, processing, and analysis could be performed using other libraries, such as Dask and Spark, in the future.

If you would like to try out the code before installation or simply explore the possibilities, please see our examples on Binder.

If you use this software in your work, please cite our JOSS article with the following BibTex:

@article{Perr-Sauer2021,
  doi = {10.21105/joss.02171},
  url = {https://doi.org/10.21105/joss.02171},
  year = {2021},
  publisher = {The Open Journal},
  volume = {6},
  number = {58},
  pages = {2171},
  author = {Jordan Perr-Sauer and Mike Optis and Jason M. Fields and Nicola Bodini and Joseph C.Y. Lee and Austin Todd and Eric Simley and Robert Hammond and Caleb Phillips and Monte Lunacek and Travis Kemper and Lindy Williams and Anna Craig and Nathan Agarwal and Shawn Sheng and John Meissner},
  title = {OpenOA: An Open-Source Codebase For Operational Analysis of Wind Farms},
  journal = {Journal of Open Source Software}
}

Requirements

  • Python 3.6+ with pip.

We strongly recommend using the Anaconda Python distribution and creating a new conda environment for OpenOA. You can download Anaconda through their website.

After installing Anaconda, create and activate a new conda environment with the name "openoa-env":

conda create --name openoa-env python=3.8
conda activate openoa-env

Installation

Clone the repository and install the library and its dependencies using pip:

git clone https://github.com/NREL/OpenOA.git
pip install ./OpenOA

You should now be able to import operational_analysis from the Python interpreter:

python
>>> import operational_analysis

Common Installation Issues:

  • In Windows you may get an error regarding geos_c.dll. To fix this install Shapely using:
conda install Shapely
  • In Windows, an ImportError regarding win32api can also occur. This can be resolved by fixing the version of pywin32 as follows:
pip install --upgrade pywin32==255

Development

Development dependencies are provided through the develop extra flag in setup.py. Here, we install OpenOA, with development dependencies, in editable mode, and activate the pre-commit workflow (note: this second step must be done before committing any changes):

pip install -e "./OpenOA[develop]"
pre-commit install

Occasionally, you will need to update the dependencies in the pre-commit workflow, which will provide an error when this needs to happen. When it does, this can normally be resolved with the below code, after which you can continue with your normal git workflow:

pre-commit autoupdate
git add .pre-commit-config.yaml

Example Notebooks and Data

The example data will be automaticaly extracted as needed by the tests. To manually extract the example data for use with the example notebooks, use the following command:

unzip examples/data/la_haute_borne.zip -d examples/data/la_haute_borne/

In addition, you will need to install the packages required for running the examples with the following command:

pip install -r ./OpenOA/examples/requirements.txt

The example notebooks are located in the examples directory. We suggest installing the Jupyter notebook server to run the notebooks interactively. The notebooks can also be viewed statically on Read The Docs.

jupyter notebook

Testing

Tests are written in the Python unittest framework and are runnable using pytest. There are two types of tests, unit tests (located in test/unit) run quickly and are automatically for every pull request to the OpenOA repository. Regression tests (located at test/regression) provide a comprehensive suite of scientific tests that may take a long time to run (up to 20 minutes on our machines). These tests should be run locally before submitting a pull request, and are run weekly on the develop and main branches.

To run all unit and regresison tests:

pytest

To run unit tests only:

pytest test/unit

To run all tests and generate a code coverage report

pytest --cov=operational_analysis

Documentation

Documentation is automatically built by, and visible through, Read The Docs.

You can build the documentation with sphinx, but will need to ensure Pandoc is installed on your computer first:

cd sphinx
pip install -r requirements.txt
make html

Contributors

Alphabetically: Nathan Agarwal, Nicola Bodini, Anna Craig, Jason Fields, Rob Hammond, Travis Kemper, Joseph Lee, Monte Lunacek, John Meissner, Mike Optis, Jordan Perr-Sauer, Sebastian Pfaffel, Caleb Phillips, Charlie Plumley, Eliot Quon, Sheungwen Sheng, Eric Simley, and Lindy Williams.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

OpenOA-2.3.tar.gz (95.6 kB view details)

Uploaded Source

Built Distribution

OpenOA-2.3-py3-none-any.whl (109.2 kB view details)

Uploaded Python 3

File details

Details for the file OpenOA-2.3.tar.gz.

File metadata

  • Download URL: OpenOA-2.3.tar.gz
  • Upload date:
  • Size: 95.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for OpenOA-2.3.tar.gz
Algorithm Hash digest
SHA256 022d805b4992c8acc22e31a7b060a63987e712b08718406735d5062090987bb4
MD5 5473b8955bdd85a697c6c74f6bc261fa
BLAKE2b-256 b4ccc5521c2a875e41e25187a4a5f30756455cda0ae35bfab3461ee0448315d0

See more details on using hashes here.

Provenance

File details

Details for the file OpenOA-2.3-py3-none-any.whl.

File metadata

  • Download URL: OpenOA-2.3-py3-none-any.whl
  • Upload date:
  • Size: 109.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for OpenOA-2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ef300a2b00855b1ac10e7bbcc5946d2b9d5b7d7f93b11ae8221dbefdfacacefb
MD5 8a82452429f5dc3b870240e0fd9ccd30
BLAKE2b-256 73f97bde88ff542e67cb138ad0d6ef0a2b9730a5d7e60ee90b8b7e2187f566c6

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page