Dataset title: Spatial Inequality in Educational Attainment in Rural Scotland Author: Idris Akormadu, University of Glasgow Description: This deposit contains processed quantitative datasets used to analyse spatial inequalities in school-leaver attainment across rural and urban Scotland. The analysis examines the relationship between educational attainment, area-level deprivation and rurality using Scottish administrative data. Files included: data/main_clean_analysis_dataset.csv data/main_clean_analysis_dataset.xlsx data/plotting_dataset.csv data/plotting_dataset.xlsx documentation/main_dataset_codebook.xlsx documentation/plotting_dataset_codebook.xlsx Main dataset: The file main_clean_analysis_dataset contains attainment scores across three-year rolling periods, the latest attainment score used in the analysis, Scottish Government eight-fold rurality classification, broad rurality grouping and SIMD quintile. Plotting dataset: The file plotting_dataset contains a reduced dataset used for selected figures and visualisations. Original data sources: Scottish Government school-leaver attainment statistics. Scottish Index of Multiple Deprivation. Scottish Government Urban-Rural Classification. Scottish Government Data Zone lookup and boundary files. Software: Python, pandas, VSCode/Jupyter Notebook. Notes: These files are processed analysis datasets prepared for publication and reproducibility. Original public datasets should be cited through their original Scottish Government sources. Important: If the published article includes multilevel modelling or spatial network effects, the final model dataset containing variables such as local authority, neighbour mean attainment and network degree should also be included in this deposit. Additional modelling dataset: The deposit includes multilevel_spatial_model_dataset.csv and multilevel_spatial_model_dataset.xlsx. These files contain the main variables used for multilevel and spatial modelling, including latest attainment score, SIMD quintile, rurality classification, reference area, network degree and neighbour mean attainment. Spatial network construction: Neighbouring Data Zones were identified using a Queen contiguity approach, where areas are treated as neighbours if their geometries touch or intersect. The variable network_degree records the number of neighbouring Data Zones, while neighbour_mean_attainment records the mean attainment score among neighbouring Data Zones. Spatial file: A GeoJSON version of the multilevel/spatial model dataset is included in data/spatial_outputs where available.