This repository contains the scripts and data necessary to reproduce the Food Security Data Dive page.
Maintainers:
- Luca Picci [https://github.com/lpicci96/lpicci96]
- Jorge Rivera [https://github.com/jm-rivera]
- World Bank - World Development Indicators
- Integrated Food Security Phase Classification (IPC)
- Food and Agriculture Organization (FAO)
- United States Department of Agriculture (USDA) Economic Research Service.
- International Food Policy Research Institute (IFPRI)
- World Food Programme
In order to reproduce this analysis, Python (>= 3.10) is needed. Other packages are listed in requirements.txt
.
The repository includes the following sub-folders:
output
: contains clean and formatted csv filed that are used to create the visualizations.
raw_data
: contains raw data used for the analysis. Manually downloaded files are added to this folder.
glossaries
: contains metadata and other useful lookup files.
scripts
: scripts for creating the analysis. analysis.py
contains functions to extract and clean data from various
sources. charts.py
contains functions to produce the visualizations that appear on the page. utils.py
contains
utility functions and config.py
manages file paths to different folders.
Some data needs to be manually downloaded and moved into the raw_data
folder:
- Download IPC country level data from the IPC dashboard,
and place the file in
raw_data
asIPC_data.csv
. - Download FOA undernourishment fata from FAOStat - food security and
nutrition indicators. Select
prevalence of undernourishment (%)
for all years and countries. Place the csv file inraw data
asFAO_undernourishment_data.csv
. - Download IFPRI data from the IFPRI blogpost
under
Figure 1
and place the file inraw_data
asrestrictions_data.csv
. - Download FAO fertilizer data from FAOStat -
Fertilizer by nutrient dataset. Select
Nutrient potash k20 (total)
for all elements, all countries and years. Place the file inraw_data
asFAO_fertilizer.csv
.