© Crown copyright 2020
This publication is licensed under the terms of the Open Government Licence v3.0 except where otherwise stated. To view this licence, visit nationalarchives.gov.uk/doc/open-government-licence/version/3 or write to the Information Policy Team, The National Archives, Kew, London TW9 4DU, or email: email@example.com.
Where we have identified any third party copyright information you will need to obtain permission from the copyright holders concerned.
This publication is available at https://www.gov.uk/government/publications/recommended-open-standards-for-government/using-metadata-to-describe-csv-data
Use the CSV on the Web (CSVW) standard to add metadata to describe the contents and structure of comma-separated values (CSV) data files.
1. Summary of the standard’s use for government
CSV is a popular file format for tabular data. CSV on the Web is a World Wide Web Consortium (W3C) standard for describing parts of tabular data, including cells, rows and columns.
By using CSVW, government organisations can:
- more easily process CSVs into an annotated data model
- make CSVs easy to share and collaborate on
- make CSVs machine-readable
You should use this standard in combination with the Tabular data standard that details best practice standards when sharing CSV files.
The government chooses standards using the open standards approval process and the Open Standards Board has final approval. Read more about the process of choosing all the schema standards for tabular data.
2. How this standard meets user needs
CSVW gives you a standard way to:
- add useful metadata about CSV files
- consolidate different CSVs into one file
- load data into a data store so you can carry out queries and analysis
CSVW also reduces the number of mistakes when you use software to auto-detect column types in a CSV.
You can use the CSVW to convert a file’s existing schema to formats such as RDF and JSON. This allows you to more easily integrate files into an existing data store and transfer data across systems.
3. How to use the standard
You can use CSVW alongside other standards that the Open Standards Board have also recommended.
You can use the:
- Dublin Core Schema to add metadata that describes data for sharing within government
- schema.org Dataset when you’re publishing tabular data
You should use the RFC 4180 standard recommended by the Open Standards Board to format your CSV.
Further guidance for using CSVW with your tabular data is available from W3C.