Latest Release | |
License | |
Build Status | |
Publications | |
PyPI Downloads | |
Conda Downloads | |
Test-Coverage |
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.
See the notebooks folder for examples.
In a fresh Python virtual environment, simply run:
$ pip install solar-data-tools
or if you would like to use MOSEK, install the optional dependency as well:
$ pip install "solar-data-tools[mosek]"
Warning
When installing solar-data-tools using conda, you will need to add three channels, conda-forge, slacgismo, and stanfordcvxgrp, to your conda config (or alternatively specify them using the -c
flag as shown in the examples below). Failure to do so will result in the installation of an outdated solar-data-tools version. Note that we will be moving solar-data-tools to conda-forge soon, which will simplify the installation process. Check back soon for an update! For more on conda channels, see the conda docs.
Creating the environment and directly installing the package and its dependencies from the appropriate conda channels:
$ conda create -n pvi-user solar-data-tools -c conda-forge -c slacgismo -c stanfordcvxgrp
Starting the environment:
$ conda activate pvi-user
Stopping the environment:
$ conda deactivate
Or alternatively install the package in an already existing environment:
$ conda install solar-data-tools -c conda-forge -c slacgismo -c stanfordcvxgrp
By default, QSS and CLARABEL solvers are used for non-convex and convex problems, respectively. Both are supported by OSD, the modeling language used to solve signal decomposition problems in Solar Data Tools, and both are open source.
MOSEK is a commercial software package. Since it is more stable and offers faster solve times, we provide continuing support for it, however you will still need to obtain a license. If installing with pip, you can install the optional MOSEK dependency by running pip install "solar-data-tools[mosek]"
. If installing from conda, you will have to manually install MOSEK if you desire to use it as conda does not support optional dependencies like pip.
More information about MOSEK and how to obtain a license is available here:
Users will primarily interact with this software through the DataHandler
class. If you would like to specify a solver, just pass the keyword argument solver
to dh.pipeline
with the solver of choice. Passing QSS will keep the convex problems solver as OSQP, unless solver_convex=QSS
is passed as well. Setting solver=MOSEK
will set the solver to MOSEK for convex and non-convex problems by default.
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: 24.27 seconds
--------------------------------
Breakdown
--------------------------------
Preprocessing 11.14s
Cleaning 0.94s
Filtering/Summarizing 12.19s
Data quality 0.25s
Clear day detect 1.75s
Clipping detect 7.77s
Capacity change detect 2.42s
Must enable pre-commit hook before pushing any contributions
pip install pre-commit
pre-commit install
Run pre-commit hook on all files
pre-commit run --all-files
In order to view the current test coverage metrics, run:
coverage run --source solardatatools -m unittest discover && coverage html
open htmlcov/index.html
We use Semantic Versioning for versioning. For the versions available, see the tags on this repository.
- Bennet Meyers - Initial work and Main research work - Bennet Meyers GitHub
See also the list of contributors who participated in this project.