Skip to main content

Tools for performing common tasks on solar PV data signals

Project description

solar-data-tools

PyPI release Anaconda Cloud release

Tools for performing common tasks on solar PV data signals. These tasks include finding clear days in a data set, common data transforms, and fixing time stamp issues. These tools are designed to be automatic and require little if any input from the user. Libraries are included to help with data IO and plotting as well.

There is close integration between this repository and the Statistical Clear Sky repository, which provides a "clear sky model" of system output, given only measured power as an input.

See notebooks folder for examples.

Setup

Recommended: Set up conda environment with provided .yml file

Updated March 2021

We recommend setting up a fresh Python virtual environment in which to use solar-data-tools. We recommend using the Conda package management system, and creating an environment with the environment configuration file named pvi-user.yml, provided in the top level of this repository. This will install the statistical-clear-sky package as well.

Additional documentation on setting up the Conda environment is available here.

Please see the Conda documentation page, "Creating an environment from an environment.yml file" for more information.

Installing this project as PIP package

$ pip install solar-data-tools

As of March 6, 2019, it fails because scs package installed as a dependency of cxvpy expects numpy to be already installed. scs issue 85 says, it is fixed. However, it doesn't seem to be reflected in its pip package. Also, cvxpy doesn't work with numpy version less than 1.16. As a work around, install numpy separatly first and then install this package. i.e.

$ pip install 'numpy>=1.16'
$ pip install statistical-clear-sky

Solvers

Currently, this sofware package requires the use of a commercial software package called MOSEK. The included YAML file will install MOSEK for you, but you will still need to obtain a license. More information is available here:

Installing this project as Anaconda package

$ conda install -c slacgismo solar-data-tools

If you are using Anaconda, the problem described in the section for PIP package above doesn't occur since numpy is already installed. And during solar-data-tools installation, numpy is upgraded above 1.16.

Solvers

By default, ECOS solver is used, which is supported by cvxpy because it is Open Source.

However, it is found that Mosek solver is more stable. Thus, we encourage you to install it separately as below and obtain the license on your own.

Using this project by cloning this GIT repository

From a fresh python environment, run the following from the base project folder:

$ pip install -r requirements.txt

Usage

Users will primarily interact with this software through the DataHandler class.

from solardatatools import DataHandler
from solardatatools.dataio import get_pvdaq_data

pv_system_data = get_pvdaq_data(sysid=35, api_key='DEMO_KEY', year=[2011, 2012, 2013])

dh = DataHandler(pv_system_data)
dh.run_pipeline(power_col='dc_power')

If everything is working correctly, you should see something like the following

total time: 16.67 seconds
--------------------------------
Breakdown
--------------------------------
Preprocessing              6.52s
Cleaning                   8.62s
Filtering/Summarizing      1.53s
    Data quality           0.23s
    Clear day detect       0.19s
    Clipping detect        0.21s
    Capacity change detect 0.91s

Versioning

We use Semantic Versioning for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the BSD 2-Clause License - see the LICENSE file for details

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

solar-data-tools-0.4.12.tar.gz (45.9 kB view details)

Uploaded Source

Built Distribution

solar_data_tools-0.4.12-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

Details for the file solar-data-tools-0.4.12.tar.gz.

File metadata

  • Download URL: solar-data-tools-0.4.12.tar.gz
  • Upload date:
  • Size: 45.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for solar-data-tools-0.4.12.tar.gz
Algorithm Hash digest
SHA256 179c88bf794d858887a7bb3fa9b203839e510e04e21cc7783cd36dcb912ee289
MD5 c375d4e97cb00c8cf0f91afe7c33facf
BLAKE2b-256 52f4f851642608b2628aef67f800b0cc1cfa17182daa5462d8e34fd406641318

See more details on using hashes here.

File details

Details for the file solar_data_tools-0.4.12-py3-none-any.whl.

File metadata

  • Download URL: solar_data_tools-0.4.12-py3-none-any.whl
  • Upload date:
  • Size: 53.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for solar_data_tools-0.4.12-py3-none-any.whl
Algorithm Hash digest
SHA256 7ab42b9acaa0bbd50993f19d42ba8eaba662d9fc0986d56995da8b3abfee4c21
MD5 b10fe97257accd09462007a52b2f3622
BLAKE2b-256 6ec43a6ea16b22bd56ad9e7f1c3b6b873a9e29e8d15fc9e7f6f4251f05310cd6

See more details on using hashes here.

Supported by

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