Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimonclark committed Jan 28, 2024
1 parent 4732457 commit c66d950
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 25 deletions.
39 changes: 39 additions & 0 deletions sphinx/example_alkaline_electrochemical_cell.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Alkaline Electrochemical Cell

Check warning on line 1 in sphinx/example_alkaline_electrochemical_cell.rst

View workflow job for this annotation

GitHub Actions / updatepages

document isn't included in any toctree
=============================

This example, let's describe an instance of a simple alkaline electrochemical cell.

.. hint::

In this ontology, an ``ElectrochemicalCell`` is simply a combination of components in a holistic arrangement (i.e. two electrodes in contact with an electrolyte). Adding a case and terminals to make it a functional device makes it a ``BatteryCell`` described in the battery domain ontology.

The JSON-LD description of the material is given below:

.. tab-set::

.. tab-item:: JSON

.. code-block:: json
:linenos:
{
"@context": "https://raw.githubusercontent.com/emmo-repo/domain-electrochemistry/master/context.json",
"@type": "ElectrochemicalCell",
"hasNegativeElectrode": {
"@type": "ZincElectrode"
},
"hasPositiveElectrode": {
"@type": "ManganeseDioxideElectrode"
},
"hasElectrolyte": {
"@type": "AlkalineElectrolyte"
}
}
.. tab-item:: JSON-LD Playground

.. raw:: html

<div style="position: relative; padding-top: 56.25%; height: 0;">
<iframe src="https://json-ld.org/playground/#startTab=tab-table&json-ld=%7B%22%40context%22%3A%22https%3A%2F%2Fraw.githubusercontent.com%2Femmo-repo%2Fdomain-electrochemistry%2Fmaster%2Fcontext.json%22%2C%22%40type%22%3A%22ElectrochemicalCell%22%2C%22hasNegativeElectrode%22%3A%7B%22%40type%22%3A%22ZincElectrode%22%7D%2C%22hasPositiveElectrode%22%3A%7B%22%40type%22%3A%22ManganeseDioxideElectrode%22%7D%2C%22hasElectrolyte%22%3A%7B%22%40type%22%3A%22AlkalineElectrolyte%22%7D%7D" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" frameborder="0" allowfullscreen></iframe>
</div>
65 changes: 65 additions & 0 deletions sphinx/example_aqueous_electrolyte_KOH.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Aqueous KOH Electrolyte

Check warning on line 1 in sphinx/example_aqueous_electrolyte_KOH.rst

View workflow job for this annotation

GitHub Actions / updatepages

document isn't included in any toctree
=======================

This example, let's describe an instance of some aqueous potassium hydroxide (KOH) electrolyte with some properties. The JSON-LD description of the material is given below:

.. tab-set::

.. tab-item:: JSON

.. code-block:: json
:linenos:
{
"@context": "https://raw.githubusercontent.com/emmo-repo/domain-electrochemistry/master/context.json",
"@type": "Electrolyte",
"hasSolvent": {
"@type": "Water"
},
"hasSolute": {
"@type": "PotassiumHydroxide",
"hasProperty": {
"@type": ["AmountConcentration", "ModelledProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 7
},
"hasMeasurementUnit": "emmo:MolePerLitre"
}
},
"hasProperty": [
{
"@type": ["Density", "MeasuredProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 1.289
},
"hasMeasurementUnit": "emmo:KilogramPerLitre"
},
{
"@type": ["IonicConductivity", "MeasuredProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 65
},
"hasMeasurementUnit": "emmo:SiemensPerCentiMetre"
}
]
}
.. tab-item:: JSON-LD Playground

.. raw:: html

<div style="position: relative; padding-top: 56.25%; height: 0;">
<iframe src="https://json-ld.org/playground/#startTab=tab-table&json-ld=%7B%22%40context%22%3A%22https%3A%2F%2Fraw.githubusercontent.com%2Femmo-repo%2Fdomain-electrochemistry%2Fmaster%2Fcontext.json%22%2C%22%40type%22%3A%22Electrolyte%22%2C%22hasSolvent%22%3A%7B%22%40type%22%3A%22Water%22%7D%2C%22hasSolute%22%3A%7B%22%40type%22%3A%22PotassiumHydroxide%22%2C%22hasProperty%22%3A%7B%22%40type%22%3A%5B%22AmountConcentration%22%2C%22ModelledProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A7%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AMolePerLitre%22%7D%7D%2C%22hasProperty%22%3A%5B%7B%22%40type%22%3A%5B%22Density%22%2C%22MeasuredProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A1.289%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AKilogramPerLitre%22%7D%2C%7B%22%40type%22%3A%5B%22IonicConductivity%22%2C%22MeasuredProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A65%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3ASiemensPerCentiMetre%22%7D%5D%7D" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" frameborder="0" allowfullscreen></iframe>
</div>

This example highlights a few things:

#. **EMMO distinguishes properties according to how they were determined.** In this example, a ``ConventionalProperty`` is a property whose value is assigned by convention (e.g. from a technical specification sheet, handbook, etc.). EMMO also provides terms for ``MeasuredProperty`` for properties which were actually determined by some measurement and ``ModelledProperty`` for properties that were obtained from some model.

#. **EMMO has a specific way of expressing quantitative properties.** As shown in the example, a quantitative property has a ``@type`` that describes what kind of property it is, ``hasNumericalPart`` describes the value, and ``hasMeasurementUnit`` defines the unit. Please adhere to this format when expressing quantities in your linked data.

#. **We can re-use terms from common vocabularies like schema.org.** One of the core principles of linked data is to re-use existing vocabularies when possible. The schema.org vocabulary was developed to support internet search engines and contains terms for things that people often search for (e.g. people, organizations, products, etc.) In this case, we can re-use schema.org terms to describe the manufacturer and product.

18 changes: 9 additions & 9 deletions sphinx/example_zinc_electrode.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
Zinc Electrode
==============

This example, let's describe an instance of some zinc powder with a set of properties defined in the specification sheet from the manufacturer. This example highlights a few things:

#. **EMMO distinguishes properties according to how they were determined.** In this example, a ``ConventionalProperty`` is a property whose value is assigned by convention (e.g. from a technical specification sheet, handbook, etc.). EMMO also provides terms for ``MeasuredProperty`` for properties which were actually determined by some measurement and ``ModelledProperty`` for properties that were obtained from some model.

#. **EMMO has a specific way of expressing quantitative properties.** As shown in the example, a quantitative property has a ``@type`` that describes what kind of property it is, ``hasNumericalPart`` describes the value, and ``hasMeasurementUnit`` defines the unit. Please adhere to this format when expressing quantities in your linked data.

#. **We can re-use terms from common vocabularies like schema.org.** One of the core principles of linked data is to re-use existing vocabularies when possible. The schema.org vocabulary was developed to support internet search engines and contains terms for things that people often search for (e.g. people, organizations, products, etc.) In this case, we can re-use schema.org terms to describe the manufacturer and product.

The JSON-LD description of the material is given below:
This example, let's describe an instance of some electrode made by a specific person at a research institute using zinc foil. The electrode has properties that were determined from a combination of a specification sheet and actual measurements. The JSON-LD description of the material is given below:

.. tab-set::

Expand Down Expand Up @@ -76,3 +68,11 @@ The JSON-LD description of the material is given below:
<iframe src="https://json-ld.org/playground/#startTab=tab-canonized&json-ld=%7B%22%40context%22%3A%22https%3A%2F%2Fraw.githubusercontent.com%2Femmo-repo%2Fdomain-electrochemistry%2Fmaster%2Fcontext.json%22%2C%22%40type%22%3A%22Electrode%22%2C%22schema%3Amanufacturer%22%3A%7B%22%40id%22%3A%22https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FQ3041255%22%2C%22schema%3Aname%22%3A%22SINTEF%22%7D%2C%22schema%3Acreator%22%3A%7B%22%40id%22%3A%22https%3A%2F%2Forcid.org%2F0000-0002-8758-6109%22%2C%22schema%3Aname%22%3A%22Simon%20Clark%22%7D%2C%22hasActiveMaterial%22%3A%7B%22%40type%22%3A%5B%22Zinc%22%2C%22Foil%22%5D%7D%2C%22hasProperty%22%3A%5B%7B%22%40type%22%3A%5B%22SpecificCapacity%22%2C%22MeasuredProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A800%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AMilliAmpereHourPerGram%22%7D%2C%7B%22%40type%22%3A%5B%22Thickness%22%2C%22ConventionalProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A250%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AMicroMetre%22%7D%2C%7B%22%40type%22%3A%5B%22Diameter%22%2C%22MeasuredProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A2%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3ACentiMetre%22%7D%2C%7B%22%40type%22%3A%5B%22Mass%22%2C%22MeasuredProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A2.5%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AGram%22%7D%5D%7D" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" frameborder="0" allowfullscreen></iframe>
</div>

This example highlights a few things:

#. **EMMO distinguishes properties according to how they were determined.** In this example, a ``ConventionalProperty`` is a property whose value is assigned by convention (e.g. from a technical specification sheet, handbook, etc.). EMMO also provides terms for ``MeasuredProperty`` for properties which were actually determined by some measurement and ``ModelledProperty`` for properties that were obtained from some model.

#. **EMMO has a specific way of expressing quantitative properties.** As shown in the example, a quantitative property has a ``@type`` that describes what kind of property it is, ``hasNumericalPart`` describes the value, and ``hasMeasurementUnit`` defines the unit. Please adhere to this format when expressing quantities in your linked data.

#. **We can re-use terms from common vocabularies like schema.org.** One of the core principles of linked data is to re-use existing vocabularies when possible. The schema.org vocabulary was developed to support internet search engines and contains terms for things that people often search for (e.g. people, organizations, products, etc.) In this case, we can re-use schema.org terms to describe the manufacturer and product.

17 changes: 8 additions & 9 deletions sphinx/example_zinc_powder.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
Zinc Powder
===========

This example, let's describe an instance of some zinc powder with a set of properties defined in the specification sheet from the manufacturer. This example highlights a few things:

#. **EMMO distinguishes properties according to how they were determined.** In this example, a ``ConventionalProperty`` is a property whose value is assigned by convention (e.g. from a technical specification sheet, handbook, etc.). EMMO also provides terms for ``MeasuredProperty`` for properties which were actually determined by some measurement and ``ModelledProperty`` for properties that were obtained from some model.

#. **EMMO has a specific way of expressing quantitative properties.** As shown in the example, a quantitative property has a ``@type`` that describes what kind of property it is, ``hasNumericalPart`` describes the value, and ``hasMeasurementUnit`` defines the unit. Please adhere to this format when expressing quantities in your linked data.

#. **We can re-use terms from common vocabularies like schema.org.** One of the core principles of linked data is to re-use existing vocabularies when possible. The schema.org vocabulary was developed to support internet search engines and contains terms for things that people often search for (e.g. people, organizations, products, etc.) In this case, we can re-use schema.org terms to describe the manufacturer and product.

The JSON-LD description of the material is given below:
This example, let's describe an instance of some zinc powder with a set of properties defined in the specification sheet from the manufacturer. The JSON-LD description of the material is given below:

.. tab-set::

Expand Down Expand Up @@ -48,3 +40,10 @@ The JSON-LD description of the material is given below:
<iframe src="https://json-ld.org/playground/#startTab=tab-table&json-ld=%7B%22%40context%22%3A%22https%3A%2F%2Fraw.githubusercontent.com%2Femmo-repo%2Fdomain-electrochemistry%2Fmaster%2Fcontext.json%22%2C%22%40type%22%3A%5B%22Zinc%22%2C%22Powder%22%5D%2C%22schema%3Amanufacturer%22%3A%7B%22%40id%22%3A%22https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FQ680841%22%2C%22schema%3Aname%22%3A%22Sigma-Aldrich%22%7D%2C%22schema%3AproductID%22%3A%22324930%22%2C%22schema%3Aurl%22%3A%22https%3A%2F%2Fwww.sigmaaldrich.com%2FNO%2Fen%2Fproduct%2Faldrich%2F324930%22%2C%22hasProperty%22%3A%5B%7B%22%40type%22%3A%5B%22D95ParticleSize%22%2C%22ConventionalProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A150%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AMicroMetre%22%2C%22dc%3Asource%22%3A%22https%3A%2F%2Fwww.sigmaaldrich.com%2FNO%2Fen%2Fproduct%2Faldrich%2F324930%22%7D%5D%7D" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" frameborder="0" allowfullscreen></iframe>
</div>

This example highlights a few things:

#. **EMMO distinguishes properties according to how they were determined.** In this example, a ``ConventionalProperty`` is a property whose value is assigned by convention (e.g. from a technical specification sheet, handbook, etc.). EMMO also provides terms for ``MeasuredProperty`` for properties which were actually determined by some measurement and ``ModelledProperty`` for properties that were obtained from some model.

#. **EMMO has a specific way of expressing quantitative properties.** As shown in the example, a quantitative property has a ``@type`` that describes what kind of property it is, ``hasNumericalPart`` describes the value, and ``hasMeasurementUnit`` defines the unit. Please adhere to this format when expressing quantities in your linked data.

#. **We can re-use terms from common vocabularies like schema.org.** One of the core principles of linked data is to re-use existing vocabularies when possible. The schema.org vocabulary was developed to support internet search engines and contains terms for things that people often search for (e.g. people, organizations, products, etc.) In this case, we can re-use schema.org terms to describe the manufacturer and product.
14 changes: 7 additions & 7 deletions sphinx/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ Examples
.. grid-item-card::
:link: example_zinc_electrode.html

:octicon:`book;1em;sd-text-info` Zinc Electrode
:octicon:`plus;1em;sd-text-info` Zinc Electrode
^^^^^^^^^^^
A zinc foil electrode manufactured by a person at a research institute with a mix of properties from a specification sheet and measured.

.. grid::

.. grid-item-card::
:link: examples.html
:link: example_aqueous_electrolyte_KOH.html

:octicon:`pencil;1em;sd-text-info` Examples
:octicon:`plus-circle;1em;sd-text-info` Aqueous KOH Electrolyte
^^^^^^^^
Here are some examples that demonstrate basic usage of the ontology
An aqueous potassium hydroxide electrolyte with some properties.

.. grid-item-card::
:link: contribute.html
:link: example_alkaline_electrochemical_cell.html

:octicon:`thumbsup;1em;sd-text-info` Contribute
:octicon:`thumbsup;1em;sd-text-info` Alkaline Electrochemical Cell
^^^^^^^^^^
Help us develop the ontology by following these guidelines
An alkaline electrochemical cell.


Electrochemical Cell
Expand Down
19 changes: 19 additions & 0 deletions sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@ a foundational resource for harmonizing electrochemical knowledge
representation, enhancing data interoperability, and accelerating
progress in electrochemical research and development.

A Simple Example
~~~~~~~~~~~~~~~~
.. code-block:: json
:linenos:
{
"@context": "https://raw.githubusercontent.com/emmo-repo/domain-electrochemistry/master/context.json",
"@type": "ElectrochemicalCell",
"hasNegativeElectrode": {
"@type": "ZincElectrode"
},
"hasPositiveElectrode": {
"@type": "ManganeseDioxideElectrode"
},
"hasElectrolyte": {
"@type": "AlkalineElectrolyte"
}
}
.. grid::

.. grid-item-card::
Expand Down

0 comments on commit c66d950

Please sign in to comment.