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

Add wind up example using FlascDataFrame #210

Merged
merged 34 commits into from
Sep 12, 2024

Conversation

aclerc
Copy link

@aclerc aclerc commented Sep 4, 2024

Feature or improvement description
Add a simple example of a wind-up uplift and uncertainty calculation
The filtered and northed flasc dataframe is converted to wind-up format using a new FlascDataFrame method
It is probably best to merge PR #199 before merging this PR because I branched from misi9170:feature/flasc-df

Related issue, if one exists
#195

Test results, if applicable
I have added test_convert_to_windup_format() which passes for me locally

@paulf81 paulf81 changed the base branch from develop to flasc-dataframe September 5, 2024 19:01
@aclerc aclerc marked this pull request as ready for review September 6, 2024 12:40
@aclerc aclerc mentioned this pull request Sep 6, 2024
@misi9170
Copy link
Collaborator

misi9170 commented Sep 9, 2024

@aclerc I've merged back the flasc-dataframe target branch and resolved conflicts. Tests pass, and I checked that the examples_smarteole/09_wake_steering_uplift_analysis.ipynb notebook still runs and appears to produce the expected outputs.

EDIT: perhaps not---I just ran the notebook again and get an error OptionError: No such keys(s): 'future.no_silent_downcasting'
coming from the results_per_test_ref_df = run_wind_up_analysis(assessment_inputs) line. @aclerc, have you seen this before? It may be a problem with my conda environment, I'll try a few things.

This remerging may need to happen one more time if we get #211 , which adds some core components to the FlascDataFrame, goes in before this PR, but I again should be able to handle that.

@aclerc
Copy link
Author

aclerc commented Sep 10, 2024

Hi @misi9170 regarding OptionError: No such keys(s): 'future.no_silent_downcasting' I think that is related to the pandas option set on this line https://github.com/resgroup/wind-up/blob/eee1c07be49e17d344feaa4aa0f4af8e14ff4648/wind_up/plots/scada_funcs_plots.py#L220. I think upgrading your pandas version will fix that for you. If this continues to be troublesome feel free to raise an issue on the wind-up repo.

@misi9170
Copy link
Collaborator

misi9170 commented Sep 10, 2024

Thanks @aclerc, that fixed it. I was using pandas 2.0.2 when I was having the problem, and upgrading to the current 2.2.2 solved the problem (I also had to upgrade pyarrow for compatibility with pandas 2.2.2). pandas 2.0.2 actually satisfies the current FLASC pandas requirement (pandas~=2.0), so I'll probably bump the requirement up to pandas~=2.2.

Confirming now that the notebook produces the expected 0.6%, -0.2%, 1.4% result.

@paulf81 paulf81 merged commit ebe1451 into NREL:flasc-dataframe Sep 12, 2024
3 checks passed
@aclerc aclerc deleted the add-wind-up branch September 12, 2024 17:30
misi9170 added a commit that referenced this pull request Oct 17, 2024
* Add new `FlascDataFrame` object to enhance user interface with data (#199)

* Adding at the root level for now; could consider moving to utilities/

* Ruff.

* precommit stuff.

* Add example notebook

* Add wide to long

* Add test

* Update README.md engagement

* Update README.md replacing 'FLORIS' typo

* Feature/add docstrings (#197)

* Update to 15 (#202)

* Update for PyPI installation. (#204)

* Update version number; ignore version.py for ruff.

* Adhere to FLASC formatting rules.

* psuedocode for conversions. Tests for saving dataframe to file.

* Print warning when to_feather used.

* String formatting.

* Add several more tests and n_turbines property.

* Adding TODOs for long/wide conversions.

* Clean up, a few more tests.

* Improved printout.

* ruff format.

---------

Co-authored-by: Paul <paul.fleming@nrel.gov>
Co-authored-by: christiannvaughn <139596563+christiannvaughn@users.noreply.github.com>

* Add dataframe conversions to flascdataframe (#211)

* Add wind up example using `FlascDataFrame` (#210)

* loosen wind-up dependency

* Finish FlascDataFrame (Paul) (#215)

Add type hints

* Finish FlascDataFrame (update examples/docs) (#219)

* Merge recent changes.

* Update functions to use FlascDataFrames; getter and setter for channel_name_map; metadata copying method.

* Smarteole examples now using FlascDataFrame

* Add brief demonstration of switch to user data format; rename 09 notebook for clarity.

* Update artifical data examples.

* Had weird behavior in the getter/setter caused by not providing the true underlying attribute in _metadata.

* formatting.

* Simplify imports of FlascDataFrame throughout.

* Add wind-up to pyproject.toml after setup.py was removed.

* Update docs for FlascDataFrame (#220)

---------

Co-authored-by: misi9170 <39596329+misi9170@users.noreply.github.com>
Co-authored-by: christiannvaughn <139596563+christiannvaughn@users.noreply.github.com>
Co-authored-by: Alex Clerc <alex.clerc@res-group.com>
Co-authored-by: misi9170 <michael.sinner@nrel.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants