The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Tutorial: Site-Level KPI Calculators


1. Why site-level KPIs?

Country-level SDG statistics tell you where a jurisdiction stands; they do not tell you how your operation performs. MineSDG v0.3.0 adds a family of site-level KPI calculators aligned with the disclosure conventions mining teams already report against:

KPI family SDG Framework convention
GHG intensity (Scope 1+2) 13 GHG Protocol; GRI 305-4; SASB EM-MM-110a.1
Energy intensity, renewable share 7 GRI 302; SASB EM-MM-130a.1
Water recycling, net consumption 6 GRI 303; ICMM Water Position Statement
Land rehabilitation rate 15 GRI 11.7 / 304-3; ICMM Principle 7
TRIFR / LTIFR / fatality rate 8.8 GRI 403-9; ICMM per-1M-hours convention
Workforce diversity & localisation 5, 8 GRI 405-1; GRI 202-2
Community investment ratio 1, 17 GRI 203-1; ICMM Principle 9
Tailings & waste-rock ratios 12 GRI 306 / 11.8; GISTM context

All calculators are pure functions — no network access, no side effects — so they can be embedded in pipelines, reports, and the Shiny dashboard.

2. Working with the demo data

The package bundles demo_mine_sites, a synthetic six-site, six-year panel:

head(demo_mine_sites[, 1:8])
#>   site_id      site_name commodity country year ore_processed_kt ghg_scope1_t
#> 1 CU-ATAC Atacama Copper    Copper     CHL 2019          18481.0       636010
#> 2 CU-ATAC Atacama Copper    Copper     CHL 2020          18020.1       653331
#> 3 CU-ATAC Atacama Copper    Copper     CHL 2021          19293.9       651551
#> 4 CU-ATAC Atacama Copper    Copper     CHL 2022          18580.4       564789
#> 5 CU-ATAC Atacama Copper    Copper     CHL 2023          18885.5       612173
#> 6 CU-ATAC Atacama Copper    Copper     CHL 2024          20762.1       640035
#>   ghg_scope2_t
#> 1       342467
#> 2       351794
#> 3       350835
#> 4       304117
#> 5       329632
#> 6       344634

Take one site-year:

site <- demo_mine_sites[demo_mine_sites$site_id == "CU-ATAC" &
                          demo_mine_sites$year == 2024, ]

3. Individual calculators

Climate (SDG 13):

calculate_ghg_intensity(
  scope1_t = site$ghg_scope1_t,
  scope2_t = site$ghg_scope2_t,
  ore_processed_kt = site$ore_processed_kt
)
#> $metric
#> [1] "SDG 13.2 - GHG Emissions Intensity"
#> 
#> $total_emissions_t
#> [1] 984669
#> 
#> $ghg_intensity
#> [1] 47.43
#> 
#> $scope1_share_percent
#> [1] 65

Energy (SDG 7):

calculate_energy_intensity(
  energy_gj = site$energy_gj,
  ore_processed_kt = site$ore_processed_kt,
  renewable_gj = site$energy_gj * site$renewable_energy_pct / 100
)
#> $metric
#> [1] "SDG 7.3 - Energy Intensity"
#> 
#> $energy_intensity
#> [1] 0.4722
#> 
#> $renewable_share_percent
#> [1] 40.1

Safety (SDG 8.8), per one million hours worked:

calculate_safety_performance(
  hours_worked = site$hours_worked,
  recordable_injuries = site$recordable_injuries,
  lost_time_injuries = site$lost_time_injuries,
  fatalities = site$fatalities
)
#> $metric
#> [1] "SDG 8.8 - Occupational Safety (per 1M hours, ICMM convention)"
#> 
#> $trifr
#> [1] 2.976
#> 
#> $ltifr
#> [1] 1.042
#> 
#> $fatality_rate
#> [1] 0
#> 
#> $hours_worked_millions
#> [1] 6.72

Water (SDG 6.4), land (SDG 15.3), community (SDG 1), waste (SDG 12):

calculate_water_efficiency(site$water_withdrawal_m3,
                           site$water_discharge_m3,
                           site$water_recycled_m3)
#> $metric
#> [1] "SDG 6.4 - Water Efficiency"
#> 
#> $net_consumption_m3
#> [1] 13631149
#> 
#> $recycling_rate_percent
#> [1] 40.83

calculate_land_restoration(site$land_disturbed_ha,
                           site$land_rehabilitated_ha)
#> $metric
#> [1] "SDG 15.3 - Land Restoration"
#> 
#> $percent_restored
#> [1] 56.52
#> 
#> $unrestored_area_ha
#> [1] 167.4

calculate_community_investment(site$community_investment_musd,
                               site$revenue_musd)
#> $metric
#> [1] "SDG 1.4 / 17.17 - Community Investment Ratio"
#> 
#> $community_investment_pct
#> [1] 1.014

calculate_waste_intensity(site$ore_processed_kt,
                          site$tailings_kt,
                          waste_rock_kt = site$waste_rock_kt)
#> $metric
#> [1] "SDG 12.4 / 12.5 - Mineral Waste Intensity"
#> 
#> $tailings_ratio
#> [1] 0.983
#> 
#> $waste_rock_ratio
#> [1] 2.678
#> 
#> $total_mineral_waste_kt
#> [1] 76011

4. Using your own data

Shape one row per site-year with the column names shown in ?demo_mine_sites. Any missing fields are simply skipped by the scorecard engine (next tutorial). A minimal example:

my_site <- data.frame(
  site_id = "MY-MINE", year = 2025,
  ore_processed_kt = 12000,
  ghg_scope1_t = 420000, ghg_scope2_t = 180000,
  hours_worked = 5.2e6, recordable_injuries = 18,
  lost_time_injuries = 6, fatalities = 0
)

calculate_ghg_intensity(my_site$ghg_scope1_t, my_site$ghg_scope2_t,
                        my_site$ore_processed_kt)$ghg_intensity
#> [1] 50

Continue with vignette("sdg-ontology-and-scorecard") to turn these raw KPIs into a weighted 0-100 SDG scorecard, or launch the dashboard with run_minesdg_dashboard().

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.