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 script to sample a single location #70

Merged
merged 7 commits into from
Mar 6, 2024
Merged

Conversation

nweires
Copy link
Collaborator

@nweires nweires commented Feb 28, 2024

This script runs the residential quota sampler for a single county+PUMA.

Note: We probably won't try to merge this into the upstream NREL/buildstockbatch repo, so I'm saving it to RA's develop branch, rather than the gcp branch where our other changes are.

Potential future work:

  • Add the option to include multiple locations at a time

Copy link

github-actions bot commented Feb 28, 2024

File Coverage
All files 85%
base.py 91%
exc.py 57%
hpc.py 78%
local.py 70%
postprocessing.py 84%
sample_one_county.py 0%
utils.py 96%
cloud/docker_base.py 89%
sampler/base.py 79%
sampler/downselect.py 33%
sampler/precomputed.py 93%
sampler/residential_quota.py 61%
test/shared_testing_stuff.py 85%
test/test_docker.py 33%
test/test_local.py 97%
test/test_validation.py 97%
workflow_generator/base.py 90%
workflow_generator/commercial.py 53%
workflow_generator/residential_hpxml.py 86%

Minimum allowed coverage is 33%

Generated by 🐒 cobertura-action against ab66cdd

Copy link

@mfathollahzadeh mfathollahzadeh left a comment

Choose a reason for hiding this comment

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

Looks good to me! just added a few comments for clarity

path/to/output_dir/buildstock_G1900030_G19001800_200.csv with 200 samples

Methodology:
This modifies the conditional probability distributions from the standard ResStock national project

Choose a reason for hiding this comment

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

can you explain this a bit further? if we were to use the same number of samples as there is in the national resstock (i.e., county, puma in the 550k sample), that does not change the probability distributions, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I updated this - let me know if it's still unclear.

buildstockbatch/sample_one_county.py Show resolved Hide resolved
buildstockbatch/sample_one_county.py Outdated Show resolved Hide resolved
buildstockbatch/sample_one_county.py Show resolved Hide resolved
buildstockbatch/sample_one_county.py Outdated Show resolved Hide resolved
@nweires nweires merged commit 863e927 into develop Mar 6, 2024
6 checks passed
@nweires nweires deleted the natalie/sampling branch March 6, 2024 22:34
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.

2 participants