Agricultural Government Data as
Semantic Web Data

In this project we develop a solution which allows business intelligence tools to integrated external data from a shared repository ad-hoc. On this endpoint we publish the Danish agricultural data collection integrated with the central company registry (CVR) and make it available to the public. This integration makes it possible to query across this data.

Prefix

prefix agri: <http://extbi.lab.aau.dk/ontology/agriculture/>
prefix bus: <http://extbi.lab.aau.dk/ontology/business/>
prefix wgs: <http://www.w3c.org/2003/01/geo/wgs84_pos#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
          

Aggregated Query Template 1


SELECT ?crop COUNT(*) as ?cnt
FROM <http://extbi.lab.aau.dk/resource/agriculture>
WHERE {
  ?field agri:produces ?crop .
  ?field wgs:long ?long .
  ?field wgs:lat ?lat .
  FILTER(xsd:double(?long) > 10 && xsd:double(?long) < 11 &&
    xsd:double(?lat) > 54 && xsd:double(?lat) < 55) .
}
GROUP BY ?crop
			

Aggregated Query Template 2


SELECT ?application SUM(?area) as ?totalArea
FROM <http://extbi.lab.aau.dk/resource/agriculture>
WHERE {
  ?fieldBlock agri:application ?application .
  ?fieldBlock agri:nettoareal ?area .
}
GROUP BY ?application

			

Aggregated Query Template 3


SELECT ?format COUNT(*) as ?cnt
FROM <http://extbi.lab.aau.dk/resource/business>
WHERE {
  ?company bus:hasFormat ?format .
  ?company bus:hasActivity <http://extbi.lab.aau.dk/resource/business/activity/description/dyrkning_af_groentsager_og_meloner%2C_roedder_og_rodknolde#this> .
}
GROUP BY ?format
ORDER BY DESC(?cnt)

			

Aggregated Query Template 4


SELECT ?activity COUNT(*) as ?cnt
FROM <http://extbi.lab.aau.dk/resource/business>
WHERE {
  ?productionUnit bus:hasActivity ?activity .
  ?productionUnit bus:officialAddress ?address .
  ?address bus:positionedAt ?addressFeature .
  <http://extbi.lab.aau.dk/resource/business/municipality/aalborg#this> bus:contains ?addressFeature .
}
GROUP BY ?activity
			

Aggregated Query Template 5


SELECT ?participant ?format COUNT(*) as ?cnt
FROM <http://extbi.lab.aau.dk/resource/agriculture>
FROM <http://extbi.lab.aau.dk/resource/business>
WHERE {
  ?company bus:owns ?orgField .
  ?participant bus:participatingIn ?company .
  ?company bus:hasFormat ?format .
}
GROUP BY ?participant ?format
			

Normal Query Template 1

 
SELECT ?name ?phone 
FROM <http://extbi.lab.aau.dk/resource/agriculture>
FROM <http://extbi.lab.aau.dk/resource/business>
WHERE {
  ?company bus:owns ?orgField .
  ?field owl:sameAs ?orgField .
  ?field agri:produces <http://extbi.lab.aau.dk/resource/agriculture/crop/vaarbyg_1#this> .
  ?company bus:name ?name .
  ?company bus:telephoneNumberIdentifier ?phone .
}
			

Normal Query Template 2


SELECT ?name ?address
FROM <http://extbi.lab.aau.dk/resource/business>
WHERE {
  <http://extbi.lab.aau.dk/resource/business/company/10024862#this> bus:postalAddress ?address .
  <http://extbi.lab.aau.dk/resource/business/company/10024862#this> bus:name ?name .
};
			

Normal Query Template 3


SELECT ?company ?area
FROM <http://extbi.lab.aau.dk/resource/agriculture>
FROM <http://extbi.lab.aau.dk/resource/business>
WHERE {
  ?company bus:owns ?orgField .
  ?orgField agri:area ?area .
  FILTER (xsd:double(?area) >= 2) .
}

			

Normal Query Template 4


SELECT ?field ?crop
FROM <http://extbi.lab.aau.dk/resource/agriculture>
WHERE {
  ?field agri:produces ?crop .
  ?field wgs:long ?long .
  ?field wgs:lat ?lat .
  FILTER(xsd:double(?long) > 10 && xsd:double(?long) < 11 &&
    xsd:double(?lat) > 54 && xsd:double(?lat) < 55) .
  FILTER NOT EXISTS { ?field owl:sameAs ?organicField .
                      ?organicField a agri:OrganicField . }
}
			

Normal Query Template 5


SELECT ?participantName ?companyName ?phone
FROM <http://extbi.lab.aau.dk/resource/agriculture>
FROM <http://extbi.lab.aau.dk/resource/business>
WHERE {
  ?company bus:owns <http://extbi.lab.aau.dk/resource/agriculture/organicfield/154652_15-0#this> .
  ?company bus:telephoneNumberIdentifier ?phone .
  ?company bus:name ?companyName .
  ?participant bus:participatingIn ?company .
  ?participant bus:name ?participantName .
}
			

Copyright © 2014 - All Rights Reserved - EXTBI