Skip to content
This repository has been archived by the owner on Apr 11, 2019. It is now read-only.

MMI is not returning CF aliases #129

Open
kwilcox opened this issue Jul 29, 2014 · 13 comments
Open

MMI is not returning CF aliases #129

kwilcox opened this issue Jul 29, 2014 · 13 comments
Labels

Comments

@kwilcox
Copy link
Member

kwilcox commented Jul 29, 2014

MMI is not returning CF "aliases".

For example: "sea_surface_height" is a valid CF standard_name (as alias to "sea_surface_height_above_sea_level"), but is not being returned from the query below.

PREFIX ioos: <http://mmisw.org/ont/ioos/parameter/>
SELECT DISTINCT ?cat ?parameter ?property ?value 
WHERE {?parameter a ioos:Parameter .
       ?parameter ?property ?value .
       ?cat skos:narrowMatch ?parameter .
       FILTER  (regex(str(?property), "Match", "i") && regex(str(?value), "cf", "i") )
      } 
ORDER BY ?cat ?parameter

MMI folks: Any problems with the query?

@dpsnowden
Copy link
Contributor

The vocab you're pointing at is the ioos parameter vocab not the CF parameter vocab. See the CF vocab at http://mmisw.org/orr/#http://mmisw.org/ont/cf/parameter or a mapping between IOOS/CF at http://mmisw.org/orr/#http://mmisw.org/ont/ioos/map_ioos_cf.

@neaptide can you clarify the syntax?

Also, there are examples at https://github.com/nccoos/ioos-vocabulary-search

@kwilcox
Copy link
Member Author

kwilcox commented Jul 29, 2014

I took the query from Sarah Haines: http://www.unc.edu/~haines/orrioos.html
"Grouped by List all matches between IOOS parameters and CF terms"
If there is a better query to use, please shoot it my way!

@emiliom
Copy link

emiliom commented Jul 29, 2014

Also, even if you query against the CF standard_name vocabulary, I'm not aware that "aliases" (among CF standard names) are a formal CF concept that's encoded as vocabulary mappings in MMI.

What exactly are you trying to do? Find CF standard_name terms that match an IOOS parameter term (more specifically, ones that have been previously mapped)? Or find aliases among CF standard_names via SPARQL queries to MMI? The former is partially implemented, but most likely not comprehensive. I'm not aware that the latter is implemented by the MMI folks or IOOS folks.

I'm looping in @carueda in case he wants to chime in.

@kwilcox
Copy link
Member Author

kwilcox commented Jul 29, 2014

Better explained through an example: wind is an IOOS Core Variable. I want all CF standard names that IOOS considers to be part of wind.

@carueda
Copy link

carueda commented Jul 29, 2014

I'm not aware that the latter is implemented by the MMI folks or IOOS folks.

Correct; the CF ontology version at the MMI ORR does not capture the <alias> entries from the original vocabulary. Perhaps it should. I will bring this up with the MMI team, which will be a timely topic as we are currently doing some ontology work for UDUNITS (https://github.com/mmisw/udunits2rdf/wiki).

(BTW, in case some people here haven't already heard about it, let me take the opportunity to point you to our new (prototype) tool to browse the CF vocab: http://mmisw.org/cfsn (wiki). Of course, you feedback would be welcome!)

@carueda
Copy link

carueda commented Jul 29, 2014

mmisw/cf2rdf#1

@neaptide
Copy link

Here is @dpsnowden requested the modified SPARQL to return all matches to the core_variable/wind but no alias returned for reasons @carueda stated.

PREFIX ioos: <http://mmisw.org/ont/ioos/parameter/>
SELECT DISTINCT ?parameter ?property ?value 
WHERE {?parameter a ioos:Parameter .
       ?parameter ?property ?value .
       <http://mmisw.org/ont/ioos/core_variable/wind> skos:narrowMatch ?parameter .
       FILTER  (regex(str(?property), "Match", "i") )
      } 
ORDER BY ?parameter

@kwilcox kwilcox changed the title MMI not returning CF aliases MMI is not returning CF aliases Jul 29, 2014
@kwilcox
Copy link
Member Author

kwilcox commented Jul 29, 2014

@neaptide thanks. So the issue remains: "MMI is not returning CF aliases"

@emiliom
Copy link

emiliom commented Jul 29, 2014

I'm rusty on my SPARQL (not that I've ever been very proficient ...) and can't check thoroughly right now, but I don't think the problem, as clarified by @kwilcox, involves the CF alias issue @carueda described. Instead, I think it's as simple as there not being any MMI mappings yet between ioos/core_variable/wind and CF standard_name terms for wind components.

Existing mappings to ioos/core_variable/wind are nicely visible here:
http://mmisw.org/ont/ioos/core_variable/wind
(FYI, I have no clue what that ioos_test vocabulary is). You can see that there are lots of mappings to wind component terms in ioos/parameter (thanks to @neaptide, I'm sure!), but no mappings to CF terms.

I get the same results programmatically with this SPARQL query:

PREFIX iooscore: <http://mmisw.org/ont/ioos/core_variable/>
SELECT DISTINCT ?p ?name ?definition ?property ?value 
WHERE {?p a iooscore:Core_Variable .
       ?p iooscore:name ?name . 
       ?p iooscore:definition ?definition . 
       ?p ?property ?value .
       FILTER (regex(str(?property), "(narrowMatch)", "i") 
               && regex(str(?name), "wind", "i"))
      } 
ORDER BY ?p

Such new term mappings could be added to http://mmisw.org/ont/ioos/map_core_variable or on a new mapping ontology. But it won't create itself; someone would have to do it.

@kwilcox
Copy link
Member Author

kwilcox commented Jul 29, 2014

@emiliom can you create another issue with you above comment? I'd like to keep this issue dedicated to my original problem. Thanks!

@emiliom
Copy link

emiliom commented Jul 29, 2014

@kwilcox , sure, I can do that later (I'm at an airport right now). But when you explained your issue like this:

Better explained through an example: wind is an IOOS Core Variable. I want all CF standard names that IOOS considers to be part of wind.

The solution is what I've just described, not the CF standard_name alias feature that @carueda will try to address. So I'm confused again about what specific issue you're trying to address here.

@graybeal
Copy link

So I think there are 2 issues in the use case:

  1. (original problem statement) deciding whether or not you want alias terms returned as well as 'regular' CF terms;
  2. (added) determining relations between a given IOOS Core Variable and the CF terms.

Re (2), emiliom correct points out there are no mappings between the IOOS core variable wind and the CF terms. If such mappings are desired, http://mmisw.org/orr/#http://mmisw.org/ont/ioos/map_ioos_cf looks like the right place for them. On the theory that this is resolved, so I'm focusing on (1).

I've posted a proposal for how we capture aliases in the converted vocabulary in our task (mmisw/cf2rdf#1). People are welcome to comment there, it's a bit sticky though. The principal is that they are not really Standard Names, because aliases are deprecated in CF (i.e., you aren't supposed to use them in new files). But there will be relations between aliases and SNs that can be traversed with SPARQL, so you can find them. Just not sure if the relations should include some SKOS relation, so that mappings are passed through.

I will also ask about this on the CF list, but wanted to give you all a chance to reply to these ideas.

@emiliom emiliom added the MMI label Jul 30, 2014
@emiliom
Copy link

emiliom commented Jul 30, 2014

Thanks, @graybeal . That definitely looks tricky, and tightly linked to CF practices. So I have no useful suggestions.

On somewhat of a tangent, I've created a new "MMI" label on the ioos/system-test repo, and tagged this issue and issue #128 with this new label.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants