SINBAD (Semantic Interoperability of Battery Data) is a Python framework for FAIR (Findable, Accessible, Interoperable, Reusable) integration of heterogeneous battery data—from laboratory experiments, industrial sensors, and simulators—into a unified semantic knowledge graph compliant with the BattINFO ontology and European Battery Passport requirements.
- Multi-source ingestion: Supports synthetic experiments, Oxford Battery Dataset (
.mat→ CSV), and NREL Battery Archive. - Structured modeling: Pydantic-based
BatteryExperimentalDataensures data integrity. - JSON-LD serialization: Semantic documents with BattINFO/EMMO/SOSA context and raw file traceability.
- MongoDB storage: Persistent storage with provenance metadata (
source,ingestion_date,rawDataFile). - Knowledge Graph: Builds RDF graphs (Turtle/XML) from JSON-LD using ontologies.
- Querying: SPARQL support and interactive Streamlit dashboard.
- Extensible: Add new data sources via
BaseAdapter.
git clone https://github.com/daimoners/sinbad.git
cd sinbad
pip install -e ".[dashboard,dev]"Create a .env file:
MONGODB_URI=mongodb://localhost:27017
MONGODB_DB=sinbad_db
MONGODB_COLLECTION=sinbad_data
SINBAD_NAMESPACE=https://w3id.org/sinbad/data./run_demo.sh# Generate synthetic experiments
python scripts/generate_data.py --type synthetic --count 3
# Ingest into MongoDB
sinbad ingest synthetic examples/synthetic_experiments/metadata
# Build Knowledge Graph
sinbad build-kg --output output/unified_kg.rdf --format xmlOption A: CLI SPARQL
SPARQL (see scripts/query_rdf_sample.py)
Option B: Web Dashboard
sinbad dashboard --kg output/unified_kg.rdfThen open http://localhost:8501.
Raw Data (JSON+CSV / .mat / CSV)
↓
Adapter → BatteryExperimentalData (Pydantic)
↓
JSONLDWriter → JSON-LD with @context
↓
MongoDB (with _metadata)
↓
KG Builder → RDF Graph (BattINFO + EMMO + SOSA)
↓
SPARQL / Streamlit Dashboard
sinbad/
├── src/sinbad/ # Core framework
│ ├── ai/ # ML dataset extraction & training
│ ├── cli/ # Typer-based CLI
│ ├── core/ # Models, config, JSON-LD context
│ ├── graph/ # Ontology resolver, KG builder
│ ├── io/ # Adapters and serializers
│ ├── storage/ # MongoDB backend
│ └── dashboard/ # Streamlit app
├── scripts/ # Data generation & pipeline utilities
├── examples/ # Sample datasets
├── assets/ontology/ # Cached ontologies (BattINFO, SINBAD extension)
├── docs/ # Sphinx documentation
└── output/ # Generated KG, CSV, plots
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Write tests
- Submit a pull request
Full API and user guides are available at:
👉 https://sinbad.readthedocs.io
To build locally:
cd docs
make htmlDistributed under the MIT License. See LICENSE for details.
- BattINFO Ontology – developed by the BIG-MAP initiative.
- EMMO – European Materials Modelling Ontology.
- NREL & Oxford University – for open battery datasets.
For questions or collaboration:
DAIMON Team - CNR-ISMN Bologna, Italy – daimoners@gmail.com
SINBAD v1.0 – Enabling semantic interoperability for the battery data ecosystem. 🔋🌍
