The impact of the energy transition on local mining communities