Skip to main content

FlexValue: a tool for calculating avoided costs

Project description

This library can be used to calculate the avoided costs, TRC, and PAC.

Try it out for yourself by following our tutorial or with your own data here.

Avoided Cost Data

This uses avoided cost data that is stored in a SQLITE table, which can be downloaded as a SQLite file here (flexvalue_2020.db).

A separate series of pythons scripts were used to generate that sqlite file from a source XLSX file provided by the CEC As of this writing (2021-03-05), the most recent update to the avoided cost data is 2020, which corresponds to the public filename of the SQLite file.

Installation from Source

Docker

docker-compose build

# for running the CLI commands
./flexvalue.sh --help

# for opening the tutorial
docker-compose up jupyter

Local

pip install -e .

# for running cli commands
flexvalue --help

# tutorial (assuming you have jupyter installed
jupyter notebooks/

CLI Commands

Before calculating any results, you will need to download the avoided cost data for a given year. .. code-block:: shell

flexvalue download-avoided-costs-data-db –year 2020

To get an example set of flexvalue results, run the following commands in order.

flexvalue generate-example-inputs
flexvalue get-results --user-inputs-filepath ../test_data/example_user_inputs_deer.csv --report-filepath reports/example_report_deer.html
flexvalue get-results --user-inputs-filepath ../test_data/example_user_inputs_metered.csv  --metered-load-shape-filepath ../test_data/example_metered_load_shape.csv --report-filepath reports/example_report_metered.html

To help generate your user input file, use the following command to see what utilities, climate zones, and deer load shapes are available.

flexvalue valid-utility-climate-zone-combos
flexvalue valid-deer-load-shapes

License

This project is licensed under Apache 2.0.

Other resources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flexvalue-0.0.1.tar.gz (16.8 kB view hashes)

Uploaded Source

Built Distribution

flexvalue-0.0.1-py2.py3-none-any.whl (24.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page