-
Notifications
You must be signed in to change notification settings - Fork 28
Ccaradon/sdr 2025 r4 fix timeseries plots #428
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
base: ccaradon/sdr_2025_r4
Are you sure you want to change the base?
Ccaradon/sdr 2025 r4 fix timeseries plots #428
Conversation
…or timeseries plots
b8e1533 to
916764f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request fixes timeseries plotting capabilities for AMI comparisons and upgrade measure comparisons by introducing a new ComStockQueryBuilder class that properly accounts for sample-specific weights. The changes replace the previous workflow that used BuildStockQuery with building-type-specific weights.
Key Changes
- Introduces a new
ComStockQueryBuilderclass to generate SQL queries for Athena with proper sample-specific weighting - Refactors timeseries plotting methods to use the new query builder and support both state and county-level geographic filtering
- Updates parameter naming from
statestotimeseries_locations_to_plotto support both states and counties - Adds new methods for creating SightGlass-compatible database tables and views
- Improves AMI comparison data handling with building type normalization and better DataFrame management
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 56 comments.
Show a summary per file
| File | Description |
|---|---|
| postprocessing/setup.py | Relaxes Python version requirement from exactly 3.10.12 to >=3.9 |
| postprocessing/comstockpostproc/s3_utilities_mixin.py | Comments out fsspec s3 filesystem registration |
| postprocessing/comstockpostproc/plotting_mixin.py | Adds monkey-patching for PyAthena cursor, removes old weighting method, updates timeseries plotting methods to use new query builder, changes column naming from 'baseline' to 'Baseline' |
| postprocessing/comstockpostproc/comstock_to_ami_comparison.py | Adds DataFrame copying, building type normalization, and empty dataframe handling |
| postprocessing/comstockpostproc/comstock_query_builder.py | New file providing SQL query templates for timeseries aggregation, applicability queries, and monthly energy consumption |
| postprocessing/comstockpostproc/comstock_measure_comparison.py | Updates parameter names and method signatures to support flexible geographic locations |
| postprocessing/comstockpostproc/comstock.py | Adds new methods for weighted load profile retrieval, geographic type determination, SightGlass table creation, and AMI timeseries data handling improvements |
| postprocessing/compare_upgrades.py.template | Updates example configuration to use new timeseries_locations_to_plot parameter with state and county examples |
| postprocessing/compare_upgrades-test_timeseries_plots.py | New test file demonstrating timeseries plotting with multiple geographic levels |
| postprocessing/compare_comstock_to_ami.py.template | Updates AMI comparison template with proper workflow and configuration examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
916764f to
7cf2a5c
Compare
7cf2a5c to
27f45bc
Compare
rHorsey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice Chris. Some things to clean up (mostly detritus from ai tools I suspect) but really nice work. Happy holidays!
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ithub.com/NREL/ComStock into ccaradon/sdr_2025_r4_fix_timeseries_plots
Pull request overview
Fixes timeseries plotting capabilities for AMI comparisons and upgrade measure comparisons. Includes a new query class that accounts for sample-specific weights from the prior workflow of using BuildStockQuery with building-type-specific weights.
Pull Request Author
This pull request makes changes to (select all the apply):
Pull Request Author Checklist:
comstock_column_definitions.csvoptions_lookup.tsvfiles updatedtest/reporting_measure_tests.txt,test/workflow_measure_tests.txt, ortest/upgrade_measure_tests.txt.ymlfiles andREADME.mdfilesPull Request Reviewer Checklist:
test/reporting_measure_tests.txt,test/workflow_measure_tests.txt, ortest/upgrade_measure_tests.txt.ymlandREADME.mdfiles updatedComStock Licensing Language - Add to Beginning of Each Code File