Add gallery example for modeling with interval averages#1152
Add gallery example for modeling with interval averages#1152wholmgren merged 8 commits intopvlib:masterfrom
Conversation
wholmgren
left a comment
There was a problem hiding this comment.
Thanks @kanderso-nrel, I think this will be really helpful to a lot of users. Some suggestions below but I'm fine with leaving most edits for future work too.
| # %% | ||
| # The differences shown above are the absolute difference in :math:`W/m^2`. | ||
| # In this example, using the timestamps unadjusted creates an error that | ||
| # increases with increasing interval length, up to a ~40% :math:`W/m^2` error |
There was a problem hiding this comment.
I was going to comment that this error depends on time of day, but then I reread the code and saw that you're actually calculating the average error during daylight hours. Somehow need to make that more clear.
Could also consider restricting the analysis to a couple of times of day. Or add a plot of error as a function of time of day for different shifts (though this depends on the time of year and location...). Maybe this is getting out of scope, sorry.
There was a problem hiding this comment.
Added a plot along these lines and some other clarifications -- let me know what you think
| @@ -0,0 +1,157 @@ | |||
| """ | |||
| Modeling with interval averages | |||
There was a problem hiding this comment.
most, but not all, of the other examples are in Title Case. Fine to leave it as is and kick the standards down the road.
|
thanks @kanderso-nrel and sorry for the delayed merge |
Closes #xxxxTests addedUpdates entries todocs/sphinx/source/api.rstfor API changes.docs/sphinx/source/whatsnewfor 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`).New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.Following up on the discussion here: https://groups.google.com/g/pvlib-python/c/b4uMI3v3qOc
As always, editorial improvements are especially welcome!
Built version here: https://pvlib-python--1152.org.readthedocs.build/en/1152/auto_examples/plot_interval_transposition_error.html