Applying sentiment analysis to model public perceptions of energy insecurity and renewable adoption in Ghana’s green energy transition
摘要
Energy insecurity continues to pose a critical challenge in Ghana, with persistent power outages, rising tariff and overdependence on hydrothermal generation undermining both household welfare and industrial productivity. At the same time, renewable energy, particularly solar and mini-grids, has emerged as a potential pathway for resilience and sustainability. This study sought to assess the public discourse on energy insecurity and renewable energy transition in Ghana. The study applies sentimentanalysis as an energy informatics tool to model public perceptions of energy insecurity and renewable adoption. Using a dataset of Twitter posts (~ 12,000), news articles (~ 5500), and parliamentary debates (~ 2500) in Ghana from the period of 2018–2024, Lexicon-based, Random Forest, and RoBERTa (transformer-based model—with fine-tuning to reflect local contents) methods were implemented and compared. Results show that discourse on energy insecurity is dominated by negative sentiment (65% on Twitter), while renewable adoption attracts more positive perceptions, especially in parliamentary debates (45% positive). Model evaluation revealed that RoBERTa (F1 = 0.85) outperformed Random Forest (0.76) and lexicon-based methods (F1 = 0.63). BERTopic uncovered five dominant topics including outages (“dumsor”), tariffs, renewables, governance, and climate. Outages and tariffs were framed with predominantly negative sentiment (72% and 68% negative respectively), while renewables and climate attracted positive sentiment (55% and 60% respectively). The quantitative evidence further highlighted optimism around reliability, affordability, and community empowerment. These findings demonstrate potentially informative decision-supports insights for energy policymakers, investors, and development partners, thereby supporting Ghana’s transition to a more inclusive and sustainable energy future.