Schema definitions
Table Schema is a standard for writing data schemas. It allows for a formal definition of what the columns should be in a dataset, and what type of data can be in each column.
This allows us to validate data with tools that can check whether files match the specified schema.
For our public library data, each dataset has its own schema definition file. All schemas in v2.0.0 use:
- Lowercase field names (
name): snake_case machine identifiers used for CSV headers and database columns (e.g.local_authority,local_authority_code,library_name). - Friendly field titles (
title): human-readable display labels for user interfaces, data entry forms, and reports (e.g.Local authority,Local authority code,Library name). - Relational integrity: explicit
primaryKeyandforeignKeyslinking child records vialocal_authority_codeto the centrallibrary-servicesregistry. - Full LibraryCommons Alignment: complete 62-field
libraries.jsonschema (including accessibility, modern spaces, and branch URLs) and 52-fieldlibrary-services.jsonschema. - Frictionless Compliance: formal top-level metadata,
homepage, and explicitmissingValues: [""]across all schemas.
Current schemas in development can be viewed using the links below:
- Library services
- Libraries
- Events
- Loans
- Membership
- Mobile library stops
- Physical visits
- Stock summary
Version archive
Completed releases are archived by semantic version in the archive folder:
- v2.0.0 (Current / Release candidate): Upgrades all schemas to standard lowercase
nameidentifiers with friendlytitlelabels; enhances validation rules including non-negative counts, UPRN bounds, coordinate ranges, and expanded^[ELMNSW][0-9]{8}$code patterns; and adds full support for LibraryCommons project requirements. - v1.0.0: Added master
library-services.jsonregistry with all 208 UK authorities, extendedlibraries.jsonto 51 fields with coordinates, operational status, ACE co-locations, WiFi breakdown, and accessibility facilities, standardizedLocal authority codewith foreign keys across all schemas, and fully alignedmobile-library-stops.json. - v0.3.0: Added
events.json,libraries.json,loans.json,membership.json,physical_visits.json, andstock_summary.json. - v0.2.0: Added
library-locations-survey.json. - v0.1.0: Initial release with
mobile-library-stops.json.