Code for the paper "Methodology for Adding a Variable to a Synthetic Population from Aggregate Data: Example of Adding the Income Variable" We provided two datasets and four R scripts. 1)The dataset "synth_pop_original.feather" represents the synthetic household population for the city of nantes. 2The dataset "deciles_filosofi.feather" represents the distribution of income deciles for the city of nantes. These data are provided by the French National Institute of Statistics and Economic Studies (INSEE) and contain a large number of variables. We only retain the elements (households and variables) relevant to our case study. For more information about the data, please refer to the text file "raw_data.txt" 3) The R script "script_1.R" deals with step 1 of the "problem solving heuristic" section (subsection 4.13) 4) The R script "script_2.R" deals with step 2 of the "problem solving heuristic" section (subsection 4.13) 5) The R script "script_3.R" deals with step 3 of the "problem solving heuristic" section (subsection 4.15) 6) The R script "script_4.R" deals with the post-processing step and the validation of the results Scripts must be run in this order