Skip to content

Instantly share code, notes, and snippets.

View ewg118's full-sized avatar

Ethan Gruber ewg118

  • American Numismatic Society
  • Charlottesville, Virginia
View GitHub Profile
@ewg118
ewg118 / gist:e5be0d3b8c3f6c262432
Created May 13, 2015 02:38
Get a list of objects with the RRC 273/1 type
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX crro: <http://numismatics.org/crro/id/>
SELECT * WHERE {
?objects nmo:hasTypeSeriesItem crro:rrc-273.1 ;
a ?type
}
@ewg118
ewg118 / gist:55f16a2a96521d6e6768
Created May 13, 2015 02:46
Get weight and diameter (required) for objects of RRC 273/1
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX crro: <http://numismatics.org/crro/id/>
SELECT ?objects ?diameter ?weight WHERE {
?objects nmo:hasTypeSeriesItem crro:rrc-273.1 ;
nmo:hasWeight ?weight ;
nmo:hasDiameter ?diameter
}
@ewg118
ewg118 / gist:9fdcbc32ffa07c7a5f42
Created May 13, 2015 02:49
Get optional weight, diameter, and depiction of RRC 273/1 coins
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX crro: <http://numismatics.org/crro/id/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?objects ?title ?diameter ?weight ?depiction WHERE {
?objects nmo:hasTypeSeriesItem crro:rrc-273.1 ;
a nmo:NumismaticObject ;
dcterms:title ?title .
@ewg118
ewg118 / gist:c059341524d187c76185
Created May 13, 2015 02:51
Get average weight of RRC 273/1 coins
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX crro: <http://numismatics.org/crro/id/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT (AVG(xsd:decimal(?weight)) AS ?avgWeight) WHERE {
?objects nmo:hasTypeSeriesItem crro:rrc-273.1 ;
nmo:hasWeight ?weight
}
@ewg118
ewg118 / gist:b7530d6f9156ea2b2f42
Created May 13, 2015 02:53
Get a list of all silver types in RRC
PREFIX nm: <http://nomisma.org/id/>
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT * WHERE {
?types nmo:hasMaterial nm:ar ;
dcterms:source nm:rrc
}
@ewg118
ewg118 / gist:9500a604b2117698caae
Created May 13, 2015 02:55
A list of Roman Republican silver coins (limited to 100)
PREFIX nm: <http://nomisma.org/id/>
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?objects WHERE {
?types nmo:hasMaterial nm:ar ;
dcterms:source nm:rrc .
?objects nmo:hasTypeSeriesItem ?types ;
a nmo:NumismaticObject
} LIMIT 100
@ewg118
ewg118 / gist:8ff575266b7dd1faf114
Created May 13, 2015 02:58
UNION list of gold and silver coins (limited to 100)
PREFIX nm: <http://nomisma.org/id/>
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?objects WHERE {
{ ?types nmo:hasMaterial nm:ar }
UNION { ?types nmo:hasMaterial nm:av }
?types dcterms:source nm:rrc .
?objects nmo:hasTypeSeriesItem ?types ;
a nmo:NumismaticObject
@ewg118
ewg118 / gist:cb603f187f065acf1535
Created May 13, 2015 03:04
Get a count of all silver coins associated with RRC types
PREFIX nm: <http://nomisma.org/id/>
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT (count(?objects) as ?count) WHERE {
?types nmo:hasMaterial nm:ar ;
dcterms:source nm:rrc .
?objects nmo:hasTypeSeriesItem ?types ;
a nmo:NumismaticObject
}
@ewg118
ewg118 / gist:c854c94c3ed8fd0af898
Created May 13, 2015 03:08
Display mints that issued silver Republican coinage, with count of types, grouped and order by mint name.
PREFIX nm: <http://nomisma.org/id/>
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?label (count(?mint) as ?count) WHERE {
?types nmo:hasMaterial nm:ar ;
dcterms:source nm:rrc ;
nmo:hasMint ?mint .
?mint skos:prefLabel ?label .
@ewg118
ewg118 / gist:c1fb8ba5c5609d260205
Created May 13, 2015 03:13
Get all findspots for all hoards or coins associated with silver imperial types
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcmitype: <http://purl.org/dc/dcmitype/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX nm: <http://nomisma.org/id/>
PREFIX nmo: <http://nomisma.org/ontology#>
SELECT DISTINCT ?object ?type ?findspot ?lat ?long ?name WHERE {
?coinType nmo:hasMaterial nm:ar ;