---
title: "Carbon and environmental valuation"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Carbon and environmental valuation}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
```

```{r setup}
library(greenbook)
```

## Carbon values for appraisal

DESNZ publishes a single consolidated carbon value series with
low / central / high scenarios. The November 2023 publication
superseded the historical traded / non-traded split.
`gb_carbon_value()` looks the values up directly:

```{r}
gb_carbon_value(2024)
gb_carbon_value(2024, scenario = "high")
gb_carbon_value(2030)
```

The values are published in 2022 prices. Rebase to a different
year via `base_year`:

```{r}
gb_carbon_value(2030, base_year = 2024)
```

## Net present value of an emissions path

A greenhouse-gas-emitting project has its environmental
externality monetised at the published carbon value, then
discounted under the standard STPR.

```{r}
# 100 tCO2e per year for 2024 to 2030, treated as a cost
emissions <- rep(100, 7)
years <- 2024:2030
gb_carbon_npv(emissions, years, base_year = 2024)
```

For an abatement project (avoided emissions), use
`sign = "benefit"`:

```{r}
gb_carbon_npv(emissions, years, base_year = 2024, sign = "benefit")
```

## Wellbeing valuation

Life-satisfaction changes can be monetised via WELLBYs (HMT
Wellbeing Guidance for Appraisal, July 2021). Default unit value:
GBP 13,000 per WELLBY in 2019 prices.

```{r}
# 1-point lift in life satisfaction, 100 people, 5 years
gb_wellby(1, persons = 100, years = 5)

# In 2024 prices
gb_wellby(1, persons = 100, years = 5, base_year = 2024)

# Sensitivity range
gb_wellby(1, persons = 100, years = 5, scenario = "low")
gb_wellby(1, persons = 100, years = 5, scenario = "high")
```

## Risk to life and health

Value of Preventing a Fatality (VPF) and Quality-Adjusted Life
Year (QALY) per DfT TAG and DHSC supplementary guidance.

```{r}
gb_vpf()        # 2024 published value: GBP 2.153m
gb_vpf(2018)    # 2018 baseline

gb_qaly(1)                          # DHSC: GBP 70k per QALY
gb_qaly(1, scenario = "nice_upper") # NICE upper threshold: GBP 30k
```

## Provenance

```{r}
gb_data_versions()
```

## Provenance

The bundled DESNZ carbon path is the November 2023 publication
(Data Tables 1-19, Table 3), 2020 to 2050. A future refresh will
extend through to 2100.

The VPF series anchors on the DfT TAG data book v2.03 (December
2025) Table A4.1.1 WTP element of GBP 2,474,341 in 2023 prices,
uplifted at 2 percent annual real GDP per head growth per TAG
methodology.
