Data and scripts file for the replicability of the results in the paper: Global bilateral migration projections accounting for diasporas, transit and return flows, and poverty constraints, Albano Rikani and Jacob Schewe, Demographic Research , 03.2021. List of data files. For the dynamic model: - InitModel.csv : containing the diaspora and total population data for the initialization of the model. Sources: -United Nations Department of Economic and Social Affairs Population Division. International Migrant Stock 2019. Technical report, United Nations database, POP/DB/MIG/Stock/Rev.2019, 2019a. URL https://www.un.org/en/development/desa/population/migration/data/estimates2/estimates19.asp -United Nations Department of Economic and Social Affairs Population Division. World Population Prospects 2019. Technical report, United Nations, Department of Economic and Social Affairs, Population Division, 2019b. URL https://population.un.org/wpp/Download/Standard/Population/. - gdp.xlsx : GDP of the countries under the different SSP scenarios. Source: - R. Dellink, J. Chateau, E. Lanzi, and B. Magné. Long-term economic growth projections in the Shared Socioeconomic Pathways. Global Environmental Change, 42:200–214, 2017. ISSN09593780. doi: 10.1016/j.gloenvcha.2015.06.004. URL https://linkinghub.elsevier.com/retrieve/pii/S0959378015000837. - population.xlsx : Population projections under the different SSP scenarios. Used, together with the gdp.xlsx file, for calculating the GDP per capita projections. Source: -S. KC and W. Lutz. The human core of the shared socioeconomic pathways: Population scenarios by age, sex and level of education for all countries to 2100. Global Environmental Change, 2014.ISSN 09593780. doi: 10.1016/j.gloenvcha.2014.06.004. URL http://www.sciencedirect.com/science/article/pii/S0959378014001095 - PopGdpISIMIP.csv : contains the GDP and population for calculating the GDP per capita for the historical period. Sources: - R. C. Feenstra, R. Inklaar, and M. P. Timmer. The Next Generation of the Penn World Table. American Economic Review, 105(10):3150–3182, 2015. ISSN 0002-8282. doi: 10.1257/aer.20130954. URL http://pubs.aeaweb.org/doi/10.1257/aer.20130954. - T. Geiger. Continuous national gross domestic product (GDP) time series for 195 countries: past observations (1850–2005) harmonized with future projections according to the Shared Socio-economic Pathways (2006–2100). Earth System Science Data, 10(2):847–856, 2018. ISSN1866-3516. doi: 10.5194/essd-10-847-2018. URL https://www.earth-syst-sci-data.net/10/847/2018/. -United Nations Department of Economic and Social Affairs Population Division. World Population Prospects 2019. Technical report, United Nations, Department of Economic and Social Affairs, Population Division, 2019b. URL https://population.un.org/wpp/Download/Standard/Population/ - UN2019_CrudeDeathRate.csv : contains the projected mortality rates. Source: -United Nations Department of Economic and Social Affairs Population Division. World Population Prospects 2019. Technical report, United Nations, Department of Economic and Social Affairs, Population Division, 2019b. URL https://population.un.org/wpp/Download/Standard/Population/ - UN2019_CrudeBirthRate.csv : contains the projected fertility rates. Source: -United Nations Department of Economic and Social Affairs Population Division. World Population Prospects 2019. Technical report, United Nations, Department of Economic and Social Affairs, Population Division, 2019b. URL https://population.un.org/wpp/Download/Standard/Population/ for the regression results: - NLS_wRfg_pbDataF_2019D.csv : file containing all the data (population, GDP, distance) for estimating the model. Sources: -United Nations Department of Economic and Social Affairs Population Division. International Migrant Stock 2019. Technical report, United Nations database, POP/DB/MIG/Stock/Rev.2019,2019a. URL https://www.un.org/en/development/desa/population/migration/data/estimates2/estimates19.asp -United Nations Department of Economic and Social Affairs Population Division. World Population Prospects 2019. Technical report, United Nations, Department of Economic and Social Affairs, Population Division, 2019b. URL https://population.un.org/wpp/Download/Standard/Population/. -T. Mayer and S. Zignago. Notes on CEPII’s Distances Measures: The GeoDist Database. SSRN Electronic Journal, 2011. ISSN 1556-5068. doi: 10.2139/ssrn.1994531. URL http://www.ssrn. com/abstract=1994531 -G. J. Abel and J. E. Cohen. Bilateral international migration flow estimates for 200 countries. Scientific data, 6(1):82, 2019. ISSN 20524463. doi: 10.1038/s41597-019-0089-3. URL http://dx.doi.org/10.1038/s41597-019-0089-3 -R. C. Feenstra, R. Inklaar, and M. P. Timmer. The Next Generation of the Penn World Table. American Economic Review, 105(10):3150–3182, 2015. ISSN 0002-8282. doi: 10.1257/aer.20130954.URL http://pubs.aeaweb.org/doi/10.1257/aer.20130954. - T. Geiger. Continuous national gross domestic product (GDP) time series for 195 countries: past observations (1850–2005) harmonized with future projections according to the Shared Socio-economic Pathways (2006–2100). Earth System Science Data, 10(2):847–856, 2018. ISSN1866-3516. doi: 10.5194/essd-10-847-2018. URL https://www.earth-syst-sci-data.net/10/847/2018/ - BilRefFlows.csv : containing the bilateral refugee flows , used for the estimation of the migration transition function (file Regression_Emigration_OriginGDP.py). Source: -UNHCR. Refugee Population Statistics Database, 2020. URL https://www.unhcr.org/refugee-statistics/download/ - RegFromStocksData.csv : containing the estimated flow, using the difference from stocks method, and population and GDP data. Used in the file Regression_from_Stocks.py. Sources: -R. C. Feenstra, R. Inklaar, and M. P. Timmer. The Next Generation of the Penn World Table. American Economic Review, 105(10):3150–3182, 2015. ISSN 0002-8282. doi: 10.1257/aer.20130954.URL http://pubs.aeaweb.org/doi/10.1257/aer.20130954. - T. Geiger. Continuous national gross domestic product (GDP) time series for 195 countries: past observations (1850–2005) harmonized with future projections according to the Shared Socio-economic Pathways (2006–2100). Earth System Science Data, 10(2):847–856, 2018. ISSN1866-3516. doi: 10.5194/essd-10-847-2018. URL https://www.earth-syst-sci-data.net/10/847/2018/ -United Nations Department of Economic and Social Affairs Population Division. World Population Prospects 2019. Technical report, United Nations, Department of Economic and Social Affairs, Population Division, 2019b. URL https://population.un.org/wpp/Download/Standard/Population/. -T. Mayer and S. Zignago. Notes on CEPII’s Distances Measures: The GeoDist Database. SSRN Electronic Journal, 2011. ISSN 1556-5068. doi: 10.2139/ssrn.1994531. URL http://www.ssrn. com/abstract=1994531 -United Nations Department of Economic and Social Affairs Population Division. International Migrant Stock 2019. Technical report, United Nations database, POP/DB/MIG/Stock/Rev.2019, 2019a. URL https://www.un.org/en/development/desa/population/migration/data/estimates2/estimates19.asp - Emi_Transition.csv : GDP and total relative emigration data. Used for the non parametric regression in the file NonParaReg.py - G. J. Abel and J. E. Cohen. Bilateral international migration flow estimates for 200 countries. Scientific data, 6(1):82, 2019. ISSN 20524463. doi: 10.1038/s41597-019-0089-3. URL http: //dx.doi.org/10.1038/s41597-019-0089-3 -R. C. Feenstra, R. Inklaar, and M. P. Timmer. The Next Generation of the Penn World Table. American Economic Review, 105(10):3150–3182, 2015. ISSN 0002-8282. doi: 10.1257/aer.20130954.URL http://pubs.aeaweb.org/doi/10.1257/aer.20130954. - T. Geiger. Continuous national gross domestic product (GDP) time series for 195 countries: past observations (1850–2005) harmonized with future projections according to the Shared Socio-economic Pathways (2006–2100). Earth System Science Data, 10(2):847–856, 2018. ISSN1866-3516. doi: 10.5194/essd-10-847-2018. URL https://www.earth-syst-sci-data.net/10/847/2018/ -United Nations Department of Economic and Social Affairs Population Division. World Population Prospects 2019. Technical report, United Nations, Department of Economic and Social Affairs, Population Division, 2019b. URL https://population.un.org/wpp/Download/Standard/Population/. -UNHCR. Refugee Population Statistics Database, 2020. URL https://www.unhcr.org/refugee-statistics/download/ - AbCo_Ret.csv : return migration flows reproduced using the script from A19. Source: - G. J. Abel and J. E. Cohen. Bilateral international migration flow estimates for 200 countries. Scientific data, 6(1):82, 2019. ISSN 20524463. doi: 10.1038/s41597-019-0089-3. URL http: //dx.doi.org/10.1038/s41597-019-0089-3 List of code files. All the scripts are tested to properly run on Python 3, version 3.6.9. Exeption is the case of the non parametric regression file (NonParaReg.py), which needs to run on Python 2, and has been tested on the version 2.7.17. For the dynamic model: - Para.py : file where the model that we want to run is defined. Here are set the values of the parameters of the migration equation as well as the type of model that we want to run: with constant GDP or changing GDP. The time period to simulate is also defined here and the SSP pathway too. - DynaMig.py : main part of the migration model. It loads the needed functions for getting the data (fLoadData) and for the initialization (fInitMig). It includes a for loop for the time evolution simulation: computing the migration flows (fMigEvolution), the updated population stocks due to migration flows (fMigUp) and the final updated population due to natural evolution (fPopNatEv). At the end the print on file function is called (fPrintOut). - DynaMigFunc.py : all the functions for the correct run of the migration model are defined. fLoadData gets in input the variables from Para.py defining the type of model and the time period. In output it gives the stored data that we need for starting the model. fInitMig takes part of this output in input and produces the array of the population stocks. fMigFlow is the core of the calculations. It takes in input the array of population stocks and calculates the migration flows matrix. This output is used in fMigEvolution function for calculating the immigration and emigration matrices. In fMigUp this matrices are used to update the population matrix by the net migration flows. At the end the fPopNatEv calculates the births and deaths for the model time step and updates the population matrix consequently. - ResToFile.py : defines the fPrintOut function which takes the final arrays where the population and migration flows evolution are stored and after rearringing them prints the data on file. For the regression results: - RegPara.py : defines the type of model that we want to estimate by setting the confidence interval and data type to use (excluding/including the refugee flows, flow estimates type from A19). - RegData.py : loads and rearranges the data (NLS_wRfg_pbDataF_2019D.csv) needed for the estimation, following the parameters set in RegPara.py - RegFunctions.py : following the parameters' values in RegPara.py defines the equation of the model that we want to estimate and returns the difference between observed and estimated flows. - Regression.py : loads the data and the function from the RegData.py and RegFunctions.py respectively. Defines the initialization values for the estimation and runs it. At the end the function fStatReg is called for calculating the statistics outcome for the regression. - RegStats.py : the function fStatReg is defined. It takes in input the regression results information and reproducing the statistics results such as the R-squared and errors' margins. - NonParaReg.py : Using the data from the Emi_Transition.csv file, calculates a non parametric regression and error margins using a bootstrap method. This file needs to be run on Python 2 because of the presence of the pyqt_fit library. - Regression_Emigration_OriginGDP.py : it produces a non linear regression estimation of the migration transition fucntion. It uses the data from NLS_wRfg_pbDataF_2019D.csv together with the data on the refugee flows from BilRefFlows.csv. The regression results together with the statistical analysis results such as the R-squared are printed out at the end. - Regression_from_Stocks.py : it uses the RegFromStocksData.csv file. Defines two different equations to estimate, via the least_squares method in python.optimize, one for the return flows and the other one for emigration from PoB. At the end it prints out the results of the estimation along with the results of the statistical analysis.