Tutorial: SDG Ontology, Site Scorecards & Dashboard


1. The SDG-to-Mining ontology

MineSDG formalises the relationship between the 17 SDGs and mining-sector materiality as a queryable dataset, sdg_mining_ontology. Each goal is mapped to a mining domain, a 1-5 materiality rating, a material topic, and references into GRI 11 (the 2024 mining sector standard), the ICMM Mining Principles, SASB EM-MM metrics and SEBI BRSR principles.

explore_sdg_ontology(goal = 6)
#>   goal                  goal_name               mining_domain materiality
#> 6    6 Clean Water and Sanitation Water & Resource Efficiency           5
#>                                         material_topic  gri_reference
#> 6 Water stewardship, quality and shared-use catchments GRI 11.6 / 303
#>   icmm_principle   sasb_emm brsr_principle
#> 6    Principle 6 EM-MM-140a             P6
#>                                  example_kpis
#> 6 water_recycling_rate; net_water_consumption

explore_sdg_ontology(domain = "biodiversity")[, c("goal", "material_topic",
                                                  "gri_reference")]
#>    goal                                    material_topic     gri_reference
#> 14   14      Marine and coastal impacts (tailings, ports) GRI 304 (coastal)
#> 15   15 Land disturbance, rehabilitation and biodiversity    GRI 11.7 / 304

The five core-materiality goals for mining (rating 5) are health & safety (SDG 3), water (SDG 6), climate (SDG 13) and land/biodiversity (SDG 15) — consistent with how ICMM members and GRI 11 frame sector materiality.

sdg_mining_ontology[sdg_mining_ontology$materiality == 5,
                    c("goal", "goal_name", "mining_domain")]
#>    goal                  goal_name               mining_domain
#> 3     3 Good Health and Well-being             Health & Safety
#> 6     6 Clean Water and Sanitation Water & Resource Efficiency
#> 13   13             Climate Action            Climate & Energy
#> 15   15               Life on Land         Biodiversity & Land

2. The KPI registry

mining_kpi_registry defines 18 site KPIs with units, SDG targets, improvement direction, and indicative good / poor reference thresholds that anchor 0-100 scoring:

list_mining_kpis(sdg_goal = 8)
#>                   kpi_id                               kpi_name         unit
#> 7                  trifr Total Recordable Injury Frequency Rate per 1M hours
#> 8                  ltifr        Lost Time Injury Frequency Rate per 1M hours
#> 9          fatality_rate                Fatality Frequency Rate per 1M hours
#> 11  local_employment_pct                 Local Employment Share            %
#> 17 local_procurement_pct                Local Procurement Share            %
#>    sdg_goal sdg_target     direction good_value poor_value
#> 7         8        8.8  lower_better        1.5      12.00
#> 8         8        8.8  lower_better        0.4       4.00
#> 9         8        8.8  lower_better        0.0       0.05
#> 11        8        8.5 higher_better       80.0      20.00
#> 17        8        8.3 higher_better       60.0      10.00
#>                                    framework_reference
#> 7  GRI 403-9; ICMM safety data convention (per 1M hrs)
#> 8               GRI 403-9; ICMM safety data convention
#> 9               GRI 403-9; ICMM safety data convention
#> 11                          GRI 202-2; SASB EM-MM-210b
#> 17                         GRI 204-1; ICMM Principle 9

Calibration note. The bundled thresholds are indicative sector reference points. For production use, copy the registry and calibrate good_value / poor_value to your commodity, scale and jurisdiction, then pass your version to score_site_sdg(registry = ...).

3. Scoring a site

score_site_sdg() takes one site-year of raw operational data, derives every KPI it can, rescales each between the registry thresholds (respecting direction), aggregates to SDG-goal level, and weights goals by ontology materiality into a composite:

site <- demo_mine_sites[demo_mine_sites$site_id == "FE-PILB" &
                          demo_mine_sites$year == 2024, ]
result <- score_site_sdg(site)
result
#> == MineSDG Site SDG Scorecard ==
#> Site: FE-PILB (2024) 
#> Composite score: 82.9 / 100  |  Grade: B 
#> 
#> Goal-level scores (materiality-weighted):
#> Key: <sdg_goal>
#>    sdg_goal               mining_domain weight goal_score
#>       <int>                      <char>  <num>      <num>
#> 1:        1        Economic Development      3       77.3
#> 2:        5   Community & Social Impact      3       65.2
#> 3:        6 Water & Resource Efficiency      5       69.0
#> 4:        7            Climate & Energy      4       98.0
#> 5:        8        Economic Development      4       93.0
#> 6:       12 Water & Resource Efficiency      4       93.0
#> 7:       13            Climate & Energy      5      100.0
#> 8:       15         Biodiversity & Land      5       65.6
#> 
#> KPI detail available in $scorecard (14 KPIs).

Drill into the KPI detail:

result$scorecard
#>                       kpi_id                               kpi_name sdg_goal
#>                       <char>                                 <char>    <num>
#>  1:            ghg_intensity              GHG Intensity (Scope 1+2)       13
#>  2:     renewable_energy_pct                 Renewable Energy Share        7
#>  3:         energy_intensity                       Energy Intensity        7
#>  4:     water_recycling_rate                   Water Recycling Rate        6
#>  5:          water_intensity                        Water Intensity        6
#>  6:  land_rehabilitation_pct               Land Rehabilitation Rate       15
#>  7:                    trifr Total Recordable Injury Frequency Rate        8
#>  8:                    ltifr        Lost Time Injury Frequency Rate        8
#>  9:            fatality_rate                Fatality Frequency Rate        8
#> 10:    female_employment_pct                Female Employment Share        5
#> 11:     local_employment_pct                 Local Employment Share        8
#> 12: community_investment_pct             Community Investment Ratio        1
#> 13:           tailings_ratio                  Tailings-to-Ore Ratio       12
#> 14:         waste_rock_ratio               Waste Rock (Strip) Ratio       12
#>       value         unit score
#>       <num>       <char> <num>
#>  1: 13.9500 tCO2e/kt ore 100.0
#>  2: 38.4000            %  96.0
#>  3:  0.1212     GJ/t ore 100.0
#>  4: 40.8800            %  38.0
#>  5:  0.3690     m3/t ore 100.0
#>  6: 55.9000            %  65.6
#>  7:  1.8320 per 1M hours  96.8
#>  8:  0.6410 per 1M hours  93.3
#>  9:  0.0000 per 1M hours 100.0
#> 10: 21.3000            %  65.2
#> 11: 69.0000            %  81.7
#> 12:  1.1710 % of revenue  77.3
#> 13:  0.3400      t/t ore 100.0
#> 14:  1.9760      t/t ore  86.1

4. Portfolio comparison

Score every site for the latest year:

latest <- demo_mine_sites[demo_mine_sites$year == 2024, ]
portfolio <- do.call(rbind, lapply(seq_len(nrow(latest)), function(i) {
  s <- score_site_sdg(latest[i, ])
  data.frame(site_id = s$site_id, composite = s$composite_score,
             grade = s$grade)
}))
portfolio[order(-portfolio$composite), ]
#>   site_id composite grade
#> 3 FE-PILB      82.9     B
#> 6 BX-ODIS      82.7     B
#> 4 CO-JHAR      70.5     B
#> 5 ZN-RAJA      68.5     C
#> 1 CU-ATAC      66.8     C
#> 2 AU-KALG      62.1     C

5. Offline SDG analytics

demo_sdg_country mirrors the output of fetch_sdg_country_data(), so the full analytics layer runs without network access:

dt <- demo_sdg_country[demo_sdg_country$indicator == "6.4.1", ]
compute_sdg_stability(dt)
#>    indicator country observations mean_value  sd_value coefficient_of_variation
#>       <char>  <char>        <int>      <num>     <num>                    <num>
#> 1:     6.4.1     AUS            9   38.42478 2.2049210               0.05738279
#> 2:     6.4.1     CHL            9   24.30078 1.5454462               0.06359657
#> 3:     6.4.1     IND            9   14.02433 1.4815603               0.10564212
#> 4:     6.4.1     ZAF            9   16.13933 0.8599564               0.05328327
#>    volatility_index stability_category
#>               <num>             <char>
#> 1:             5.74  Moderately Stable
#> 2:             6.36  Moderately Stable
#> 3:            10.56  Moderately Stable
#> 4:             5.33  Moderately Stable

6. The Shiny dashboard

Everything above is wrapped in an interactive dashboard:

run_minesdg_dashboard()

Five tabs: Portfolio Overview (composite scores and grades per site), Site Deep-Dive (KPI trend lines and the latest scorecard), SDG Alignment (ontology explorer with materiality chart), KPI Registry, and Data (bundled demo or a CSV upload following the demo_mine_sites schema). Requires the shiny package; DT is optional for enhanced tables.