Skip to content

Latest commit

 

History

History
110 lines (79 loc) · 5.34 KB

README.md

File metadata and controls

110 lines (79 loc) · 5.34 KB

FOOPS Score reason docs unstable

DOI

Battery Domain Ontology

domain-battery-logo

The Battery Domain Ontology is a domain of the Elementary Multiperspective Materials Ontology (EMMO), for describing battery systems, materials, methods, and data. Its primary objective is to support the creation of FAIR, Linked Data. This ontology serves as a foundational resource for harmonizing battery knowledge representation, enhancing data interoperability, and accelerating progress in battery research and innovation.

Reference documentation is available here.

Quick Start

Here is some information to help you get started working with the ontology in python and creating you own instances of Linked Data. For more information, please see the Getting Started and Examples section of the documentation.

Reference IRIs

The table below contains a quick cheat sheet of IRIs for accessing different files from the ontology The import structure is summarized in the following table:

IRI Description
https://w3id.org/emmo/domain/battery Base Asserted Ontology*
https://w3id.org/emmo/domain/battery/inferred Base Pre-Inferred Ontology*
https://w3id.org/emmo/domain/battery/latest Latest Asserted Ontology*
https://w3id.org/emmo/domain/battery/source Source of Asserted Ontology*
https://w3id.org/emmo/domain/battery/context Latest JSON-LD Context File
https://w3id.org/emmo/domain/battery/{VERSION} Version of Asserted Ontology*
https://w3id.org/emmo/domain/battery/{VERSION}/... ... follows same logic above

*IRI directs to human readable documentation if called from the web browser and to the source .ttl file if called from an application

Python

There are two common ways to work with the ontology in python: loading the ontology as a graph using rdflib or exploring the content of the ontology using EMMOntoPy. Examples of both are provided below.

rdflib

In rdflib, you can import the ontology as a graph, e.g. to run SPARQL queries:

from rdflib import Graph

# Define the IRI of the ontology
echo = "https://w3id.org/emmo/domain/battery"

# Create an empty graph
g = Graph()

# Load the ontology from the IRI
g.parse(echo, format="ttl")

# Print the number of triples in the graph
print(f"Graph has {len(g)} triples.")

EMMOntoPy

In EMMOntoPy, you can choose to import the ontology directly from the web:

from ontopy import get_ontology

# Loading from web
echo = get_ontology('https://w3id.org/emmo/domain/battery').load()

Usage

This domain ontology supports the creation of Linked Data in any RDF-supported format. Below is an example using JSON-LD to desecribe a zinc foil electrode with some creator information and properties. Please see the documentation for more examples.

{
    "@context": "https://w3id.org/emmo/domain/battery/context",
    "@type": "CR2032",
    "schema:name": "My CR2032 Coin Cell",
    "schema:manufacturer": {
       "@id": "https://www.wikidata.org/wiki/Q3041255",
       "schema:name": "SINTEF"
    },
    "hasProperty": {
       "@type": ["NominalCapacity", "ConventionalProperty"],
       "hasNumericalPart": {
          "@type": "Real",
          "hasNumericalValue": 230
        },
        "hasMeasurementUnit": "emmo:MilliAmpereHour"
     }
}

Acknowledgements

EU-Flag

This project has received support from European Union research and innovation programs, under grant agreement numbers:

License

The Battery Domain Ontology is released under the Creative Commons Attribution 4.0 International license (CC BY 4.0).