Help:Copyrights/maintenance
- Page with database queries used for addition and maintenance of copyright statements. Please add and improve queries if necessary.
Adding new copyright statements to items that have none edit
Items without copyright statement to which we can add one based on other properties
paintings who's author died more than 100 years ago edit
SELECT DISTINCT ?item (YEAR(?dod) as ?year)
WHERE {
?item wdt:P31 wd:Q3305213 .
MINUS { ?item wdt:P6216 [] } .
?item wdt:P170/wdt:P570 ?dod .
FILTER(YEAR(?dod) < 1918)
}
Limit 20000
Use the following QuickStatements commands:
Q????? P6216 Q19652 P1001 Q60332278 P459 Q29940705
to add
copyright status |
| ||||||||||||||
add value |
publications published before 1800 edit
SELECT DISTINCT ?item (YEAR(?dop) as ?year) WHERE {
# look for items of type "work" or "data" (or children)
?item wdt:P31/wdt:P279* ?pq .
VALUES ?pq { wd:Q386724 wd:Q42848 }
# get date of publication and make sure is old enough that all the creators are dead for more than 100 years.
?item wdt:P577 ?dop .
hint:Prior hint:rangeSafe true .
FILTER (?dop < "1800-01-01T00:00:01"^^xsd:dateTime)
FILTER NOT EXISTS { ?item wdt:P6216 [] } # item does not have P6216 yet
}
Use the following QuickStatements commands:
Q????? P6216 Q19652 P1001 Q30 P459 Q47246828
Q????? P6216 Q15687061 P1001 Q60332278 P459 Q29940705
To add
copyright status |
| |||||||||||||||||||||||||||
add value |
publications published before 1924 edit
SELECT DISTINCT ?item (YEAR(?dop) as ?year) WHERE {
# look for items of type "work" or "data" (or children)
?item wdt:P31/wdt:P279* ?pq .
VALUES ?pq { wd:Q386724 wd:Q42848 }
# get year of publication
?item p:P577 ?statement .
?statement psv:P577 [
wikibase:timePrecision "9"^^xsd:integer ;
wikibase:timeValue ?dop ;
] .
hint:Prior hint:rangeSafe true .
FILTER (?dop < "1925-00-00T00:00:00"^^xsd:dateTime)
FILTER NOT EXISTS { ?item wdt:P6216 [] } # item does not have P6216 yet
} limit 20000
paintings created before 1800 edit
For works created before 1800, we can assume that that all the creators died more than 100 years ago.
SELECT DISTINCT ?item (YEAR(?date) as ?year) WHERE {
?item wdt:P31 wd:Q3305213 .
?item wdt:P571 ?date .
hint:Prior hint:rangeSafe true .
FILTER (?date < "1800-01-01T00:00:01"^^xsd:dateTime)
FILTER NOT EXISTS { ?item wdt:P6216 [] } # item does not have P6216 yet
}
Use the following QuickStatements commands:
Q????? P6216 Q19652 P1001 Q60332278 P459 Q29940705
to add
copyright status |
| ||||||||||||||
add value |
works which were published more than 95 years ago and whose author died more than 100 years ago edit
SELECT ?item ?itemLabel ?mdod with
{ select DISTINCT ?item WHERE
{
# look for items of type "work" or "data" (or children)
?item wdt:P31/wdt:P279* ?pq .
VALUES ?pq { wd:Q386724 wd:Q42848 }
# get date of publication and make sure is before 1924
?item wdt:P577 ?dop .
hint:Prior hint:rangeSafe true .
FILTER (?dop < "1925-00-00T00:00:01"^^xsd:dateTime)
FILTER NOT EXISTS { ?item wdt:P6216 [] } # item does not have P6216 yet
} } as %i with {
select ?item (max(?dod) as ?mdod) where
{ # look through all the authors and other creators of the work and look up their date of death, than find the latest
include %i
?item wdt:P50|wdt:P170|wdt:P655|wdt:P84|wdt:P110|wdt:P287|wdt:P98|wdt:P86|wdt:P87|wdt:p57|wdt:P676 ?creator .
?creator wdt:P570 ?dod .
} group by ?item } as %j
where
{
include %j
hint:Prior hint:rangeSafe true .
FILTER(?mdod < "1918-00-00T00:00:00"^^xsd:dateTime) . # make sure last creator date of death is before 1918
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Use the following QuickStatements commands:
Q????? P6216 Q19652 P1001 Q30 P459 Q47246828
Q????? P6216 Q15687061 P1001 Q60332278 P459 Q29940705
To add
copyright status |
| |||||||||||||||||||||||||||
add value |
Expanding existing copyright statements edit
works without proper qualifiers whos creators died more than 100 years ago edit
SELECT ?item ?itemLabel ?mdod with
{ select DISTINCT ?item WHERE
{
?item wdt:P6216 ?copyright .
VALUES ?copyright { wd:Q19652 wd:Q15687061 }
hint:Prior hint:rangeSafe true .
FILTER NOT EXISTS { ?item p:P6216/pq:P1001 wd:Q60332278} # exclude if P1001 for USA present
FILTER NOT EXISTS { ?item p:P6216/pq:P459 wd:Q29940705} # exclude if P459 for PD-1923 present
} } as %i with {
select ?item (max(?dod) as ?mdod) where
{ # look through all the authors and other creators of the work and look up their date of death, than find the latest
include %i
?item wdt:P50|wdt:P170|wdt:P655|wdt:P84|wdt:P110|wdt:P287|wdt:P98|wdt:P86|wdt:P87|wdt:p57|wdt:P676 ?creator .
?creator wdt:P570 ?dod .
} group by ?item } as %j
where
{
include %j
hint:Prior hint:rangeSafe true .
FILTER(?mdod < "1920-00-00T00:00:00"^^xsd:dateTime) . # make sure last creator date of death is before 1918
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
works without proper qualifiers which were published more than 95 years ago edit
- Count them
SELECT (count( ?item ) as ?cnt) {
?item wdt:P6216 ?copyright .
VALUES ?copyright { wd:Q19652 wd:Q15687061 } # P6216 main value = public domain
?item wdt:P577 ?dop .
FILTER(YEAR(?dop) < 1924) # exclude if date of publication < 1924
FILTER NOT EXISTS { ?item p:P6216/pq:P1001 wd:Q30} # exclude if P1001 for USA present
FILTER NOT EXISTS { ?item p:P6216/pq:P459 wd:Q47246828 } # exclude if P459 for PD-1923 present
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
- Find them
SELECT distinct ?item ?itemLabel {
?item wdt:P6216 ?copyright .
VALUES ?copyright { wd:Q19652 wd:Q15687061 } # P6216 main value = public domain
?item wdt:P577 ?dop .
FILTER(YEAR(?dop) < 1924) # exclude if date of publication < 1924
FILTER NOT EXISTS { ?item p:P6216/pq:P1001 wd:Q30} # exclude if P1001 for USA present
FILTER NOT EXISTS { ?item p:P6216/pq:P459 wd:Q47246828 } # exclude if P459 for PD-1923 present
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} LIMIT 100
Finding items with incorrect copyright statements edit
Find items where one of the authors is dead less than 100 years while claiming 100 year pma edit
SELECT distinct ?item ?itemLabel ?creatorLabel ?dod{
?item wdt:P50|wdt:P170|wdt:P655|wdt:P84|wdt:P110|wdt:P287|wdt:P98|wdt:P86|wdt:P87|wdt:p57|wdt:P676 ?creator .
?creator wdt:P570 ?dod
FILTER(YEAR(?dod) > 1918) # exclude if date of death < 1919
?item p:P6216/pq:P1001 wd:Q60332278 .
?item p:P6216/pq:P459 wd:Q29940705 .
MINUS {?item p:P6216/pq:P518 []} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Order by ?creatorLabel
LIMIT 100
Find items without listed authors while claiming 100 year pma edit
For anything created more than 200 years ago, we can assume that authors are dead for at least 100 years.
SELECT distinct ?item ?itemLabel ?date {
# items claiming 100 year pma
?item p:P6216/pq:P1001 wd:Q60332278 .
?item p:P6216/pq:P459 wd:Q29940705 .
# assume authors dead for more than 100 years if published or created more than 200 years ago
?item wdt:P571|wdt:P577 ?date
FILTER (?date > "1819-01-01T00:00:01"^^xsd:dateTime)
# skip if authors listed
MINUS {?item wdt:P50|wdt:P170|wdt:P655|wdt:P84|wdt:P110|wdt:P287|wdt:P98|wdt:P86|wdt:P87|wdt:P57|wdt:P676 []} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
LIMIT 200
Find items where one of the authors is dead less than 70 years while claiming 70 year pma edit
SELECT distinct ?item ?itemLabel ?creatorLabel ?dod{
?item wdt:P50|wdt:P170|wdt:P655|wdt:P84|wdt:P110|wdt:P287|wdt:P98|wdt:P86|wdt:P87|wdt:p57|wdt:P676 ?creator .
?creator wdt:P570 ?dod
FILTER(YEAR(?dod) > 1948) # exclude if date of death < 1919
?item p:P6216/pq:P1001 wd:Q59542795 .
?item p:P6216/pq:P459 wd:Q29870196 .
MINUS {?item p:P6216/pq:P518 []} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Order by ?creatorLabel
LIMIT 100
Find items using something that is not a copyright determination method as a determination method edit
# Find items using something that is not a copyright determination method as a determination method
SELECT ?item ?itemLabel ?method WHERE {
?item p:P6216 [
pq:P459 ?method
].
MINUS {
?method wdt:P31 wd:Q61005213
}
# SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Finding items with incomplete copyright statements edit
Items with copyright statements but without any qualifiers edit
SELECT distinct ?item ?itemLabel {
?item p:P6216 ?statement .
?statement ps:P6216 ?pd . # get P6216 main value
VALUES ?pd { wd:Q19652 wd:Q15687061 } # P6216 main value = public domain
FILTER NOT EXISTS { ?statement pq:P1001 [] } # exclude if P1001 present
FILTER NOT EXISTS { ?statement pq:P459 [] } # exclude if P459 present
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} LIMIT 1000
SELECT ?item
WHERE {
?item p:P6216 ?statement .
?statement ps:P6216 wd:Q19652 . # copyright status = public domain
OPTIONAL {?statement pq:P459 ?p .} .
OPTIONAL {?statement pq:P1001 ?q } .
FILTER( !BOUND( ?p ) ) . # exclude if P459 qualifier present
FILTER( !BOUND( ?q ) ) . # exclude if P1001 qualifier present
} order by ?det
LIMIT 1000
Items with copyright statements missing applies to jurisdiction (P1001) statement edit
Public domain items with determination method (P459) but missing applies to jurisdiction (P1001) statement
SELECT ?item ?itemLabel ?det ?detLabel
WHERE {
?item p:P6216 ?statement .
?statement ps:P6216 ?pd . # copyright status = public domain
VALUES ?pd { wd:Q19652 wd:Q15687061 }
OPTIONAL {?statement pq:P459 ?det .} .
#FILTER NOT EXISTS { ?statement pq:P1001 [] }
OPTIONAL { ?statement pq:P1001 ?q } .
FILTER( !BOUND( ?q ) ) . # exclude if P1001 qualifier present
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
} order by ?det
LIMIT 1000
Items with copyright statements missing determination method (P459) statement edit
Public domain items with applies to jurisdiction (P1001) but missing determination method (P459) statement
SELECT distinct ?item ?itemLabel
WHERE {
?item p:P6216 ?statement .
?statement ps:P6216 ?pd . # copyright status = public domain
VALUES ?pd { wd:Q19652 wd:Q15687061 }
OPTIONAL {?statement pq:P1001 ?det .} . # record jurisdiction if present
FILTER NOT EXISTS { ?statement pq:P459 [] } # item missing "determination method" statement
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}
LIMIT 1000
Other Maintenance edit
Unique qualifier combinations for public domain items edit
Inspect unique applies to jurisdiction (P1001) and determination method (P459) pair combinations for public domain items. Unusual combinations might indicate errors.
SELECT ?jLabel ?dLabel ?num ?sampleitem with
{
SELECT distinct ?j ?d (count(*) as ?num) (SAMPLE(?item) as ?sampleitem) where
{
?item p:P6216 ?statement .
?statement ps:P6216 ?pd . # copyright status = public domain
?statement pq:P1001 ?j .
?statement pq:P459 ?d .
VALUES ?pd { wd:Q19652 wd:Q15687061 }
} group by ?j ?d } as %i
where
{
include %i
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
order by desc(?num)
Limit 1000
Unique qualifier combinations for copyrighted items edit
Inspect unique copyright license (P275), applies to jurisdiction (P1001) and determination method (P459) combinations for public domain items. Unusual combinations might indicate errors.
SELECT ?jLabel ?dLabel ?lLabel ?num ?sampleitem with
{
SELECT distinct ?j ?d ?l (count(*) as ?num) (SAMPLE(?item) as ?sampleitem) where
{
?item p:P6216 ?statement .
?statement ps:P6216 wd:Q50423863 . # copyright status = copyrighted
optional { ?statement pq:P1001 ?j . }
optional { ?statement pq:P459 ?d . }
optional { ?statement pq:P275 ?l . }
} group by ?j ?d ?l} as %i
where
{
include %i
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
order by desc(?num)
Limit 1000