Guide 4 — The semantic layer#
This guide examines the JSON-LD that BattINFO produces, explains how it connects to EMMO, and shows how to work with it using RDF tools.
Estimated time: 20 minutes Prerequisites: Guide 2 or Guide 3
[1]:
import json
import warnings
from pathlib import Path
SCRATCH = Path("_scratch/guide-04")
SCRATCH.mkdir(parents=True, exist_ok=True)
from battinfo import CellSpec, publish
from battinfo.api import publish_record
cell_spec = CellSpec(
manufacturer="A123 Systems",
model="ANR26650M1-B",
format="cylindrical",
chemistry="Li-ion",
positive_electrode_basis="LFP",
negative_electrode_basis="graphite",
size_code="R26650",
properties={
"nominal_capacity": {"value": 2.5, "unit": "Ah"},
"nominal_voltage": {"value": 3.3, "unit": "V"},
"rated_energy": {"value": 8.25, "unit": "Wh"},
"mass": {"value": 76.0, "unit": "g"},
"diameter": {"value": 26.0, "unit": "mm"},
"height": {"value": 65.0, "unit": "mm"},
"internal_resistance":{"value": 6.0, "unit": "mΩ"},
"cycle_life": {"value_text": ">1000", "unit": "count"},
},
)
result = publish(cell_spec, destination="local", root=SCRATCH)
output = publish_record(
result.debug_paths["canonical_record_path"],
target_root=SCRATCH / "resolver",
)
jsonld_path = Path(output["output_dir"], "index.jsonld")
jsonld = json.loads(jsonld_path.read_text(encoding="utf-8"))
print("Ready. IRI:", result.canonical_iri)
<repo>\src\battinfo\transform\cell_spec_node.py:337: UserWarning: semantic.value_text_only: 'cycle_life' on https://w3id.org/battinfo/spec/wckm-y5a4-he0k-2scd carries only value_text - the JSON-LD export emits no numeric quantity value for it.
property_nodes = cell_spec_property_nodes(
<repo>\src\battinfo\transform\cell_spec_node.py:337: UserWarning: semantic.value_text_only: 'cycle_life' on https://w3id.org/battinfo/spec/wckm-y5a4-he0k-2scd carries only value_text - the JSON-LD export emits no numeric quantity value for it.
property_nodes = cell_spec_property_nodes(
<repo>\src\battinfo\transform\cell_spec_node.py:337: UserWarning: semantic.value_text_only: 'cycle_life' on https://w3id.org/battinfo/spec/wckm-y5a4-he0k-2scd carries only value_text - the JSON-LD export emits no numeric quantity value for it.
property_nodes = cell_spec_property_nodes(
<repo>\src\battinfo\transform\cell_spec_node.py:337: UserWarning: semantic.value_text_only: 'cycle_life' on https://w3id.org/battinfo/spec/wckm-y5a4-he0k-2scd carries only value_text - the JSON-LD export emits no numeric quantity value for it.
property_nodes = cell_spec_property_nodes(
Ready. IRI: https://w3id.org/battinfo/spec/wckm-y5a4-he0k-2scd
The full resolver JSON-LD#
[2]:
print(json.dumps(jsonld, indent=2))
{
"@context": [
"https://w3id.org/emmo/domain/battery/context",
{
"schema": "https://schema.org/",
"csvw": "http://www.w3.org/ns/csvw#",
"battinfo": "https://w3id.org/battinfo/",
"skos": "http://www.w3.org/2004/02/skos/core#"
}
],
"@type": [
"BatteryCellSpecification",
"schema:CreativeWork"
],
"@id": "https://w3id.org/battinfo/spec/wckm-y5a4-he0k-2scd",
"schema:identifier": "wckm-y5a4-he0k-2scd",
"schema:name": "A123 Systems ANR26650M1-B",
"schema:model": "ANR26650M1-B",
"schema:manufacturer": {
"@type": "schema:Organization",
"schema:name": "A123 Systems"
},
"schema:url": "https://www.battery-genome.org/registry/spec/wckm-y5a4-he0k-2scd",
"isDescriptionFor": {
"@type": [
"BatteryCell",
"CylindricalBattery",
"LithiumIonBattery",
"LithiumIonIronPhosphateBattery",
"LithiumIonGraphiteBattery"
],
"skos:prefLabel": "A123 Systems ANR26650M1-B"
},
"schema:size": "R26650",
"schema:schemaVersion": "0.2.0",
"hasProperty": [
{
"@type": [
"NominalCapacity",
"ConventionalProperty"
],
"skos:prefLabel": "NominalCapacity",
"hasNumericalPart": {
"@type": "RealData",
"hasNumberValue": 2.5
},
"hasMeasurementUnit": "https://w3id.org/emmo#AmpereHour"
},
{
"@type": [
"NominalVoltage",
"ConventionalProperty"
],
"skos:prefLabel": "NominalVoltage",
"hasNumericalPart": {
"@type": "RealData",
"hasNumberValue": 3.3
},
"hasMeasurementUnit": "https://w3id.org/emmo#Volt"
},
{
"@type": [
"NominalEnergy",
"ConventionalProperty"
],
"skos:prefLabel": "NominalEnergy",
"hasNumericalPart": {
"@type": "RealData",
"hasNumberValue": 8.25
},
"hasMeasurementUnit": "https://w3id.org/emmo#WattHour"
},
{
"@type": [
"Mass",
"ConventionalProperty"
],
"skos:prefLabel": "Mass",
"hasNumericalPart": {
"@type": "RealData",
"hasNumberValue": 76.0
},
"hasMeasurementUnit": "https://w3id.org/emmo#Gram"
},
{
"@type": [
"Diameter",
"ConventionalProperty"
],
"skos:prefLabel": "Diameter",
"hasNumericalPart": {
"@type": "RealData",
"hasNumberValue": 26.0
},
"hasMeasurementUnit": "https://w3id.org/emmo#MilliMetre"
},
{
"@type": [
"Height",
"ConventionalProperty"
],
"skos:prefLabel": "Height",
"hasNumericalPart": {
"@type": "RealData",
"hasNumberValue": 65.0
},
"hasMeasurementUnit": "https://w3id.org/emmo#MilliMetre"
},
{
"@type": [
"InternalResistance",
"ConventionalProperty"
],
"skos:prefLabel": "InternalResistance",
"hasNumericalPart": {
"@type": "RealData",
"hasNumberValue": 6.0
},
"hasMeasurementUnit": "https://w3id.org/emmo#MilliOhm"
},
{
"@type": [
"CycleLife",
"ConventionalProperty"
],
"skos:prefLabel": "CycleLife",
"schema:value": ">1000",
"hasMeasurementUnit": "https://w3id.org/emmo#EMMO_5ebd5e01_0ed3_49a2_a30d_cd05cbe72978"
}
],
"dcterms:source": {
"@type": "prov:Entity",
"dcterms:type": "datasheet",
"prov:generatedAtTime": "2026-07-08T22:02:18+00:00"
}
}
@context#
Maps short names to full IRIs. Every term — BatteryCell, hasNumericalPart, NominalCapacity — resolves to a UUID-based IRI in the EMMO domain-battery ontology. BattINFO bundles a local copy so processing works offline.
@id#
The permanent IRI for this cell spec, resolvable at https://w3id.org/battinfo/spec/{uid}.
@type stacking#
[3]:
print("@type classes:")
for t in jsonld["@type"]:
print(f" {t}")
@type classes:
BatteryCellSpecification
schema:CreativeWork
The specification node (BatteryCellSpecification) carries two types:
Vocabulary |
Type |
Rationale |
|---|---|---|
EMMO |
|
Information entity describing a class of cells |
schema.org |
|
The specification document as a creative artifact |
The physical EMMO classes derived from cell-spec fields are placed on an isDescriptionFor anonymous node:
Source field |
Physical EMMO class (on |
|---|---|
|
|
|
|
|
|
|
|
(always) |
|
Placing physical types on isDescriptionFor is semantically correct: the specification is an information entity, not a physical cell. The old pattern (putting BatteryCell directly on the specification @type) implied the specification IS a physical cell, which is wrong.
No manual annotation — derived entirely from plain-text field values.
hasProperty — the canonical EMMO quantity pattern#
isDescriptionFor — where physical EMMO types live#
The resolver JSON-LD above is a lightweight discovery document — it omits the physical type stacking to keep file size small. The full descriptor JSON-LD (produced by to_jsonld) includes an isDescriptionFor anonymous node that carries the physical EMMO classes:
This placement is semantically correct: the specification is an information entity, not a physical cell. Putting BatteryCell on the specification @type would assert the specification IS a physical cell — which is wrong.
hasDescription — the reverse link from cell instance to specification#
Cell instances (physical objects with serial numbers) carry hasDescription pointing to the specification IRI, plus schema:isVariantOf for schema.org alignment:
The directionality reflects how data is created: the cell spec is registered first and given a stable IRI; individual cells with serial numbers are created later and reference it. Both hasDescription (EMMO) and schema:isVariantOf (schema.org) express the same relationship in their respective vocabularies.
[4]:
# Show isDescriptionFor from the full descriptor pipeline
from battinfo.transform.json_to_jsonld import _descriptor_specification_to_jsonld
spec = {
"format": "cylindrical",
"chemistry": "Li-ion",
"positive_electrode_basis": "LFP",
"negative_electrode_basis": "graphite",
}
node = _descriptor_specification_to_jsonld(spec)
print("Specification @type:", node["@type"])
print("isDescriptionFor @type:", node["isDescriptionFor"]["@type"])
Specification @type: ['BatteryCellSpecification', 'schema:CreativeWork']
isDescriptionFor @type: ['BatteryCell', 'CylindricalBattery', 'LithiumIonBattery', 'LithiumIonIronPhosphateBattery', 'LithiumIonGraphiteBattery']
[5]:
print("Quantitative properties:")
for prop in jsonld.get("hasProperty", []):
types = prop["@type"]
class_name = types[0] if isinstance(types, list) else types
value = prop.get("hasNumericalPart", {}).get("hasNumberValue")
unit = prop.get("hasMeasurementUnit", "").split("#")[-1]
print(f" {class_name}: {value} ({unit})")
Quantitative properties:
NominalCapacity: 2.5 (AmpereHour)
NominalVoltage: 3.3 (Volt)
NominalEnergy: 8.25 (WattHour)
Mass: 76.0 (Gram)
Diameter: 26.0 (MilliMetre)
Height: 65.0 (MilliMetre)
InternalResistance: 6.0 (MilliOhm)
CycleLife: None (EMMO_5ebd5e01_0ed3_49a2_a30d_cd05cbe72978)
The pattern is:
hasProperty → NominalCapacity, ConventionalProperty
├── hasNumericalPart → RealData → hasNumericalValue: 2.5
└── hasMeasurementUnit: <EMMO AmpereHour IRI>
This is the canonical EMMO quantity pattern — identical across all EMMO domain modules.
Validating JSON-LD#
[6]:
from battinfo.validate.jsonld import validate_jsonld_report
report = validate_jsonld_report(jsonld)
print("ok:", report.ok)
for issue in report.issues:
print(f" [{issue.severity}] {issue.code}: {issue.message}")
ok: True
Check |
What fails |
|---|---|
|
Bare |
RDF parse |
JSON-LD rdflib cannot parse into a valid RDF dataset |
URDNA2015 |
JSON-LD that cannot be canonically normalised |
Loading into an RDF graph#
[7]:
from rdflib import Graph
g = Graph()
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning, module="rdflib")
g.parse(str(jsonld_path), format="json-ld")
print(f"Triple count: {len(g)}")
Triple count: 84
[8]:
# All triples in the graph
for s, p, o in sorted(g):
s_l = str(s).split("/")[-1].split("#")[-1]
p_l = str(p).split("/")[-1].split("#")[-1]
o_l = str(o).split("/")[-1].split("#")[-1]
print(f" {s_l} → {p_l} → {o_l}")
N02ec34e13aa140f29bb76d84152f352b → type → EMMO_d8aa8e1f_b650_416d_88a0_5118de945456
N02ec34e13aa140f29bb76d84152f352b → type → electrochemistry_9bf40017_3f58_4030_ada7_cb37a3dfda2d
N02ec34e13aa140f29bb76d84152f352b → prefLabel → InternalResistance
N02ec34e13aa140f29bb76d84152f352b → EMMO_8ef3cd6d_ae58_4a8d_9fc0_ad8f49015cd0 → N29a0ffca9c5c48c28e1959b033109536
N02ec34e13aa140f29bb76d84152f352b → EMMO_bed1d005_b04e_4a90_94cf_02bc678a8569 → MilliOhm
N048ee50c7a474c5892ed8e8c239059d4 → type → EMMO_d8aa8e1f_b650_416d_88a0_5118de945456
N048ee50c7a474c5892ed8e8c239059d4 → type → electrochemistry_ae782b14_88ce_4cdd_9418_12aca00be937
N048ee50c7a474c5892ed8e8c239059d4 → prefLabel → CycleLife
N048ee50c7a474c5892ed8e8c239059d4 → value → >1000
N048ee50c7a474c5892ed8e8c239059d4 → EMMO_bed1d005_b04e_4a90_94cf_02bc678a8569 → EMMO_5ebd5e01_0ed3_49a2_a30d_cd05cbe72978
N0be3e13e81d74b9bbc4d8d8a67516e35 → type → EMMO_d8aa8e1f_b650_416d_88a0_5118de945456
N0be3e13e81d74b9bbc4d8d8a67516e35 → type → electrochemistry_639b844a_e801_436b_985d_28926129ead6
N0be3e13e81d74b9bbc4d8d8a67516e35 → prefLabel → NominalVoltage
N0be3e13e81d74b9bbc4d8d8a67516e35 → EMMO_8ef3cd6d_ae58_4a8d_9fc0_ad8f49015cd0 → Nd709f09b9f014877802017cd9e955a03
N0be3e13e81d74b9bbc4d8d8a67516e35 → EMMO_bed1d005_b04e_4a90_94cf_02bc678a8569 → Volt
N1f807c9607b74d46b3f3015580f6ec2b → type → EMMO_d8aa8e1f_b650_416d_88a0_5118de945456
N1f807c9607b74d46b3f3015580f6ec2b → type → electrochemistry_19e27aa3_0970_43a6_86d3_e3cdd956134d
N1f807c9607b74d46b3f3015580f6ec2b → prefLabel → NominalEnergy
N1f807c9607b74d46b3f3015580f6ec2b → EMMO_8ef3cd6d_ae58_4a8d_9fc0_ad8f49015cd0 → N914bfb66cc4c494fbfb1a03c06c4200c
N1f807c9607b74d46b3f3015580f6ec2b → EMMO_bed1d005_b04e_4a90_94cf_02bc678a8569 → WattHour
N29a0ffca9c5c48c28e1959b033109536 → type → EMMO_18d180e4_5e3e_42f7_820c_e08951223486
N29a0ffca9c5c48c28e1959b033109536 → EMMO_faf79f53_749d_40b2_807c_d34244c192f4 → 6.0
N2a02122579e0444c9c6db1497b9a6b00 → type → EMMO_d8aa8e1f_b650_416d_88a0_5118de945456
N2a02122579e0444c9c6db1497b9a6b00 → type → electrochemistry_8abde9d0_84f6_4b4f_a87e_86028a397100
N2a02122579e0444c9c6db1497b9a6b00 → prefLabel → NominalCapacity
N2a02122579e0444c9c6db1497b9a6b00 → EMMO_8ef3cd6d_ae58_4a8d_9fc0_ad8f49015cd0 → N6d9a8273972540ffab7abbda602be857
N2a02122579e0444c9c6db1497b9a6b00 → EMMO_bed1d005_b04e_4a90_94cf_02bc678a8569 → AmpereHour
N2c54ca88908e4ba58e83699e5d068435 → type → Organization
N2c54ca88908e4ba58e83699e5d068435 → name → A123 Systems
N33d4fcbfdd3e4383a78f3a4800689baa → type → EMMO_08bcf1d6_e719_46c8_bb21_24bc9bf34dba
N33d4fcbfdd3e4383a78f3a4800689baa → type → EMMO_d8aa8e1f_b650_416d_88a0_5118de945456
N33d4fcbfdd3e4383a78f3a4800689baa → prefLabel → Height
N33d4fcbfdd3e4383a78f3a4800689baa → EMMO_8ef3cd6d_ae58_4a8d_9fc0_ad8f49015cd0 → Nd0d412b06634464c9b7f043ce63ece7a
N33d4fcbfdd3e4383a78f3a4800689baa → EMMO_bed1d005_b04e_4a90_94cf_02bc678a8569 → MilliMetre
N557f0c79202a4a7aa3a66344df0a8615 → type → EMMO_d8aa8e1f_b650_416d_88a0_5118de945456
N557f0c79202a4a7aa3a66344df0a8615 → type → EMMO_ed4af7ae_63a2_497e_bb88_2309619ea405
N557f0c79202a4a7aa3a66344df0a8615 → prefLabel → Mass
N557f0c79202a4a7aa3a66344df0a8615 → EMMO_8ef3cd6d_ae58_4a8d_9fc0_ad8f49015cd0 → Nc899b98a72fb430abf097b74d2dce7ef
N557f0c79202a4a7aa3a66344df0a8615 → EMMO_bed1d005_b04e_4a90_94cf_02bc678a8569 → Gram
N60729cd700894ebfb2e65e7fdb818135 → type → battery_04a4e5a4_e6fd_43af_b1ca_4a16d5f8886c
N60729cd700894ebfb2e65e7fdb818135 → type → battery_2018e0da_4c25_46e9_83db_38431fc81ce0
N60729cd700894ebfb2e65e7fdb818135 → type → battery_68ed592a_7924_45d0_a108_94d6275d57f0
N60729cd700894ebfb2e65e7fdb818135 → type → battery_96addc62_ea04_449a_8237_4cd541dd8e5f
N60729cd700894ebfb2e65e7fdb818135 → type → battery_ac604ecd_cc60_4b98_b57c_74cd5d3ccd40
N60729cd700894ebfb2e65e7fdb818135 → prefLabel → A123 Systems ANR26650M1-B
N6d9a8273972540ffab7abbda602be857 → type → EMMO_18d180e4_5e3e_42f7_820c_e08951223486
N6d9a8273972540ffab7abbda602be857 → EMMO_faf79f53_749d_40b2_807c_d34244c192f4 → 2.5
N6e9502cf28124a3aae53831aab0d6755 → type → datasheet
N6e9502cf28124a3aae53831aab0d6755 → type → Entity
N6e9502cf28124a3aae53831aab0d6755 → generatedAtTime → 2026-07-08T22:02:18+00:00
N914bfb66cc4c494fbfb1a03c06c4200c → type → EMMO_18d180e4_5e3e_42f7_820c_e08951223486
N914bfb66cc4c494fbfb1a03c06c4200c → EMMO_faf79f53_749d_40b2_807c_d34244c192f4 → 8.25
Nb8633a93ba784a47af62c085ac328c34 → type → EMMO_c1c8ac3c_8a1c_4777_8e0b_14c1f9f9b0c6
Nb8633a93ba784a47af62c085ac328c34 → type → EMMO_d8aa8e1f_b650_416d_88a0_5118de945456
Nb8633a93ba784a47af62c085ac328c34 → prefLabel → Diameter
Nb8633a93ba784a47af62c085ac328c34 → EMMO_8ef3cd6d_ae58_4a8d_9fc0_ad8f49015cd0 → Ne089b35cd4f94c32834dcb43dba396eb
Nb8633a93ba784a47af62c085ac328c34 → EMMO_bed1d005_b04e_4a90_94cf_02bc678a8569 → MilliMetre
Nc899b98a72fb430abf097b74d2dce7ef → type → EMMO_18d180e4_5e3e_42f7_820c_e08951223486
Nc899b98a72fb430abf097b74d2dce7ef → EMMO_faf79f53_749d_40b2_807c_d34244c192f4 → 76.0
Nd0d412b06634464c9b7f043ce63ece7a → type → EMMO_18d180e4_5e3e_42f7_820c_e08951223486
Nd0d412b06634464c9b7f043ce63ece7a → EMMO_faf79f53_749d_40b2_807c_d34244c192f4 → 65.0
Nd709f09b9f014877802017cd9e955a03 → type → EMMO_18d180e4_5e3e_42f7_820c_e08951223486
Nd709f09b9f014877802017cd9e955a03 → EMMO_faf79f53_749d_40b2_807c_d34244c192f4 → 3.3
Ne089b35cd4f94c32834dcb43dba396eb → type → EMMO_18d180e4_5e3e_42f7_820c_e08951223486
Ne089b35cd4f94c32834dcb43dba396eb → EMMO_faf79f53_749d_40b2_807c_d34244c192f4 → 26.0
wckm-y5a4-he0k-2scd → source → N6e9502cf28124a3aae53831aab0d6755
wckm-y5a4-he0k-2scd → type → CreativeWork
wckm-y5a4-he0k-2scd → type → battery_1cfbba6c_8824_4932_a23e_2141483acef7
wckm-y5a4-he0k-2scd → identifier → wckm-y5a4-he0k-2scd
wckm-y5a4-he0k-2scd → manufacturer → N2c54ca88908e4ba58e83699e5d068435
wckm-y5a4-he0k-2scd → model → ANR26650M1-B
wckm-y5a4-he0k-2scd → name → A123 Systems ANR26650M1-B
wckm-y5a4-he0k-2scd → schemaVersion → 0.2.0
wckm-y5a4-he0k-2scd → size → R26650
wckm-y5a4-he0k-2scd → url → wckm-y5a4-he0k-2scd
wckm-y5a4-he0k-2scd → EMMO_e1097637_70d2_4895_973f_2396f04fa204 → N02ec34e13aa140f29bb76d84152f352b
wckm-y5a4-he0k-2scd → EMMO_e1097637_70d2_4895_973f_2396f04fa204 → N048ee50c7a474c5892ed8e8c239059d4
wckm-y5a4-he0k-2scd → EMMO_e1097637_70d2_4895_973f_2396f04fa204 → N0be3e13e81d74b9bbc4d8d8a67516e35
wckm-y5a4-he0k-2scd → EMMO_e1097637_70d2_4895_973f_2396f04fa204 → N1f807c9607b74d46b3f3015580f6ec2b
wckm-y5a4-he0k-2scd → EMMO_e1097637_70d2_4895_973f_2396f04fa204 → N2a02122579e0444c9c6db1497b9a6b00
wckm-y5a4-he0k-2scd → EMMO_e1097637_70d2_4895_973f_2396f04fa204 → N33d4fcbfdd3e4383a78f3a4800689baa
wckm-y5a4-he0k-2scd → EMMO_e1097637_70d2_4895_973f_2396f04fa204 → N557f0c79202a4a7aa3a66344df0a8615
wckm-y5a4-he0k-2scd → EMMO_e1097637_70d2_4895_973f_2396f04fa204 → Nb8633a93ba784a47af62c085ac328c34
wckm-y5a4-he0k-2scd → EMMO_f702bad4_fc77_41f0_a26d_79f6444fd4f3 → N60729cd700894ebfb2e65e7fdb818135
Combining multiple records in one graph#
[9]:
import battinfo
ws = battinfo.workspace(root=SCRATCH / "multi")
multi_spec = battinfo.CellSpec(
manufacturer="A123 Systems", model="ANR26650M1-B",
format="cylindrical", chemistry="Li-ion",
positive_electrode_basis="LFP", negative_electrode_basis="graphite",
properties={"nominal_capacity": {"value": 2.5, "unit": "Ah"}},
)
ws.add("cell", spec=multi_spec, serial_numbers=["a123-demo-multi-001"])
ws.save()
# Publish each saved record as a resolver artifact
from battinfo.api import publish_record as _publish_one
multi_records = SCRATCH / "multi" / ".battinfo" / "records" / "examples"
multi_resolver = SCRATCH / "multi-resolver"
for record_file in sorted(multi_records.rglob("*.json")):
_publish_one(record_file, target_root=multi_resolver)
jsonld_files = list(multi_resolver.rglob("index.jsonld"))
g2 = Graph()
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning, module="rdflib")
for jf in jsonld_files:
g2.parse(str(jf), format="json-ld")
print(f"Combined graph: {len(g2)} triples from {len(jsonld_files)} files")
note: using legacy records/examples/ layout (pre-0.8 workspace)
cell: a123-demo-multi-001 (IRI auto-assigned)
Saved 2 record(s) under <repo>\docs\guides\_scratch\guide-04\multi\.battinfo\records\examples:
cell spec A123 Systems ANR26650M1-B [updated] .battinfo\records\examples\cell-spec\cell-spec-e4t5-w9re-mpq6-8g7e.json
cell a123-demo-multi-001 [updated] .battinfo\records\examples\cell-instance\cell-aaqe-rvbd-c0b6-p1k3.json
Next: ws.list(verbose=True) to inspect, or ws.publish() to publish.
Combined graph: 35 triples from 2 files
Mapping tables#
BattINFO’s semantic output is driven by three curated files:
File |
Role |
|---|---|
|
JSON key → EMMO class IRI |
|
Unit string → EMMO/QUDT IRI |
|
format/chemistry/electrode → @type array |
[10]:
prop_map = json.loads(
# Repo files sit two levels up from this notebook.
Path("../../assets/mappings/domain-battery/property_map.curated.json").read_text(encoding="utf-8")
)
print(f"Property map version: {prop_map['version']}")
print(f"Curated entries: {len(prop_map['mappings'])}")
print()
for entry in prop_map["mappings"][:8]:
print(f" {entry['key']:42s} → {entry['class_pref_label']}")
print(" ...")
Property map version: 0.3.0
Curated entries: 66
ac_internal_resistance → ACInternalResistance
available_volume → Volume
calendar_life → CalendarLife
cap_assembly_weight → Mass
capacity_fade → CapacityFade
certified_usable_energy → NominalEnergy
charging_cutoff_voltage → UpperVoltageLimit
charging_temperature_max → MaximumChargingTemperature
...
Next#
Guide 5 — Descriptors: author research-grade cell descriptors and see richer electrode-level JSON-LD