Software Open Access
Bodirsky et al
# Data processing scripts and model output data of the paper "Starved, stuffed and wasteful: symptoms of an advancing nutrition transition"
Bodirsky, Benjamin Leon, Jan Philipp Dietrich, Eleonora Martinelli, Anthonia Stenstad, Prajal Pradhan, Susanne Rolinski,
Sabine Gabrysch, et al. in review. "Starved, Stuffed and Wasteful: Symptoms of an Advancing Nutrition Transition".
## HOW TO START THE FOOD DEMAND MODEL
The scenarios have been created using the Food Demand Model, which is part of the Open Source land-system modeling
framework MAgPIE*. The model version used for this publication, MAgPIE 4.1.1 can be downloaded and installed from https://github.com/magpiemodel/magpie/releases/tag/v4.1.1 or http://doi.org/10.5281/zenodo.3701289.
Regular updates will appear in the github repository https://github.com/magpiemodel/magpie.
*) Dietrich, J. P., Bodirsky, B. L., Humpenöder, F., Weindl, I., Stevanovic, M., Karstens, K., Kreidenweis, U.,
Wang, X., Mishra, A., Klein, D., Ambrosio, G., Araujo, E., Yalew, A. W., Baumstark, L., Wirth, S., Giannousakis, A.,
Beier, F., Chen, D. M.-C., Lotze-Campen, H., and Popp, A.: MAgPIE 4 - a modular open-source framework for modeling
global land systems, Geosci. Model Dev., 12, 1299-1317, https://doi.org/10.5194/gmd-12-1299-2019, 2019.
### HOW TO INSTALL
Installation guidelines and a technical model description can be found in the repository
(https://github.com/magpiemodel/magpie/releases/tag/v4.1.1). For the reproduction of this study,
please additionally copy all content of the downloaded supplementary material into the main folder of the
downloaded repository (the subfolder structure should be preserved).
### RUN THE MODEL
To run the food demand model in stand-alone mode (without the remaining MAgPIE model), as it was done in this
publication, execute `Rscript start.R` (or `source("start.R")` from within R) in the main folder of the model.
Then select `demand standalone` as start script.
The results will be saved as result folders in the subfolder "output". Alternatively to producing new results
by executing the model, the result folders used in this study are stored in the "output" folder of this package.
## HOW CAN I ANALYSE THE MODEL RESULTS?
The analysis of the model results can be reproduced by executing several R scripts.
The execution of these scripts requires the installation of the programming language R and a number of R packages.
### HOW TO INSTALL
*R* (https://www.r-project.org/) is required executing the scripts.
Required R packages are either distributed via the offical R CRAN or
via a separate repository hosted at PIK (PIK-CRAN). Before proceeding
PIK-CRAN should be added to the list of
available repositories via:
options(repos = c(CRAN = "@CRAN@", pik = "https://rse.pik-potsdam.de/r/packages"))
After that all packages can be installed via `install.packages`
pkgs <- c("magclass",
### Executing the result scripts
The following scripts can be used to reproduce the data behind the figures and tables.
Please note that the final editing of figures was done in an image processing program which cannot be automatized.
* data_SI: creating the country-level output data published in the supplementary data of the manuscript
* map: plotting the 3 maps, and providing the numbers for the (manual) arrangement of the symbols on the figure
* BMI_income: figure plot for relationship between BMI and income
* panelplots_rev1: Scripts for reproducing the plots of total people undernourished and total food demand
* decomposition: decomposition plot
* whatif: Estimates numbers for table 1, quantifying the change in food demand when underweight, overweight, physical inactivity, or food waste were eradicated.
* numbers_for_text: Some scripts for deriving the numbers used in the text
* maps_additional: These plots have not been used in the paper, but provide some additional data visualization of the results