This project analyses the evolution of sentiment in news headlines over time, utilising Python and Pandas for data manipulation, and Hugging Face Transformers models for sentiment analysis, emotion analysis, and keyword analysis. For more details, you can view the Project Proposal, Final Presentation, and Final Report.
The dataset comprises of news headlines spanning from 2007 to 2021, sourced from Kaggle:
-
Australia: ABC News
-
Ireland: The Irish Times
-
India: Times of India
-
England: Daily Mail
-
United States: The New York Times
- Run
python filterGBandUS.pyto filter data specific to the United Kingdom and the United States. - Run
python filterAll.pyto filter data in the whole dataset.
- Run
python sentiment/analysis.pyfor sentiment analysis. - Run
python sentiment/graph.pyto generate visualisations based on the sentiment data.
- Run
python emotion/analysis.pyfor emotion analysis. - Run
python emotion/graph.pyto visualise the emotion analysis results.
- Run
python keywords/analysis.py,python keywords/analysis2.py, andpython keywords/combine.pyfor keyword analysis. - Run
python keywords/graph.pyto visualise the keyword analysis results.
