Shared code for Longitudinal Education Outcomes now available
Categories: ADR England, Office for National Statistics, Children, young people & education
8 April 2026
New shared code is available to help users prepare ‘research-ready’ data from the large-scale Longitudinal Educational Outcomes (LEO) dataset in the ONS Secure Research Service (SRS). Developed by a team at University College London (UCL), the code focuses on using SQL to extract and link variables, and is available in the SRS Code Library.
The LEO standard extract is a major administrative data product containing longitudinal data on the education, employment, benefits, and earnings of English school pupils and college and university students. It is a unique source of information, with the potential to provide transformative insights into the long-term labour market outcomes and educational pathways of approximately 38 million learners in England.
A high proficiency in SQL is required by research teams when working with LEO tables in the SRS. The UCL team are developing resources to support researchers to use the LEO data effectively. This includes running training courses to increase understanding of the LEO data, developing ‘low fidelity’ synthetic data and creating the shared code. The ADR UK Learning Hub also provides guidance using SQL in the SRS.
Their code supports selection and linkage of tables and variables in the LEO I2 standard extract using SQL. Users can follow the exemplars provided in the code to build confidence to create their own dataset, ready for their analyses. Answers to frequently asked questions about LEO, including applying for access, are available on the SRS catalogue record.
The LEO code is available in the SRS Code Library, where researchers can share and reuse code to make projects more efficient, reproducible, and collaborative. The Code Library hosts disclosure-reviewed code covering data cleaning routines, variable derivation, and preparatory scripts. It is available to all accredited researchers with live SRS projects. To date, 57 unique users have accessed the shared LEO code in the past six months.
We are interested to hear from researchers who have used code in the library. For any queries about this code, or about how to contribute your own code, please consult our webpages or contact Statistical.Support@ons.gov.uk.