Code Monkey home page Code Monkey logo

jbg060-dc3's Introduction

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.

jbg060-dc3's People

Contributors

idmochowski avatar bluetea33 avatar gieljw avatar jakubsep avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.