Skip to content

Commit

Permalink
Updating tutorial, updating examples
Browse files Browse the repository at this point in the history
  • Loading branch information
craigmaloney committed Apr 26, 2021
1 parent aa62504 commit 2ff7617
Show file tree
Hide file tree
Showing 12 changed files with 2,678 additions and 2,557 deletions.
Binary file modified docs/examples/examples.zip
Binary file not shown.
15 changes: 10 additions & 5 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ make it easier to debug.
(venv)$ pip install thermostat
# if using conda (see note below - conda is distributed with Anaconda)
$ conda create --yes --name thermostat pandas
$ source activate thermostat
# This method uses conda for the virtual environment rather than as a package manager
# Note: Using this method will cause problems if you install other packages
# with conda. Please use pip instead of conda to install packagesinside of
# this virtual environment.
$ conda create --yes --name thermostat pip
$ conda activate thermostat
# We use pip instead of Conda to install the packages.
(thermostat)$ pip install thermostat
If you already have an environment, use the following:
Expand All @@ -38,11 +43,11 @@ If you already have an environment, use the following:
(thermostat)$
# if using conda
$ source activate thermostat
$ conda activate thermostat
(thermostat)$
# if using venv, or virtualenv directly
$ source path/to/venv/bin/activate
$ source /path/to/venv/bin/activate
To deactivate the environment when you've finished, use the following:

Expand All @@ -53,7 +58,7 @@ To deactivate the environment when you've finished, use the following:
$
# if using conda
(thermostat)$ source deactivate
(thermostat)$ conda deactivate
$
Check to make sure you are on the most recent version of the package.
Expand Down
6 changes: 5 additions & 1 deletion scripts/multi_thermostat_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def main():

# This section finds the metadata files and data files for the thermostats.
# These point to examples of the various styles of files
# In most cases you will combine Single Stage, Two Stage, and Two Stage ERT
# data in the same file.

# Single Stage
data_dir = os.path.join("..", "tests", "data", "single_stage")
metadata_filename = os.path.join(data_dir, "metadata.csv")
Expand All @@ -57,7 +60,8 @@ def main():
# "False" to use the logging level instead
thermostats = from_csv(metadata_filename, verbose=True)

output_dir = "."
# output_dir = "."
output_dir = data_dir
metrics = multiple_thermostat_calculate_epa_field_savings_metrics(thermostats)

output_filename = os.path.join(
Expand Down
10 changes: 5 additions & 5 deletions tests/data/single_stage/thermostat_example_certification.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
product_id,sw_version,metric,filter,region,statistic,season,value
test_product,2.0.0a2,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,lower_bound_95,heating,20.17
test_product,2.0.0a2,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,lower_bound_95,cooling,44.36
test_product,2.0.0a2,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,q20,heating,19.83
test_product,2.0.0a2,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,q20,cooling,38.44
test_product,2.0.0a2,rhu_30F_to_45F,tau_cvrmse_savings_p01,all,upper_bound_95,heating,0.09
test_product,2.0.0a3,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,lower_bound_95,heating,20.17
test_product,2.0.0a3,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,lower_bound_95,cooling,44.36
test_product,2.0.0a3,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,q20,heating,19.83
test_product,2.0.0a3,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,q20,cooling,38.44
test_product,2.0.0a3,rhu_30F_to_45F,tau_cvrmse_savings_p01,all,upper_bound_95,heating,0.09
57 changes: 57 additions & 0 deletions tests/data/single_stage/thermostat_example_output.csv

Large diffs are not rendered by default.

2,734 changes: 1,367 additions & 1,367 deletions tests/data/single_stage/thermostat_example_stats.csv

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions tests/data/two_stage/thermostat_example_certification.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
product_id,sw_version,metric,filter,region,statistic,season,value
test_product,2.0.0,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,lower_bound_95,heating,6.96
test_product,2.0.0,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,lower_bound_95,cooling,14.08
test_product,2.0.0,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,q20,heating,7.43
test_product,2.0.0,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,q20,cooling,14.52
test_product,2.0.0,rhu_30F_to_45F,tau_cvrmse_savings_p01,all,upper_bound_95,heating,0.03
test_product,2.0.0a3,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,lower_bound_95,heating,6.96
test_product,2.0.0a3,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,lower_bound_95,cooling,16.33
test_product,2.0.0a3,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,q20,heating,7.43
test_product,2.0.0a3,percent_savings_baseline_percentile,tau_cvrmse_savings_p01,national_weighted_mean,q20,cooling,17.04
test_product,2.0.0a3,rhu_30F_to_45F,tau_cvrmse_savings_p01,all,upper_bound_95,heating,0.03
Loading

0 comments on commit 2ff7617

Please sign in to comment.