Skip to content

Commit

Permalink
updated examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimonclark committed Jan 28, 2024
1 parent 14d3cdf commit ad06f29
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 108 deletions.
7 changes: 4 additions & 3 deletions sphinx/example_material.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This example, let's describe an instance of some zinc powder with a set of prope

#. **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, a numerical part that describes the value, and a measurement unit that defines the unit. Please adhere to this format when expressing quantities in your linked data.
#. **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.

Expand All @@ -26,9 +26,10 @@ The JSON-LD description of the material is given below:
"schema:name": "Sigma-Aldrich"
},
"schema:productID": "324930",
"schema:url": "https://www.sigmaaldrich.com/NO/en/product/aldrich/324930",
"hasProperty": [
{
"@type": ["D100ParticleSize", "ConventionalProperty"],
"@type": ["D95ParticleSize", "ConventionalProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 150
Expand All @@ -44,6 +45,6 @@ The JSON-LD description of the material is given below:
.. 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%5B%22ActiveMaterial%22%2C%22Zinc%22%2C%22Powder%22%5D%2C%22hasProperty%22%3A%5B%7B%22%40type%22%3A%5B%22SpecificCapacity%22%2C%22ConventionalProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A819%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AMilliAmpereHourPerGram%22%7D%2C%7B%22%40type%22%3A%5B%22D50ParticleSize%22%2C%22ConventionalProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A50%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AMicroMetre%22%7D%2C%7B%22%40type%22%3A%5B%22Density%22%2C%22ConventionalProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A7.14%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AGramPerCubicCentiMetre%22%7D%2C%7B%22%40type%22%3A%5B%22SpecificSurfaceArea%22%2C%22ConventionalProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A5%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3ASquareMetrePerGram%22%7D%5D%7D" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" frameborder="0" allowfullscreen></iframe>
<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>

127 changes: 22 additions & 105 deletions sphinx/examples.rst
Original file line number Diff line number Diff line change
@@ -1,120 +1,37 @@
Examples
========

Active Material
---------------
.. grid::

This example is an active material consisting of a zinc powder with a set of properties. In EMMO, a ConventionalProperty is a property whose value is assigned by convention (e.g. from a technical specification sheet, handbook, etc.)
.. grid-item-card::
:link: example_material.html

The JSON-LD description of the material is given below:
:octicon:`ruby;1em;sd-text-info` Material
^^^^^^^^^^^
A material from a manufacturer with properties defined in a specification sheet.

.. code-block:: json
:linenos:
.. grid-item-card::
:link: electrochemistry.html

{
"@context": "https://raw.githubusercontent.com/emmo-repo/domain-electrochemistry/master/context.json",
"@type": ["ActiveMaterial", "Zinc", "Powder"],
"hasProperty": [
{
"@type": ["SpecificCapacity", "ConventionalProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 819
},
"hasMeasurementUnit": "emmo:MilliAmpereHourPerGram"
},
{
"@type": ["D50ParticleSize", "ConventionalProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 50
},
"hasMeasurementUnit": "emmo:MicroMetre"
},
{
"@type": ["Density", "ConventionalProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 7.14
},
"hasMeasurementUnit": "emmo:GramPerCubicCentiMetre"
},
{
"@type": ["SpecificSurfaceArea", "ConventionalProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 5
},
"hasMeasurementUnit": "emmo:SquareMetrePerGram"
}
]
}
:octicon:`book;1em;sd-text-info` Class Index
^^^^^^^^^^^
A complete list of terms and some human-readable annotations

This example can be explored using the JSON-LD playground:
.. grid::

.. 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%5B%22ActiveMaterial%22%2C%22Zinc%22%2C%22Powder%22%5D%2C%22hasProperty%22%3A%5B%7B%22%40type%22%3A%5B%22SpecificCapacity%22%2C%22ConventionalProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A819%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AMilliAmpereHourPerGram%22%7D%2C%7B%22%40type%22%3A%5B%22D50ParticleSize%22%2C%22ConventionalProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A50%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AMicroMetre%22%7D%2C%7B%22%40type%22%3A%5B%22Density%22%2C%22ConventionalProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A7.14%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3AGramPerCubicCentiMetre%22%7D%2C%7B%22%40type%22%3A%5B%22SpecificSurfaceArea%22%2C%22ConventionalProperty%22%5D%2C%22hasNumericalPart%22%3A%7B%22%40type%22%3A%22Real%22%2C%22hasNumericalValue%22%3A5%7D%2C%22hasMeasurementUnit%22%3A%22emmo%3ASquareMetrePerGram%22%7D%5D%7D" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" frameborder="0" allowfullscreen></iframe>
</div>
.. grid-item-card::
:link: examples.html

Electrode
---------
:octicon:`pencil;1em;sd-text-info` Examples
^^^^^^^^
Here are some examples that demonstrate basic usage of the ontology

This example is an active material consisting of a zinc powder with a set of properties. In EMMO, a MeasuredProperty is a property whose value is was determined by the Agent performing some Measurement.
.. grid-item-card::
:link: contribute.html

.. code-block:: json
:linenos:
{
"@context": "https://raw.githubusercontent.com/emmo-repo/domain-electrochemistry/master/context.json",
"@type": ["Electrode", "Foil"],
"hasActiveMaterial": {
"@type": "Zinc"
},
"hasProperty": [
{
"@type": ["SpecificCapacity", "MeasuredProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 800
},
"hasMeasurementUnit": "emmo:MilliAmpereHourPerGram"
},
{
"@type": ["Thickness", "ConventionalProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 250
},
"hasMeasurementUnit": "emmo:MicroMetre"
},
{
"@type": ["Diameter", "MeasuredProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 2
},
"hasMeasurementUnit": "emmo:CentiMetre"
},
{
"@type": ["Mass", "MeasuredProperty"],
"hasNumericalPart": {
"@type": "Real",
"hasNumericalValue": 2.5
},
"hasMeasurementUnit": "emmo:Gram"
}
]
}
This example can be explored using the 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%5B%22Electrode%22%2C%22Foil%22%5D%2C%22hasActiveMaterial%22%3A%7B%22%40type%22%3A%22Zinc%22%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>
:octicon:`thumbsup;1em;sd-text-info` Contribute
^^^^^^^^^^
Help us develop the ontology by following these guidelines


Electrochemical Cell
Expand Down

0 comments on commit ad06f29

Please sign in to comment.