Ingrid

Logo

View the Project on GitHub dice-group/ingrid.github.io

INGRID-KG

Graffiti is an urban phenomenon that is increasingly attracting the interest of the sciences. To the best of our knowledge, no suitable data corpora are available for systematic research until now. The Information System Graffiti in Germany project (INGRID) closes this gap by dealing with graffiti image collections that have been made available to the project for public use. Within INGRID, the graffiti images are collected, digitized and annotated.

INGRID-KG aims to support the rapid access to a comprehensive data source on INGRID targeted especially by researchers. In particular, INGRID-KG is an RDF knowledge graph of annotated graffiti, abides by the Linked Data and FAIR principles. We weekly updating INGRID-KG by augmenting the new annotated graffiti to our knowledge graph.
Our generation pipeline applies RDF data conversion, link discovery and data fusion approaches to the original data. INGRID-KG is publicly available under the Creative Commons Attribution 4.0 International license.

Annotation Manual in German

Annotation Manual in English

A list of SPARQL queries from the INGRID-KG endpoint.

Count the number of resources?

SELECT count(distinct(?s)) WHERE{
	?s ?p ?o .
}

Count the number of triples?

SELECT count(*) WHERE {
	?s ?p ?o .
}

Count the number of properties?

SELECT count(distinct(?p)) WHERE{
	?s ?p ?o .
}

Count the number of objects?

SELECT count(distinct(?o)) WHERE{
	?s ?p ?o .
}

Retrieve a set of 100 random graffiti that were painted by the same crew “AC”

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct * WHERE{
	?s grfo:hasGraffitiSprayerCrew grfr:AC .
	grfr:AC grfo:hasLongForm ?o.
} 
LIMIT 100

Show all graffiti created by the sprayer crew “EURO” containing ”!”

PREFIX grfp: <https://graffiti.data.dice-research.org/graffiti#>
PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct * where{
	?s grfo:hasGraffitiSprayerCrew ?crew .
	?crew a grfo:GraffitiSprayerCrew .
	?crew rdfs:label "EURO" .
	?s grfo:hasItem ?item .
	FILTER( REGEX( ?item, "!" ) ) .
}

Show all graffiti created by the sprayer crew “EURO” containing ”?”

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct * where{
	?s grfo:hasGraffitiSprayerCrew ?crew .
	?s grfo:hasItem ?item .
	FILTER( contains(?item, "?") ) .
} 
LIMIT 100

How many graffities have “a” in their sprayercrew name?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct count( ?s ) as ?cnt where{
	?s grfo:hasGraffitiSprayerCrew ?crew .
	?crew a grfo:GraffitiSprayerCrew .
	?crew rdfs:label ?crewName .
	FILTER( contains(?crewName, "a")) .
} 

How many crew members in each crew?

PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct ?crew, count( ?crewMember ) as ?cnt WHERE{
	?crew a grfo:CrewMember .
	?crew grfo:hasCrewMember ?crewMember .
}

To how many crews does a crew member belong?

PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct ?crewMember count(?crew) as ?cnt WHERE{
	?crew a grfo:CrewMember .
	?crew grfo:hasCrewMember ?crewMember .
	?crewMember a grfo:CrewMember .
	?crewMember rdfs:label ?crewMemberLabel.
}

Which crew members work in more than one crew?

PREFIX grfp: <https://graffiti.data.dice-research.org/graffiti#>
PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>

SELECT distinct ?crewMemberLabel (count(?crew) as ?cnt) WHERE{
	?crew a grfo:Crew .
	?crew grfo:hasCrewMember ?crewMember .
	?crewMember rdfs:label ?crewMemberLabel.
}
GROUP BY ?crewMemberLabel
ORDER BY desc(?cnt)

In which crews does the crew member “REAL” work?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct* WHERE{
	?crew a grfo:CrewMember .
	?crew grfo:hasCrewMember grfr:REAL .
	grfr:REAL grfo:hasLngForm ?crewMemberLabel .
}

How many graffities were painted by each crew?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct ?crewName (count(?graffitiCrew) as ?cnt) WHERE{
	?graffiti grfo:hasGraffitiSprayerCrew ?graffitiCrew .
	?graffitiCrew rdfs:label ?crewName .
}
GROUP BY ?crewName
ORDER BY desc(?cnt)

What is the average number of colours per graffiti?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>

SELECT  (AVG(?cnt) AS ?avg) WHERE {
	SELECT distinct ?graffiti count(?elem) AS ?cnt WHERE{
		?graffiti grfo:hasColour ?elem 
	}
}

How many graffities contain some_Spanish?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct count( ?graffiti ) AS ?cnt WHERE{ 
	?graffiti grfo:hasLanguage "es - Spanisch"
}

How many graffities were recorded between the years 1998 and 2000?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct count( ?graffiti ) AS ?cnt WHERE{ 
	?graffiti grfo:hasRecordingDate ?date .
	FILTER("1998-01-01"^^xsd:date <= ?date && ?date < "2000-01-01"^^xsd:date).
}

Graffities filtered by location (city “Essen”) and date (between the years 1998 and 2000)

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct count( ?graffiti ) AS ?cnt WHERE{
	?graffiti grfo:hasLocation ?city .
	?city a grfo:City .
	?city rdfs:label "Essen" .
	?graffiti grfo:hasRecordingDate ?date .
	FILTER("1998-01-01"^^xsd:date <= ?date && ?date < "2000-01-01"^^xsd:date).
}

What is the average number of Colors for all fully annotated Pieces_(with carrier medium Hall of Fame)_?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
select (AVG(?cnt) AS ?avg)
WHERE {
SELECT distinct ?graffiti count( ?elem ) AS ?cnt WHERE{
 		?graffiti grfo:hasColour ?elem ;
       			grfo:hasType "Piece/Writing/Style" ;
       			grfo:hasCarrierMedium "Hall of Fame".
 	}
}

What is the average number of Colors for all fully annotated Pieces (without carrier medium Hall of Fame)?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
select   (AVG(?cnt) AS ?avg)
WHERE {
SELECT distinct  ?graffiti count( ?elem ) AS ?cnt WHERE{
 		?graffiti grfo:hasColour ?elem ;
       		grfo:hasType "Piece/Writing/Style".
FILTER NOT EXISTS { ?graffiti grfo:hasCarrierMedium "Hall of Fame"} .
 }
}

Show every Graffiti with only one name in the field SPRÜHER that has an embedded signature

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT ?crow (COUNT(?s) AS ?count) WHERE {
	?crow grfo:hasGraffitiSprayerCrew ?o ;
	grfo:hasEmbeddedGraffiti "Signatur/en".
}
GROUP BY ?crow
HAVING (COUNT(?s) = 1)

Show every postal code in which a sprayer painted a graffiti?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT distinct ?name (?plz) WHERE {
	?g  grfo:hasPostalCode ?plz ;
  	grfo:hasGraffitiSprayerCrew ?crow .
  	?crow rdfs:label ?name
}
ORDER BY ?crow

Count the number of postal code areas per crew?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT ?crow COUNT(?plz) AS ?count WHERE {
  	?g  grfo:hasPostalCode ?plz ;
	grfo:hasGraffitiSprayerCrew ?crow .
}
ORDER BY DESC (?count)

Count the number of graffiti per postal code for the crew “GISMO”?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT COUNT(?g) ?plz WHERE {
	?g  grfo:postalCode ?plz ;
    	    grfo:hasGraffitiSprayerCrew grfr:GISMO .
}

Show the period of time in which a sprayer painted each graffitis (useing the recording date) with the longest period for a sprayer in the knowledge graph for the GISMO crew?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT ?MinDate ?MaxDate ?years WHERE {
   	SELECT distinct min(?date) AS ?MinDate max(?date) AS ?MaxDate WHERE{
 		?g grfo:hasRecordingDate ?date ;
    	  	 grfo:hasGraffitiSprayerCrew grfr:GISMO .
   	}
  	bind( year(?MaxDate) - year(?MinDate)  - if(month(?MaxDate)<month(?MinDate) || (month(?MaxDate)=month(?MinDate) && day(?MaxDate)<day(?MinDate)),1,0) as ?years )
}

Show the period of time in which a sprayer painted each graffitis (useing the recording date) with the longest period for a sprayer in the knowledge graph for each crew?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT ?crow ?MinDate ?MaxDate ?Years WHERE{
	SELECT distinct ?crow min(?date) AS ?MinDate max(?date) AS ?MaxDate WHERE{
  		?g grfo:hasRecordingDate ?date ;
		grfo:hasGraffitiSprayerCrew ?crow .
	}
	bind( year(?MaxDate) - year(?MinDate)  - if(month(?MaxDate)<month(?MinDate) || (month(?MaxDate)= month(?MinDate) && day(?MaxDate)<day(?MinDate)),1,0) as ?Years )
}
ORDER BY DESC(?Years)

What is the most frequent sprayer in the DB? can be answered by this query:

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT  ?crow count(DISTINCT ?g) AS ?GrPerCrow WHERE{
	?g grfo:hasGraffitiSprayerCrew ?crow .
}
ORDER BY DESC (count(?g))

How many pieces (category Type) have more than five Stilelemente and are not painted at a Hall of Fame (category Trägermedium)?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT ?typ ?cnt WHERE {
	SELECT ?typ (count(DISTINCT ?elem) as ?cnt) WHERE{
		?graffiti grfo:hasType ?typ ;
		grfo:hasSyleElement ?elem .
		FILTER NOT EXISTS { ?graffiti grfo:hasCarrierMedium "Hall of Fame"} .
	}
	FILTER(?cnt > 5)
}

How many graffities per category Type have more than five Stilelemente and are not painted at a Hall of Fame (category Trägermedium)?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT ?typ count(DISTINCT ?graffiti) as ?cntGraffities WHERE {
	SELECT ?graffiti ?typ (count(DISTINCT ?elem) as ?cnt) WHERE{
		?graffiti grfo:hasType ?typ ;
      		grfo:hasSyleElement ?elem .
		FILTER NOT EXISTS { ?graffiti grfo:hasCarrierMedium "Hall of Fame"} .
	}
	FILTER(?cnt > 5)
}
PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT ?graffiti, ?cnt WHERE {
	SELECT ?graffiti (count(?graffitiCrew) as ?cnt) WHERE{
		?graffiti grfo:hasGraffitiSprayerCrew ?graffitiCrew .
	}
	FILTER(?cnt > 3)
}
GROUP BY ?graffiti
ORDER BY desc(?cnt)

Count the number of graffiti per postal code with the topic „Politik“ in Mannheim

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT (COUNT(?g) as ?numberOfGraffiti) ?plz WHERE{
	?g  grfo:hasPostalCode ?plz ;
  	grfo:hasLocation grfr:Mannheim ;
  	grfo:hasTheme "Politik".
}

What is the average number of letters in the Item field for the typ “Spruch/ Konzeptaufruf”? with showing results without spaces betwenn letters

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
select (AVG(?itemLen) AS ?avg) WHERE{
	?graffiti grfo:hasType "Spruch/Konzeptaufruf";
      		  grfo:hasItem ?item .
	BIND(replace(?item, " ", "") as ?withoutSpace)
	BIND (strlen(?withoutSpace) AS ?itemLen)
}

Count the number of letters for the item “RIOT RADIO” without spaces?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT ?itemLen WHERE{
	?s grfo:hasItem "RIOT RADIO"@en.
	?s grfo:hasItem ?item.
	bind(replace(?item, " ", "") as ?withoutSpace)
  	bind(strlen(?withoutSpace) as ?itemLen).
}

What is the average number of letters within graffiti of type “Spruch/ Konzeptaufruf” and topic “Politik”

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT (AVG(?itemLen) AS ?avg) WHERE{
	?graffiti grfo:hasType "Spruch/Konzeptaufruf";
	grfo:hasTheme "Politik";
	grfo:hasItem ?item .
	BIND (strlen(?item) AS ?itemLen)
}

Find the graffities created by more than one sprayer crew.

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT ?graffiti, ?text, ?cnt WHERE {
	SELECT ?graffiti ?text (count(?graffitiCrew) as ?cnt) WHERE{
		?graffiti grfo:hasGraffitiSprayerCrew ?graffitiCrew .
		?graffiti grfo:hasItem ?text .
		?graffiti grfo:hasType "Piece/Writing/Style".
		?graffitiCrew rdfs:label ?crewName .
	}
	FILTER(?cnt > 1)
}
GROUP BY ?graffiti
ORDER BY desc(?cnt)

What is the most frequent languages of grafitti of Type “Spruch/Konzeptaufruf”?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT  ?lang count(DISTINCT ?g) AS ?GrPerLang WHERE{
	?g grfo:hasType "Spruch/Konzeptaufruf".
	?g grfo:hasLanguage ?lang
}
ORDER BY DESC (count(?g))

What is the most frequent languages of grafitti of Type “Spruch/Konzeptaufruf” within the time slot (1990-1999)?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT  ?lang count(DISTINCT ?g) AS ?GrPerLang WHERE{
	?g grfo:hasType "Spruch/Konzeptaufruf".
	?g grfo:hasLanguage ?lang.
	?g grfo:hasRecordingDate ?date .
FILTER("1990-01-01"^^xsd:date <= ?date && ?date < "1999-12-31"^^xsd:date).

}
ORDER BY DESC (count(?g)) 

Retrieve the number of used colors per crew?

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT disntict ?graffitiCrew ?colour  (count(?colour) as ?count) WHERE
{
	?graffiti grfo:hasGraffitiSprayerCrew ?graffitiCrew .
	?graffitiCrew a grfo:GraffitiSprayerCrew .
	?graffiti grfo:hasColour ?colour .
}
GROUP BY ?graffitiCrew ?colour
ORDER BY DESC(?count)

Find all sub-graffiti with comments

PREFIX grfr: <https://graffiti.data.dice-research.org/resource/>
PREFIX grfo: <https://graffiti.data.dice-research.org/ontology/>
SELECT count(DISTINCT *) WHERE
{
	?g a grfo:Graffiti .
	?g grfo:hasType "Comment" .
}