PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX cedarterms: <http://bit.ly/cedar#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX ler: <http://bit.ly/linked-edit-rules#> IF { ?obs a qb:Observation. ?obs cedarterms:occupationPosition ?pos1 . ?obs cedarterms:occupationPosition ?pos2 . FILTER (?pos1 != ?pos2) } THEN { ?obs ler:inconsistentWith leri:cedar1 . }
One occupation position per observation
A population count can't account for two occupation positions at the same time
PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX cedarterms: <http://bit.ly/cedar#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX ler: <http://bit.ly/linked-edit-rules#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> IF { ?obs a qb:Observation . ?measure a qb:MeasureProperty . ?obs ?measure ?population . FILTER (datatype(?population) != xsd:integer) } THEN { ?obs ler:inconsistentWith leri:cedar2 . }
class(population) == 'integer'
A population count must be an integer number
PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX cedarterms: <http://bit.ly/cedar#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX ler: <http://bit.ly/linked-edit-rules#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> IF { ?obs a qb:Observation . ?measure a qb:MeasureProperty . ?obs ?measure ?population . FILTER (?population <= 0) } THEN { ?obs ler:inconsistentWith leri:cedar3 . }
population > 0
A population count must be a positive number
PREFIX leri: <http://lod.cedar-project.nl:8888/linked-edit-rules/resource/> PREFIX cedarterms: <http://bit.ly/cedar#> PREFIX qb: <http://purl.org/linked-data/cube#> PREFIX ler: <http://bit.ly/linked-edit-rules#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX stardog: <tag:stardog:api:> IF { ?ds a qb:DataSet . ?measure a qb:MeasureProperty . FILTER (stardog:R("benford", ?ds, ?measure) <= 0.05) } THEN { ?obs ler:inconsistentWith leri:cedar4 . }
benford(ds)$p.value > 0.05'
Population counts must meet Benford's Law