Skip to content

GielJW/JBG060-DC3-23-24-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

South Sudan Project

Code description

You are provided with two notebooks and the necessary data to help you start the South Sudan project. First, run topic_modelling.ipynb. In this notebook, a BERTopic model is fit on articles_summary_cleaned.csv, then four categories/keywords (hunger, refugees, humanitarian, and conflict) are defined. These categories are used for categorising articles (or none if the article doesn’t match any of the categories) and thus creating features from the news articles. Secondly, run the predictions.ipynb notebook for some very basic data exploration, along with fitting several linear models on the data, with- and without the news features. The notebook uses the food_crises_cleaned.csv dataset and the csv file obtained from the topic_modelling.ipynb notebook.

Requirements

To install the requirements open Terminal (macOS)/Command Prompt (Windows) and run pip install -r requirements.txt. If you create a new environment in PyCharm, an icon should appear to install requirements. The code runs with Python 3.9.16.

Required libraries:

  • bertopic == 0.15.0
  • pandas == 1.4.4
  • geopandas == 0.13.2
  • matplotlib == 3.7.2
  • seaborn == 0.12.2
  • statsmodels == 0.14.0

Troubleshooting

If you encounter any issues while running the notebooks, try the following:

  • check that you have all the necessary libraries installed and the correct versions of them
  • check your Python version. In principle, the code should work with any Python versions higher than 3.9.16. If this is not the case, create a virtual environment that uses Python 3.9.16.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages