Working with census data – census 2022 microdata
Microdata are small samples of data that provide “record-level” information. This means the data provide information about individuals or households.
Microdata allow researchers to see combinations of information that they can’t normally see with standard census tables. Microdata also allow researchers to use more complex statistical methods in their analyses.
This blog provides information about five microdata products that we are releasing for Scotland’s Census 2022. These products include:
- A 1% Teaching File sample, for use in education.
- Two 5% Safeguarded samples, available through the UK Data Service.
- Two 10% Secure samples, which will be available through the ONS Secure Research Service soon.
All our microdata products have robust steps in place to preserve privacy. More detailed microdata have appropriately stronger access restrictions and security arrangements.
1% Teaching File
In December 2025, we released the Census 2022 Teaching File. You can download the Teaching File and a user guide for it here.
The Teaching File is an anonymised sample of 1% of census records. It is less detailed than other microdata products. This helps to protect the private information of people in the census. Anyone can download and use the Teaching File.
The Teaching File is designed for teachers and educators. You can use the Teaching File to teach and learn about geography, demography, and the Census. The Teaching File is a good resource for students to get familiar with the look and feel of census data, and with using census data in their analyses.
5% Safeguarded samples
In November 2025, we released two Safeguarded microdata samples through the UK Data Service. These are available to registered users.
The Safeguarded files are anonymised samples of 5% of census records. The two files differ in geographic and variable detail.
The Regional sample has higher variable detail but lower geographic detail. The lowest level of geography in the Regional sample is country (Scotland). The Regional sample includes some variables that aren’t available in the Grouped Local Authority file, including variables on military service and Scots and Gaelic language skills. The Regional sample also includes more detailed versions of many variables that are available in both samples.
The Grouped Local Authority sample has lower variable detail but higher geographic detail. The lowest level of geography in the Grouped Local Authority sample is Grouped Local Authority. This means you can break the data down by Local Authority or by groups of small and less populous Local Authorities. Because of this, the sample includes less variable detail than the Regional sample.
The Regional sample is better for looking in detail at the population of all of Scotland. The Grouped Local Authority sample is better for looking at how populations vary in different areas of the country.
10% Secure samples
Lastly, we have the Secure microdata samples. These samples aren’t out yet. We expect them to be available soon. The Secure microdata samples will be available through the ONS Secure Research Service (SRS).
- Find out more about applying for an accredited project through the Project Accreditation Service for SRS.
The Secure samples are pseudonymised samples of 10% of census records. There are two Secure microdata samples. The Individual sample provides information on individuals. The Household sample provides information on households and the people who live in them.
The Secure samples provide more variable detail than any other microdata products. Both samples provide geographic information down to Local Authority level. The Household sample allows you to link records within the same household or family. This level of detail lets researchers use these samples to look at many complex research questions.
Because the Secure samples are the most detailed, they also have the highest levels of security. Researchers can only access the Secure samples through the ONS Secure Research Service. This is a secure research environment, with protections to ensure the safety of personal data.
Comparability with 2011 microdata
We previously created 1%, 5% and 10% microdata samples for Census 2011.
Our Census 2022 microdata products are designed to be as close as possible to the equivalent Census 2011 products. Where possible, we have kept the variables included in Census 2011 with the same coding. This makes it easier to perform the same analysis across both census years and compare the results.
By looking at the Census 2011 and Census 2022 microdata side-by-side, we can see a snapshot of how Scotland’s population has changed over time.
Find out more
You can find out more about census microdata and how to access it on our Microdata page.