Find an organisation
Install the ods cli to search the data with no SQL required. ods pull fetches and verifies the latest release. ods find lets you search by name, roles, locations and more.
Install ods
macOS & LinuxUse Homebrew. It packs things into OCI Images too!
Or install from source with cargo install --locked --git https://github.com/olizilla/ods.git
Need ods on windows? Open an issue
The ods tool converts the NHS Organisation Data Service XML open data archives into smaller, reproducible parquet files you can query with SQL. It is an independent open source project inspired by the principles of sct, the SNOMED CT CLI.
ods.fyi hosts the parquet output of the ods tool as content-addressed OCI Images to allow their verifiable distribution over a standard protocol. The datasets are republished under the same Open Government Licence v3.0 as the source.
The project is not affiliated with or endorsed by the NHS, but does aspire to be adopted there, either as a project or a set of ideas.
It shows its working
Add --sql to any ods find and it prints the query it would have run, with flags expanded into the role codes they stand for.
Run that query via duckdb against the parquet files and it returns the same rows ods find --gp returns. The ods cli lets us share useful SQL queries without making you dependent on the tool.
Download the files
Each release is 4 Parquet files, each carrying its own provenance, published as an OCI image and stored by the hash of the data. ods writes a Frictionless datapackage.json beside them, describing their schema, source and licence, and frictionless-ts can validate a release against it, files and all.
ods (or any OCI client) can download a release to your machine and verify the integrity.
| Table | Rows | Size | Contents |
|---|---|---|---|
| orgs.parquet | 371,569 | 15.6MB | Every org and site, active first. The main table |
| relationships.parquet | 770,509 | 7.5MB | ICB, Trust, PCN and parent links |
| roles.parquet | 530,351 | 4.8MB | Administrative & functional roles per org |
| successions.parquet | 24,373 | 0.3MB | Successor chains through mergers and closures |
Query it with your own tools
For one-off queries, https://ods.fyi/orgs.parquet follows the newest release and DuckDB will read it over HTTP without downloading the whole file.
pandas, Polars, R and Spark read the same files. No account, no API keys, and nothing new to install.
Provenance and reproducibility
Every release on ods.fyi can be traced to the official NHS TRUD archive it came from. The output of ods is designed and tested to ensure byte identical output for a given input archive. Rebuilding the parquet from the source is encouraged to have more people verifying those claims.
In the meantime you can just ods pull and know that the files you get match the files we published, and are a deterministic projection of the official source archives.
ods trud pull to fetch any upstream source release
zip and rebuild the parquet files with ods make. They will have the same hashes
as the release published to ods.fyi.
To check a release yourself: ods trud pull fetches and verifies the source archive, ods make rebuilds the tables, and ods trud audit compares a release
against the source XML.
Cite a release
ods cite provides a recommended academic citation format in APA 7th edition, bibtex, or csljson so you can import it into Zotero or pandoc to keep your references tidy.