tetherless-world / nanomine-graph

the visualization web app for nanomine project
MIT License
1 stars 4 forks source link

Change in modeling nm:ElectricalConductivity #21

Open mdeagen opened 4 years ago

mdeagen commented 4 years ago

Electrical conductivity is measured under DC or AC field conditions. If DC, only a voltage is provided. If AC, voltage (peak or RMS) is provided along with frequency.

Previously, the sio:Attribute nm:ElectricalConductivity stored what appeared to be DC conductivity values. A plot based on this search result looked like this.

Now, nm:ElectricalConductivity seems to return AC conductivity values. This is what the plot now looks like this (only 1000 of 9000+ rows included here due to filesize limitations)

Note: An earlier version of the ontology spelled the term as nm:ElectricConductivity. The term appears to have been corrected to nm:ElectricalConductivity. However, the Ontology Spreadsheet still has a reference to nm:ElectricConductivity.

The main questions are:

Below is the SPARQL query that previously would have returned DC conductivity values, but now returns AC conductivity values:

PREFIX nm: <http://nanomine.org/ns/>
PREFIX sio: <http://semanticscience.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dct: <http://purl.org/dc/terms/>

SELECT DISTINCT * WHERE {
  ?sample a nm:PolymerNanocomposite ;
          sio:hasAttribute [ a nm:ElectricalConductivity ;
                             sio:hasValue ?Conductivity ;
                             sio:hasUnit [ rdfs:label ?unit ] 
                           ] .
  ?control sio:hasRole [ a sio:ControlRole ;
                         sio:inRelationTo ?sample ] ;
           sio:hasAttribute [ a nm:ElectricalConductivity ;
                             sio:hasValue ?controlConductivity ;
                             sio:hasUnit [ rdfs:label ?unit ] 
                            ] .
  ?sample a nm:PolymerNanocomposite ;
          sio:hasComponentPart [ a [ rdfs:label ?Filler ]; 
                                 sio:hasRole [ a nm:Filler ] ;
                                 sio:hasAttribute [ a nm:MassFraction ;
                                                    sio:hasValue ?Loading_mass ]
                               ] ,
                               [ a [ rdfs:label ?Matrix ];
                                 sio:hasRole [ a nm:Matrix] ] .
} 
mdeagen commented 4 years ago

Correction: Legacy DC conductivity data are still stored as nm:ElectricConductivity.

The following SPARQL query achieves expected results:

PREFIX nm: <http://nanomine.org/ns/>
PREFIX sio: <http://semanticscience.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dct: <http://purl.org/dc/terms/>

SELECT DISTINCT * WHERE {
  ?sample a nm:PolymerNanocomposite ;
          sio:hasAttribute [ a nm:ElectricConductivity ;
                             sio:hasValue ?Conductivity ;
                             sio:hasUnit [ rdfs:label ?unit ] 
                           ] .
  ?control sio:hasRole [ a sio:ControlRole ;
                         sio:inRelationTo ?sample ] ;
           sio:hasAttribute [ a nm:ElectricConductivity ;
                             sio:hasValue ?controlConductivity ;
                             sio:hasUnit [ rdfs:label ?unit ] 
                            ] .
  ?sample a nm:PolymerNanocomposite ;
          sio:hasComponentPart [ a [ rdfs:label ?Filler ]; 
                                 sio:hasRole [ a nm:Filler ] ;
                                 sio:hasAttribute [ a nm:MassFraction ;
                                                    sio:hasValue ?Loading_mass ]
                               ] ,
                               [ a [ rdfs:label ?Matrix ];
                                 sio:hasRole [ a nm:Matrix] ] .
} 

The nm:ElectricConductivity and nm:ElectricalConductivity representations still should be unified, in addition to specifying AC or DC measurement conditions.