Skip to contents

Loops the existing score_site_sdg engine over every site-year in a portfolio and returns a tidy table of composite scores and grades, ready for portfolio dashboards and benchmarking. No new scoring logic is introduced.

Usage

score_portfolio_sdg(site_data,
  registry = MineSDG::mining_kpi_registry)

Arguments

site_data

A data.frame with one row per site-year (multiple sites allowed), using the demo_mine_sites conventions.

registry

KPI registry passed through to score_site_sdg.

Value

A data.table with columns site_id, site_name, commodity, country, year, composite_score, grade, ordered by year then descending score.

Examples

portfolio <- score_portfolio_sdg(demo_mine_sites)
portfolio[portfolio$year == 2024, ]
#>    site_id       site_name commodity country  year composite_score  grade
#>     <char>          <char>    <char>  <char> <int>           <num> <char>
#> 1: FE-PILB    Pilbara Iron  Iron Ore     AUS  2024            82.9      B
#> 2: BX-ODIS  Odisha Bauxite   Bauxite     IND  2024            82.7      B
#> 3: CO-JHAR     Jharia Coal      Coal     IND  2024            70.5      B
#> 4: ZN-RAJA  Rajasthan Zinc      Zinc     IND  2024            68.5      C
#> 5: CU-ATAC  Atacama Copper    Copper     CHL  2024            66.8      C
#> 6: AU-KALG Kalgoorlie Gold      Gold     AUS  2024            62.1      C