A comprehensive digitization project that transforms CODATA fundamental physical constants into machine-actionable and legacy formats, enabling seamless integration with modern data science workflows, AI systems, and agent-based applications.
Digital Transformation: Convert fundamental physical constants from human-readable documents into robust, machine-readable formats (JSON, RDF/Turtle) aligned with FAIR data principles).
API-First Approach: Provide industry-standard REST APIs for programmatic access to constant definitions, values, and metadata across all CODATA releases (1998-2022).
AI & Data Science Ready: Enable seamless integration with large language models (LLMs), AI agents, and data science pipelines through structured semantic data and comprehensive query capabilities.
Robust Semantic Infrastructure: Establish a comprehensive semantic model with rich ontological relationships, associated domain knowledge, and SPARQL endpoints for advanced querying and reasoning over fundamental constants data.
Interoperability: Harmonize with existing standards (QUDT, UCUM, SI Digital Framework) and provide cross-references to enhance discoverability and integration.
- JSON: Structured hierarchical format for programmatic consumption
- RDF/Turtle: Semantic web format with full ontology (37,000+ triples)
- REST API: HTTP endpoints for real-time data access
The project implements a comprehensive semantic model with 6 core entities:
- Concepts - Taxonomic organization (SI Units, Elementary Particles, etc.)
- Quantities - Physical measurable properties
- Constants - Specific physical constants with historical values
- Units - Physical measurement units with SI/UCUM expressions
- Versions - CODATA release metadata (1998, 2002, 2006, 2010, 2014, 2018, 2022)
- ConstantValues - Measured values with uncertainties for each release
- Data Processing: Python scripts for ETL from NIST ASCII sources
- Semantic Web: RDFLib for RDF generation and validation
- SPARQL & Triple Stores: Query language and graph database support for semantic data access
- Standards: Integration with QUDT, UCUM, SI Digital Framework, Wikidata
# Download RDF dataset
wget https://github.com/codata/drum-constants/raw/main/dist/rdf/codata_constants.ttl
# Download JSON dataset
wget https://github.com/codata/drum-constants/raw/main/utils/codata_constants.json# Clone repository
git clone https://github.com/codata/drum-constants.git
cd drum-constants
# Install dependencies using uv
uv pip install -e ".[dev]"
# Run code quality checks (linting & static type checking)
uv run ruff check .
uv run pyrefly check .
# Generate RDF products from source data
uv run codata-package
# Compare QUDT constants with official CODATA values
uv run codata-compare-qudt --outdated-onlyThe RDF dataset supports rich semantic queries:
# Find all SI defining constants
PREFIX codata: <https://w3id.org/codata/fundamental/model/>
PREFIX concept: <https://w3id.org/codata/fundamental/concepts/>
SELECT ?constant ?label WHERE {
?constant a codata:Constant ;
skos:prefLabel ?label ;
codata:hasQuantity ?quantity .
?quantity dcterms:hasPart ?concept .
?concept skos:broader* concept:SIDefiningConstant .
}- 7 CODATA Releases: Complete historical coverage (1998-2022)
- 350+ Constants: All fundamental physical constants from NIST
- Multi-format: JSON, RDF datasets
- Multilingual: English and French labels
- Cross-referenced: NIST, QUDT, Wikidata identifiers
- Version Tracking: Evolution of values and uncertainties over time
The repository includes CLI utilities exposed via pyproject.toml:
codata-compare-qudt(utils/compare_qudt.py): Compares QUDT constants Turtle vocabulary (https://qudt.org/3.5.0/vocab/constant) against official CODATA values incodata_constants.json. Caches Turtle files locally and identifies whether QUDT constant values are up-to-date or match older historical CODATA releases (e.g., CODATA 2006/2018).codata-package(utils/package.py): High-precision RDF generator that serializes the dataset to Turtle (.ttl) and JSON-LD (.jsonld) with round-trip precision validation.codata-constants(utils/codata_constants.py): Converts the Google Spreadsheet / Excel workbook representation intocodata_constants.json.nist-repackage(nist/repackage.py): Parses raw NIST ASCII releases across years (1969-2022).
drum-constants/
├── pyproject.toml # Python package & CLI entrypoints configuration
├── utils/ # Data processing and verification utilities
│ ├── compare_qudt.py # QUDT vs CODATA side-by-side comparison utility
│ ├── compare_qudt.md # Documentation for QUDT comparison tool
│ ├── package.py # High-precision RDF generator
│ ├── package.md # Documentation for RDF packaging
│ ├── codata_constants.py # Excel to JSON converter
│ └── codata_constants.json# Processed dataset master
├── dist/rdf/ # Generated RDF/Turtle and JSON-LD files
├── nist/ # Raw NIST ASCII source data and parsers
└── docs/ # Semantic data model specifications
- QUDT: Quantity, Unit, Dimension, and Type integration
- UCUM: Unified Code for Units of Measure expressions
- SI Digital Framework: SI base unit relationships
- Wikidata: Cross-references for enhanced discoverability
- Dublin Core: Metadata and versioning
- SKOS: Concept organization and hierarchies
✅ Complete NIST dataset digitization (1998-2022)
✅ JSON and RDF serializations
✅ Comprehensive semantic model documentation
🔄 New API project deployment
🔄 Enhanced SPARQL endpoint
🔄 OpenAPI/Swagger documentation
🔄 Docker containerization
📅 Real-time NIST synchronization
📅 GraphQL API support
📅 Enhanced unit conversion utilities
📅 Integration with computational physics libraries
- Semantic Model Guide: Complete RDF ontology documentation
- Data Format Specifications: JSON and RDF structure documentation
- SPARQL Examples: Query patterns for common use cases
- Integration Guides: Language-specific usage examples
We welcome contributions from the global metrology and data science communities:
- Data Quality: Report inconsistencies or missing values
- Data Formats: Suggest new serialization formats or improvements
- Standards: Propose additional format integrations
- Documentation: Improve guides and examples
Data: Creative Commons Attribution 4.0 International License
Software: Apache License 2.0
This project operates under the umbrella of the CODATA Digital Representation of Units of Measure (DRUM) working group, advancing FAIR metrology across scientific disciplines. It also supports the mission and vision of the CODATA Task Group on Fundamental Physical Constants (TGFC), which maintains and disseminates internationally recommended values of fundamental physical constants.
Maintainer: Pascal Heus (CODATA DRUM Task Group)
Support: Use GitHub Issues for questions and assistance