GenCost¶
Development install¶
To create an environment for GenCost, navigate to the repo folder in terminal and run:
With uv¶
To create an environment for GenCost, navigate to the repo folder in terminal and run:
uv sync --all-extras
pre-commit install
If the pre-commit command doesn’t work see here for development environment setup guidance.
With mamba¶
To create an environment for GenCost, navigate to the repo folder in terminal and run:
mamba update mamba
mamba env create --name gencost --file environment.yml
Then setup some tools…
mamba activate gencost
pre-commit install
Now everything should be ready!
Development guidance¶
See git guidance and notes on tests and linters.
GenCost Clustering and Regressions Summary¶
In order to predict what we call the vom, fom, and som of any new data set, we’ve written this suite of scripts. For an in-depth discussion of what these scripts do, see.
Please note that two tables are generally referred to here: 1. DataBySubplant 2. NewData (this is basically a reference to either EternallyPresent or HistoricalData– you can punch in whichever you want, as long as you are consistent as you run through these five scripts.
INSTRUCTIONS:
- module_setup.R
This script simply lists all of the libraries that you’ll need. Please make sure you have all of them installed.
- module_initial_transformations.R
Create variables that we’ll need as we move forward.
- module_pca.R
DataBySubplant has a lot of co-linearity in its variables; use PCA to decompose our data into a few useful components.
- module_clusters.R
We’ve decided how many clusters we’ll use per prime_mover type: now, fit clustering models to the data.
- module_regressions.R
Find the optimal linear regression model for each cluster.
- module_final_transformations.R
Calculate the vom, fom, and som for each row of our new data set, and export it to disk.