Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
3b6cca0
Copy characteristics and resource files from resstock-estimation
May 22, 2025
b0fd394
Round ground thermal conductivity option from 2.0 to 2
May 22, 2025
9b1bcca
Changes to options_lookup
May 22, 2025
32fdcfd
Update ignore to include some resource files only in resstock-estimation
May 22, 2025
c2e0b7e
Merge remote-tracking branch 'origin/latest-os-hpxml' into sampling_r…
May 27, 2025
975e316
Update documentation.
May 27, 2025
ee3dcec
Merge branch 'latest-os-hpxml' into sampling_regions
rajeee Aug 13, 2025
2a929b7
Initial commit copying sampler code to ResStock
rajeee Aug 12, 2025
1209a05
Fix import path
rajeee Aug 12, 2025
b08c765
move to src layout
rajeee Aug 13, 2025
323d5e8
initialize package setup
rajeee Aug 13, 2025
0de6e04
full workflow
rajeee Aug 13, 2025
7102f42
full workflow fix
rajeee Aug 13, 2025
d977eb2
Trim readme
rajeee Aug 13, 2025
46fc9db
SDR options analysis results.
Aug 13, 2025
5867994
SDR options analysis results.
Aug 13, 2025
d219bb1
SDR integration tests results.
Aug 13, 2025
36182cd
SDR integration tests results.
Aug 13, 2025
7f7192d
Merge branch 'sampling_regions' into geo_sampling
rajeee Aug 19, 2025
928198a
Simplify the code and remove old stuffs
rajeee Aug 19, 2025
11b2e79
Switch back to flat layout
rajeee Aug 19, 2025
175c5f6
Fix tests
rajeee Aug 19, 2025
95b9661
Small updates
rajeee Aug 19, 2025
40f2090
Ignoring all pyc files by default.
rHorsey Oct 27, 2025
2542127
Merge pull request #1468 from NatLabRockies/geo_sampling
asparke2 May 26, 2026
c4487fd
Merge branch 'develop' into sampling_regions
Jun 9, 2026
29622fb
Merge followup.
Jun 9, 2026
e18dbf1
Update documentation.
Jun 9, 2026
5f4071a
SDR options analysis results.
Jun 9, 2026
91eff21
Rename sampler.py for consistency and to run outside uv manager.
Jun 9, 2026
34334c4
Merge branch 'sampling_regions' of github.com:NREL/resstock into samp…
Jun 9, 2026
d147e5a
Merge branch 'develop' into sampling_regions
Jun 9, 2026
8645e31
Merge branch 'develop' into sampling_regions
Jun 9, 2026
d500689
Update script entry point to reflect module rename
asparke2 Jun 10, 2026
bdb1e7b
Standardize `num_samples_per_segment` value usage
asparke2 Jun 10, 2026
6462a7c
Point to sampling_regions bsb branch in config.
Jun 10, 2026
55d41d8
Reorganize quota and stratified samplers into new samplers folder.
Jun 10, 2026
b9e0f54
Update run_analysis.rb for new quota sampler location.
Jun 10, 2026
bae717f
Stub national baseline project file with new stratified sampler type.
Jun 10, 2026
7512502
Merge branch 'sampling_regions' of github.com:NREL/resstock into samp…
Jun 10, 2026
3db5e0f
Merge branch 'develop' into sampling_regions
Jun 10, 2026
10114a2
Fix newline and require location issues.
Jun 10, 2026
004542e
Merge branch 'develop' into sampling_regions
Jun 10, 2026
94a82f0
Update run_sampling path in ci config file.
Jun 10, 2026
a3dcad1
Try running stratified sampler tests from ci.
Jun 10, 2026
c2ce0f4
Cleanup.
Jun 10, 2026
8d04f37
Add Sampling Region to inputs data dictionary.
Jun 15, 2026
c1a6f67
Update documentation.
Jun 15, 2026
b140e6a
Add sampler arguments to project yml, and update sampler script with …
Jun 15, 2026
de73003
Baseline integration tests results.
Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
OPENSTUDIO_PLATFORM: Ubuntu-24.04-x86_64
OPENSTUDIO_EXT: deb
OPENSTUDIO_URL: https://github.com/NREL/OpenStudio/releases/download/v3.10.0
BUILDSTOCK_BATCH_BRANCH: develop
BUILDSTOCK_BATCH_BRANCH: sampling_regions
BUILDSTOCK_QUERY_BRANCH: main

jobs:
Expand Down Expand Up @@ -102,6 +102,34 @@ jobs:
path: resources/buildstock.csv
if-no-files-found: error

sampler-tests:
runs-on: ubuntu-24.04
needs: [format-files]
steps:
- name: Checkout feature branch
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref || github.ref_name }}

- name: Setup python
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@v8.0.0

- name: Install sampler dependencies
working-directory: samplers/stratified
run: |
uv venv
uv pip install -e . --group dev

- name: Run sampler tests
working-directory: samplers/stratified
run: |
uv run pytest tests

postprocessing-tests:
runs-on: ubuntu-24.04
steps:
Expand Down Expand Up @@ -475,7 +503,7 @@ jobs:

- name: Generate 550K Sample
run: |
openstudio resources/run_sampling.rb -p project_national -n 550000 -o ../project_national/resources/national_550ksamples.csv
openstudio samplers/quota/run_sampling.rb -p project_national -n 550000 -o ../project_national/resources/national_550ksamples.csv
cd project_national/resources
gzip -c national_550ksamples.csv > national_550ksamples.csv.gz

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ buildstockbatch_crash_details.log
.vscode/
node_modules/
.DS_Store
*.pyc
**/.ipynb_checkpoints/*
**/.bsq_cache/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,8 @@ Assumption

- \The mapping between Census Tracts and Zip Codes are approximate and some discrepancies may exist.

- \For each census tract, a CEC climate zone is chosen. If the census tract has more than one CEC climate zone, then the climate zone with the most number of units is chosen.

- \If the sample is outside California, the option is set to None.


Expand Down Expand Up @@ -761,19 +763,19 @@ From ``project_national`` the list of options, option stock saturation, and opti
- 0.065%
- 0.3%
- 1.2%
- 0.54%
- 0.55%
- 0.11%
- 0.87%
- 0.86%
- 0.63%
- 1.1%
- 1.6%
- 0.99%
- 0.34%
- 0.33%
- 1.3%
- 0.58%
- 0.26%
- 0.24%
- 0.24%
- 0.25%
- 90%

.. _ceiling_fan:
Expand Down Expand Up @@ -29541,7 +29543,7 @@ From ``project_national`` the list of options, option stock saturation, and opti
- 1.1
- 1.4
- 1.7
- 2.0
- 2
- 2.3
- 2.6
* - Stock saturation
Expand Down Expand Up @@ -43051,6 +43053,168 @@ Properties
* - ``enclosure_roof_material_color``
-
- The color of the roof.
.. _sampling_region:

Sampling Region
---------------

Description
***********

The sampling region that the sample is located.

Created by
**********

``sources/spatial/tsv_maker.py``

Source
******

- \Building Stock Segmentation Cluster Development: Technical Reference Document. 2023. NREL/TP-5500-84648.


Assumption
**********

- \The prune rules are only for assigning impossible combinations to the Void option.


Options
*******

From ``project_national`` the list of options, option stock saturation, and option properties for the **Sampling Region** characteristic.

.. list-table::
:header-rows: 1
:stub-columns: 1
:widths: auto

* - Option name
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- Void
* - Stock saturation
- 2.7%
- 0.23%
- 1.1%
- 0.16%
- 1.5%
- 5.4%
- 1.4%
- 0.39%
- 2.4%
- 4.9%
- 3.2%
- 0.86%
- 1.8%
- 3%
- 0.4%
- 0.67%
- 0.97%
- 2.8%
- 4.3%
- 7.9%
- 1.7%
- 0.19%
- 5.4%
- 0.58%
- 1.6%
- 1.8%
- 2.3%
- 0.65%
- 0.87%
- 3.2%
- 3.7%
- 0.49%
- 1.6%
- 1.3%
- 0.51%
- 0.44%
- 1.9%
- 1.6%
- 1.7%
- 2.8%
- 2.6%
- 0.14%
- 0.19%
- 0.3%
- 0.36%
- 0.37%
- 0.31%
- 0.63%
- 3.6%
- 0.78%
- 0.62%
- 1.2%
- 1.5%
- 0.63%
- 1.1%
- 1.6%
- 0.99%
- 1.7%
- 0.58%
- 0.5%
- 0%

.. _state:

State
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ build_existing_model.reeds_balancing_area,:ref:`reeds_balancing_area`
build_existing_model.refrigerator,:ref:`refrigerator`
build_existing_model.refrigerator_usage_level,:ref:`refrigerator_usage_level`
build_existing_model.roof_material,:ref:`roof_material`
build_existing_model.sampling_region,:ref:`sampling_region`
build_existing_model.state,:ref:`state`
build_existing_model.state_metro_median_income,:ref:`state_metro_median_income`
build_existing_model.tenure,:ref:`tenure`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
\item CEC Climate zones are defined by Zip Codes.
\item The dependency selected is County and PUMA as zip codes are not modeled in ResStock.
\item The mapping between Census Tracts and Zip Codes are approximate and some discrepancies may exist.
\item For each census tract, a CEC climate zone is chosen. If the census tract has more than one CEC climate zone, then the climate zone with the most number of units is chosen.
\item If the sample is outside California, the option is set to None.
\end{itemize}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\begin{itemize}
\item The prune rules are only for assigning impossible combinations to the Void option.
\end{itemize}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
\begin{itemize}
\item CEC Climate Zone
\item County
\end{itemize}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The sampling region that the sample is located.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
Stock saturation & 0.065\% & 0.3\% & 1.2\% \\ \hline
\hline
Option name & 4 & 5 & 6 \\ \hline
Stock saturation & 0.54\% & 0.11\% & 0.87\% \\ \hline
Stock saturation & 0.55\% & 0.11\% & 0.86\% \\ \hline
\hline
Option name & 7 & 8 & 9 \\ \hline
Stock saturation & 0.63\% & 1.1\% & 1.6\% \\ \hline
\hline
Option name & 10 & 11 & 12 \\ \hline
Stock saturation & 0.99\% & 0.34\% & 1.3\% \\ \hline
Stock saturation & 0.99\% & 0.33\% & 1.3\% \\ \hline
\hline
Option name & 13 & 14 & 15 \\ \hline
Stock saturation & 0.58\% & 0.26\% & 0.24\% \\ \hline
\hline
Option name & 16 & None & \\ \hline
Stock saturation & 0.24\% & 90\% \\ \hline
Stock saturation & 0.25\% & 90\% \\ \hline
\end{customLongTable}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Stock saturation & 0.59\% & 7\% & 46\% \\ \hline
\texttt{location\_soil\_type\_conductivity} & 0.5 & 0.8 & 1.1 \\ \hline
\hline
Option name & 1.4 & 1.7 & 2.0 \\ \hline
Option name & 1.4 & 1.7 & 2 \\ \hline
Stock saturation & 36\% & 7.8\% & 2.3\% \\ \hline
\texttt{location\_soil\_type\_conductivity} & 1.4 & 1.7 & 2.0 \\ \hline
\hline
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\begin{itemize}
\item Building Stock Segmentation Cluster Development: Technical Reference Document. 2023. NREL/TP-5500-84648.
\end{itemize}
Loading