NREL / buildstockbatch

Other
20 stars 13 forks source link

Add script to sample a single location #445

Open nweires opened 3 months ago

nweires commented 3 months ago

Pull Request Description

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

Using the downselect sampler to do the same thing works, but it gets very slow when you filter aggressively. For example, generating 100 buildings for a single rural county took more than an hour to run. With this script, it takes just a few minutes. A similar option for ComStock exists here.

Checklist

github-actions[bot] commented 3 months ago

File Coverage
All files 87% :white_check_mark:
base.py 92% :white_check_mark:
exc.py 57% :white_check_mark:
hpc.py 78% :white_check_mark:
local.py 70% :white_check_mark:
postprocessing.py 85% :white_check_mark:
sample_one_county.py 77% :white_check_mark:
utils.py 92% :white_check_mark:
cloud/docker_base.py 88% :white_check_mark:
sampler/base.py 79% :white_check_mark:
sampler/downselect.py 33% :white_check_mark:
sampler/precomputed.py 93% :white_check_mark:
sampler/residential_quota.py 61% :white_check_mark:
test/shared_testing_stuff.py 85% :white_check_mark:
test/test_docker.py 33% :white_check_mark:
test/test_local.py 97% :white_check_mark:
test/test_validation.py 97% :white_check_mark:
workflow_generator/base.py 90% :white_check_mark:
workflow_generator/commercial.py 53% :white_check_mark:
workflow_generator/residential_hpxml.py 86% :white_check_mark:

Minimum allowed coverage is 33%

Generated by :monkey: cobertura-action against 6beba8c7c54b6d52c55c6da82b275b6eb2625030

shorowit commented 3 months ago

@nweires I might be misunderstanding something, but isn't this what the Residential Quota Downselect Sampler is for?

nweires commented 3 months ago

@nweires I might be misunderstanding something, but isn't this what the Residential Quota Downselect Sampler is for?

Ah, yes, I should add some context for why this is useful! You can do the same thing with the downselect sampler, but this is much faster, especially rural locations with very few building. I'll put some notes about that in the script and PR description.