Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data shift algorithm #124

Merged
merged 84 commits into from
May 25, 2022
Merged

Conversation

kperrynrel
Copy link
Member

@kperrynrel kperrynrel commented Jan 19, 2022

Description

This PR handles detecting data shifts in daily summed time series (power or irradiance), and removing data shift periods. The process of doing this is illustrated in the Jupyter notebook in the /docs/ folder. I am reporting the results of this algorithm (performance) in a submitted PVSC abstract/paper, which we can cite for performance metrics.

Checklist

The following items must be addressed before the code can be merged.
Please don't hesitate to ask for help if you are unsure of how to accomplish any of the items.
You are free to remove any checklist items that do not apply or add additional items that are
not on this list

  • Added new API functions to docs/api.rst
  • Clearly documented all new API functions with PEP257 and numpydoc compliant docstrings
  • Adds description and name entries in the appropriate "what's new" file
    in docs/whatsnew
    for all changes. Includes link to the GitHub Issue with :issue:`num`
    or this Pull Request with :pull:`num`. Includes contributor name
    and/or GitHub username (link with :ghuser:`user`).
  • Non-API functions clearly documented with docstrings or comments as necessary
  • Added tests to cover all new or modified code
  • Pull request is nearly complete and ready for detailed review

@kperrynrel kperrynrel self-assigned this Jan 19, 2022
@kperrynrel
Copy link
Member Author

Also I was discussing with @kanderso-nrel this morning on having a published basis for this algorithm. Attached is the associated PVSC 2022 abstract for this work, as a reference
pvsc_time_shift (2).pdf
.

Copy link
Member

@kandersolar kandersolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a partial review -- I will take another look after some of the higher level questions below are discussed.

Other thoughts:

  • Probably makes sense to add a bullet in docs/index.rst under Library Overview for this new quality.data_shifts submodule
  • quality/__init__.py needs an entry for data_shifts

docs/api.rst Outdated Show resolved Hide resolved
docs/api.rst Outdated Show resolved Hide resolved
docs/whatsnew/0.1.1.rst Outdated Show resolved Hide resolved
pvanalytics/quality/data_shifts.py Outdated Show resolved Hide resolved
pvanalytics/quality/data_shifts.py Outdated Show resolved Hide resolved
pvanalytics/quality/data_shifts.py Outdated Show resolved Hide resolved
pvanalytics/quality/data_shifts.py Outdated Show resolved Hide resolved
pvanalytics/quality/data_shifts.py Show resolved Hide resolved
_run_data_checks(time_series, use_default_models, method, cost, penalty)
# Run the filtering sequence, if marked as True
if filtering:
time_series = _erroneous_filter(time_series)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the spirit of "one function, one job", I wonder if it should be left to the user to filter data prior to passing in?

pvanalytics/tests/quality/test_data_shifts.py Outdated Show resolved Hide resolved
kperrynrel and others added 5 commits January 20, 2022 13:54
Co-authored-by: Kevin Anderson <57452607+kanderso-nrel@users.noreply.github.com>
Co-authored-by: Kevin Anderson <57452607+kanderso-nrel@users.noreply.github.com>
Co-authored-by: Kevin Anderson <57452607+kanderso-nrel@users.noreply.github.com>
@kandersolar
Copy link
Member

FYI the test failures should be fixed by the last commit in #129

@kperrynrel
Copy link
Member Author

@cwhanse I've got the issues that @kanderso-nrel brought up addressed, so this should be ready for review. Everything passing, but our coveralls coverage dropped by .2%.

@kperrynrel kperrynrel merged commit 78f516a into pvlib:master May 25, 2022
@kperrynrel
Copy link
Member Author

This PR was accidentally merged into master. I reverted master back to the previous commit, and am reopening this.

@kperrynrel kperrynrel mentioned this pull request May 25, 2022
6 tasks
@kandersolar kandersolar added this to the v0.1.2 milestone Jun 27, 2022
@kandersolar kandersolar added the enhancement New feature or request label Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants