Anonymous

Main Page: Difference between revisions

From geokb
210 bytes removed ,  3 months ago
 
Line 40: Line 40:


=== Mineral Commodity ===
=== Mineral Commodity ===
The following query pulls items classified as mineral commodity and associated code values from the USGS Mineral Resources Data System and/or Mindat. Not all codes are in place for the items and Mindat codes will be changing to the long-form identifier resolvable at mindat.org.
The following query pulls items identified as mineral commodities with their associated subclass relationships where applicable. Items were sourced and identified as commodities from a combination of sources:
* [[Item:Q41269|MRDS commodity names and codes]]


<sparql tryit="1">
<sparql tryit="1">
PREFIX wd: <https://geokb.wikibase.cloud/entity/>
PREFIX wd: <https://geokb.wikibase.cloud/entity/>
PREFIX wdt: <https://geokb.wikibase.cloud/prop/direct/>
PREFIX wdt: <https://geokb.wikibase.cloud/prop/direct/>
PREFIX p: <https://geokb.wikibase.cloud/prop/>
PREFIX pq: <https://geokb.wikibase.cloud/prop/qualifier/>


SELECT ?item ?itemLabel ?mrds_code ?mindat_id
SELECT ?item ?itemLabel ?itemDescription
?subclassOf ?subclassOfLabel
WHERE {
WHERE {
   ?item wdt:P1 wd:Q406 .
   ?item wdt:P1 wd:Q406 .
  ?item p:P1 ?instance_statement .
   OPTIONAL {
   OPTIONAL {
     ?instance_statement pq:P19 ?mrds_code .
     ?item wdt:P2 ?subclassOf .
  }
  OPTIONAL {
    ?instance_statement pq:P99 ?mindat_id .
   }
   }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }