Skip to content

Script and data from: "Population cluster data to assess the urban-rural split and electrification in Sub-Saharan Africa " by Babak Khavari, Alexandros Korkovelos, Andeas Sahlberg, Francesco Fuso-Nerini and Mark Howells.

License

Notifications You must be signed in to change notification settings

babakkhavari/Clustering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOI License: GPL v3 GitHub release (latest by date)

Clustering

Script and data from: Population cluster data to assess the urban-rural split and electrification in Sub-Saharan Africa by Babak Khavari, Alexandros Korkovelos, Andeas Sahlberg, Mark Howells and Francesco Fuso Nerini. Datasets produced using the method described in the paper are available at: https://data.mendeley.com/datasets/z9zfhzk8cr.

Content

This repository contains:

  • An environment .yml file needed for generating a fully functioning python 3.7 environment necessary for the clustering algorithm.
  • The clustering code and related functions. These files also contain necessary steps in order to reproduce results.
  • An example case for Benin.

Installing and running the clustering notebook

Requirements

The clustering module (as well as all supporting scripts in this repo) have been developed in Python 3. We recommend installing Anaconda's free distribution as suited for your operating system.

Install the clustering repository from GitHub

After installing Anaconda you can download the repository directly or clone it to your designated local directory using:

> conda install git
> git clone https://github.com/babakkhavari/Clustering.git

Once installed, open anaconda prompt and move to your local "clustering" directory using:

> cd ..\Clustering

In order to be able to run the clustering tool (main.ipynb and funcs.ipynb) you have to install all necessary packages. "full_project.yml" contains all of these and can be easily set up by creating a new virtual environment using:

conda env create --name clustering --file full_project.yml

This might take some time. When complete, activate the virtual environment using:

conda activate clustering

With the environment activated, you can now move to the clustering directory and start a "jupyter notebook" session by simply typing:

..\Clustering> jupyter notebook 

Changelog

5-April-2020: Original code base published 8-Sept-2022: Simplified the installation file, this simplifies installtion on MacOS

Resources

Original dataset can be found here: https://data.mendeley.com/datasets/z9zfhzk8cr

Journal article can be found here: https://www.nature.com/articles/s41597-021-00897-9

Credits

Conceptualization: Babak Khavari & Francesco Fuso-Nerini
Methodology: Babak Khavari
Software: Babak Khavari
Validation: Babak Khavari, Alexandros Konrkovelos & Andreas Sahlberg
Supervision and Advisory support: Francesco Fuso-Nerini & Mark Howells

About

Script and data from: "Population cluster data to assess the urban-rural split and electrification in Sub-Saharan Africa " by Babak Khavari, Alexandros Korkovelos, Andeas Sahlberg, Francesco Fuso-Nerini and Mark Howells.

Resources

License

Stars

Watchers

Forks

Packages

No packages published