E4STUtil.calc_crf
— Methodcalc_crf(wacc, econ_life) -> crf
Calculates the capital recovery factor given wacc
(weighted average cost of capital) and econ_life
, the economic lifetime of the investment.
E4STUtil.get_e4st_dep
— Methodget_e4st_dep(name) -> file
Returns the e4st dependency that has been registered via register_e4st_dep
. Can also use datadep"<name>"
E4STUtil.metric2short
— Methodmetric2short(x)
Convert x
from metric tons to short tons.
See also: short2metric
E4STUtil.register_e4st_dep
— Methodregister_e4st_dep(name, message, remote_path, args...; kwargs...)
See documentation for DataDeps.DataDep
for more info, but the required fields are:
- name - the name of the metadata. Later, access using
datadep"<name>"
orget_e4st_dep
- message - the message to store in metadata. A description of where the data came from, the size, etc.
- remote_path - where to fetch the data from.
E4STUtil.save_dep_metadata
— Methodsave_dep_metadata(file::String, message::String) -> metadata
Saves metadata for file
to joinpath(dirname(file), "metadata.yml")
, making it if needed.
E4STUtil.save_metadata
— Methodsave_metadata(file::String, description::String) -> metadata
Saves metadata for file
to joinpath(dirname(file), "metadata.yml")
, making it if needed.
E4STUtil.short2metric
— Methodshort2metric(x)
Convert x
from short tons to metric tons.
See also: metric2short
E4STUtil.usd_cr
— Methodusd_cr(y1, y2; source=gdp, future=nothing) -> r
Computes a conversion rate from USD in y1
to USD in y2
.
Optional keyword arguments:
source
- choose betweengdp
andcpi
, defaults togdp
future
- assumed future inflation rate. can be either:nothing
(default) - throw an error when a year outside of the range is givenrate
- the assumed rate of inflation for years beyond the max year i.e.0.02
for 2% inflation rate
Input Data Sources: