How to download data
Statistics.gov.scot offers a variety of ways to download and share data. This guide tells you how to:
- Download an entire dataset
- Download data from a table
- Download the contents of a data cart
This guide does not explore accessing data via APIs (application programming interfaces). We'll be publishing a guide about using the API shortly, which will provide more information about machine readable data.
Download an entire Dataset
Watch the video: How to Download a Dataset as CSV.
Once you've found the dataset you're interested in, the dataset page has a link at the bottom of the page which will allow you to download the entire dataset. For example:
An entire dataset download includes all available areas, all time periods, and all other dimensions and could result in a very large file.
You can download the entire dataset in:
- CSV format: A comma separated values file, which can be opened in many applications, such as Excel, LibreOffice, or Google Spreadsheets. The file has one row per observation, and each dimension in a separate column. Also known as the Tidy Data format.
- N-triples format: This format is for technical users and software developers. N-triples is a serialisation of RDF and allows anyone to load the dataset into another RDF database (also known as a triple-store or graph database).
For our largest datasets, a download won’t be available but you can filter the data to a table view and download the selected subset of data as CSV. Alternatively, you can contact us at firstname.lastname@example.org and we will send you the full dataset.
Download data from a table
Watch the video: How to Download a Table of Data.
Once you’ve filtered a dataset to generate a table, you should see something like this.
Below the data table, and the list of relevant dimensions and reference areas, there is a download section:
Here, we can choose to download the data that we have in the table above, in CSV format by clicking on the CSV button next to ‘This slice, as a spreadsheet’.
Downloading the contents of a Data Cart
Once you've made and saved a data cart, you can download its contents as CSV.
Download an entire dataset
- Find the dataset you want
- Scroll down the page, past the dimensions
- Click on the button to download the entire dataset
Download data from a table
- Get to a table view of the data
- Scroll down, past the snapshot of the spreadsheet and the table of dimensions
- Click on the blue csv download button
Download the contents of a data cart
- Make a custom collection of data in the data cart
- Save the cart
- The option to download the cart will appear after the cart is saved. Click on the blue csv to download the cart contents.
To continue exploring our datasets go to statistics.gov.scot