--- license: gpl-3.0 language: - en pretty_name: 'Deep learning four decades of human migration: datasets' tags: - arXiv:2506.22821 --- Deep learning four decades of human migration: datasets --- This repository contains all migration flow estimates associated with the paper [_"Deep learning four decades of human migration."_](https://arxiv.org/abs/2506.22821) Evaluation code, training data, trained neural networks, and smaller flow datasets are available in the [main GitHub repository](https://github.com/ThGaskin/Migration_flows), which also provides detailed instructions on data sourcing. Due to file size limits, the larger datasets are archived here. The repository contains three folders: # Estimates This folder contains all the migration estimates. Data is available in both NetCDF (`.nc`) and CSV (`.csv`) formats. The NetCDF format is more compact and pre-indexed, making it suitable for large files. In Python, datasets can be opened as [`xarray.Dataset`](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html) objects, enabling coordinate-based data selection. Each dataset uses the following coordinate conventions: * **Year**: 1990–2023 * **Birth ISO**: Country of birth (UN ISO3) * **Origin ISO**: Country of origin (UN ISO3) * **Destination ISO**: Destination country (UN ISO3) * **Country ISO**: Used for net migration data (UN ISO3) The following data files are provided: * **T.nc**: Full table of flows disaggregated by country of birth. Dimensions: Year, Birth ISO, Origin ISO, Destination ISO * **flows.nc**: Total origin-destination flows (equivalent to `T` summed over Birth ISO). Dimensions: Year, Origin ISO, Destination ISO * **net\_migration.nc**: Net migration data by country. Dimensions: Year, Country ISO * **stocks.nc**: Stock estimates for each country pair. Dimensions: Year, Origin ISO (corresponding to Birth ISO), Destination ISO * **test\_flows.nc**: Flow estimates on a randomly selected set of test edges, used for model validation Additionally, two CSV files are provided for convenience: * **mig\_unilateral.csv**: Unilateral migration estimates per country, comprising: * `imm`: Total immigration flows * `emi`: Total emigration flows * `net`: Net migration * `imm_pop`: Total immigrant population (non-native-born) * `emi_pop`: Total emigrant population (living abroad) * **mig\_bilateral.csv**: Bilateral flow data, comprising: * `mig_prev`: Total origin-destination flows * `mig_brth`: Total birth-destination flows, where `Origin ISO` reflects place of birth Each dataset includes a `mean` variable (mean estimate) and a `std` variable (standard deviation of the estimate). An ISO3 conversion table is also provided. # Data The `Data` contains all the data used to train, evaluate, and test the neural network. It is stored thematically in different folders, and most folders again contains its own `README` file to further explain the specific sources and imputation methods. All data is given *both* as a `.csv` file and a `.nc` file, and follows the ISO3-naming convention outlined in the main README. ## Training_data This folder contains all the tensors used to train the neural network. All data is given as a PyTorch tensor (`.pt`) and can be loaded using `torch.load()`. The folder contains targets, weights, masks, input covariates (scaled and unscaled), and the edge indices of each input. See the folder README for further details. ## Net migration (`Net_migration`) This folder contains net migration data, sourced from national statistical offices, together with a list of sources and the UN WPP net migration figures. ## GDP indicators (`GDP_data`) This folder contains data on GDP/capita, GDP growth, nominal GDP, and other GDP-related indicators for all countries and years included in the training period. ## Gravity covariates (`Gravity_datasets`) ## Demographic indicators (`UN_WPP_data`) ## Migrant stocks (`UN_stock_data`) ## Refugee figures (`UNHCR_data`) Total number of refugees, asylum-seekers, and other people in need of international protection, taken from the [UNHCR dataset](https://www.unhcr.org/refugee-statistics/download). ## Conflict deaths (`UCDP_data`) This folder contains data on deaths in conflict provided by [UCDP Georeferenced Event](https://ucdp.uu.se/downloads/index.html#ged_global) dataset. NaN values are filled with 0. ## Bilateral flows (`Flow_data`) # Trained networks Contains the ensemble of trained neural networks