← Back to all sparks
R

r2dii.analysis

ANALYTICS
Velocity0.0

Measure Climate Scenario Alignment of Corporate Loans

The climate-alignment maths behind PACTA, now stable and maintained rather than reshaped

climate-financeportfolio-alignmentpactascenario-analysisapi-stabilityr-package
Current state
r2dii.analysis computes the target-setting side of PACTA: market-share and sectoral decarbonisation targets that measure a loan book or portfolio against climate scenarios. It sits downstream of the matched company data the sibling packages produce. The 0.5.0 release declared it lifecycle-stable and handed maintenance to a new lead, and releases since have been narrow corrections rather than new methods.
Where it's heading
The history is a package converging. Early releases churn the output contract of target_market_share() and target_sda() — which sectors appear, which years, how missing production is treated — and each change alters the numbers users get. The ald-to-abcd rename runs across several releases before completing, and by 0.5.0 the churn has stopped, with three older summarise functions soft-deprecated and the package marked stable. What remains is edge-case correctness in target coverage.
Prediction
With the package marked stable and the terminology migration finished, the soft-deprecated summarise functions are the obvious next thing to remove outright.

Recent moves

  1. 7mo ago

    Low-carbon technology targets filled in for partial company coverage

    Corrects target_market_share() so missing low carbon technologies are added when only some companies lack them, not just when all do. A narrow fix, but it changes computed targets, which is the kind of correction that matters most in a package whose output feeds disclosure work.

    View source ↗
  2. 1y ago

    Column definitions filled into the data dictionary

    Populates definitions in the data_dictionary dataset introduced one release earlier. Documentation completion with no change to any computation.

    View source ↗
  3. 1y ago

    Package declared stable, three summarise functions soft-deprecated

    The lifecycle turning point: r2dii.analysis is marked stable, join_ald_scenario and the two weighted-summary functions are soft-deprecated, and maintenance passes to a new lead. A data_dictionary dataset also arrives to document the columns each function consumes and returns.

    View source ↗
  4. 2y ago

    ald argument removed for good in favour of abcd

    Completes the multi-release rename of ald to abcd, and makes target_market_share() emit targets for every scenario year rather than only those present in input data. Both change what downstream code receives, which is why this migration was staged across so many releases.

    View source ↗
  5. 2y ago

    Company-level SDA converges on the scenario's final year

    Changes target_sda() to converge on the scenario's final year when computing by company, and adds an increasing_or_decreasing argument to target_market_share(). Methodology adjustments of the sort that dominated releases before the package settled.

    View source ↗
  6. 3y ago

    Repository moved to the RMI-PACTA organisation

    A repository transfer to the RMI-PACTA organisation with no code change. Relevant only for anyone tracking the source location.

    View source ↗