KM Wikidata export
KM aipatzen duten ASJU artikuluak
PREFIX iwb: <https://wikibase.inguma.eus/entity/>
PREFIX idp: <https://wikibase.inguma.eus/prop/direct/>
PREFIX ip: <https://wikibase.inguma.eus/prop/>
PREFIX ips: <https://wikibase.inguma.eus/prop/statement/>
PREFIX ipq: <https://wikibase.inguma.eus/prop/qualifier/>
select distinct ?aipatzen_duena ?title ?data (group_concat(distinct strafter(str(?egilea),str(iwb:))) as ?egileak)
?issue ?sp ?ep
where {
?oocc_item ip:P89 ?oocc_st.
?aipatzen_duena idp:P37 iwb:Q13228; idp:P62 [idp:P88* ?oocc_item].
filter not exists {?aipatzen_duena idp:P1 ?wd.}
?aipatzen_duena idp:P19 ?data; idp:P17 ?egilea; idp:P10 ?title. filter(lang(?title)="eu")
?aipatzen_duena idp:P20 ?doi.
optional {?aipatzen_duena idp:P26 ?issue.}
optional {?aipatzen_duena idp:P27 ?sp.}
optional {?aipatzen_duena idp:P28 ?ep.}
}
group by ?aipatzen_duena ?title ?data ?egileak ?issue ?sp ?ep
Find Wikidata-article using DOI
PREFIX iwb: <https://wikibase.inguma.eus/entity/>
PREFIX idp: <https://wikibase.inguma.eus/prop/direct/>
PREFIX ip: <https://wikibase.inguma.eus/prop/>
PREFIX ips: <https://wikibase.inguma.eus/prop/statement/>
PREFIX ipq: <https://wikibase.inguma.eus/prop/qualifier/>
select distinct ?wb_item ?title ?doi ?wd_item ?wd_doi
where {
?wb_item idp:P37 iwb:Q13228; idp:P62 ?cit.
filter not exists { ?wb_item idp:P1 ?linked_wd.}
?wb_item idp:P19 ?data; idp:P10 ?title. filter(lang(?title)="eu")
?wb_item idp:P20 ?doi. bind (ucase(?doi) as ?wd_doi)
# bind(iri(concat(str(wd:),?linked_wd)) as ?wd_item)
SERVICE <https://query.wikidata.org/sparql> {
select * where
{?wd_item wdt:P356 ?wd_doi.
} }
} order by ?doi
Find Wikidata-creator using inguma
PREFIX iwb: <https://wikibase.inguma.eus/entity/>
PREFIX idp: <https://wikibase.inguma.eus/prop/direct/>
PREFIX ip: <https://wikibase.inguma.eus/prop/>
PREFIX ips: <https://wikibase.inguma.eus/prop/statement/>
PREFIX ipq: <https://wikibase.inguma.eus/prop/qualifier/>
select distinct ?egilea ?egilea_label ?wd ?wikidata ?inguma ?ing_wikidata
where {
?oocc_item ip:P89 ?oocc_st.
?aipatzen_duena idp:P37 iwb:Q13228; idp:P62 [idp:P88* ?oocc_item].
?aipatzen_duena idp:P19 ?data; idp:P17 ?egilea; idp:P10 ?title. filter(lang(?title)="eu")
?egilea rdfs:label ?egilea_label. filter(lang(?egilea_label)="en")
optional {?egilea idp:P3 ?inguma.}
optional {
SERVICE <https://query.wikidata.org/sparql> {
select ?ing_wikidata ?inguma where
{?ing_wikidata wdt:P7558 ?inguma.}
} }
optional {?egilea idp:P1 ?wd. bind(iri(concat(str(wd:),?wd)) as ?wikidata)}
}
Export ASJU articles (for articles-to-wikidata.py)
PREFIX iwb: <https://wikibase.inguma.eus/entity/>
PREFIX idp: <https://wikibase.inguma.eus/prop/direct/>
PREFIX ip: <https://wikibase.inguma.eus/prop/>
PREFIX ips: <https://wikibase.inguma.eus/prop/statement/>
PREFIX ipq: <https://wikibase.inguma.eus/prop/qualifier/>
select distinct ?aipatzen_duena ?wd ?inguma ?title ?data (group_concat(distinct concat('"',?sordinal,'": "',?wd_egilea,'"'); SEPARATOR=", ") as ?wd_egileak)
?issue ?sp ?ep ?doi
where {
?aipatzen_duena idp:P37 iwb:Q13228; idp:P62 ?cit.
?aipatzen_duena idp:P19 ?data; ip:P17 [ips:P17 ?egilea; ipq:P36 ?sordinal]; idp:P10 ?title. filter(lang(?title)="eu")
?aipatzen_duena idp:P20 ?doi.
?egilea idp:P1 ?wd_egilea.
filter not exists {?aipatzen_duena idp:P1 ?wd.}
optional {?aipatzen_duena idp:P12 ?inguma.}
optional {?aipatzen_duena idp:P26 ?issue.}
optional {?aipatzen_duena idp:P27 ?sp.}
optional {?aipatzen_duena idp:P28 ?ep.}
}
group by ?aipatzen_duena ?wd ?inguma ?title ?data ?wd_egileak ?issue ?sp ?ep ?doi
Export OOCC articles (for oocc-to-wikidata.py)
PREFIX iwb: <https://wikibase.inguma.eus/entity/>
PREFIX idp: <https://wikibase.inguma.eus/prop/direct/>
PREFIX ip: <https://wikibase.inguma.eus/prop/>
PREFIX ips: <https://wikibase.inguma.eus/prop/statement/>
PREFIX ipq: <https://wikibase.inguma.eus/prop/qualifier/>
select distinct ?oocc_item ?title (group_concat(distinct concat('"',?sordinal,'": "',?wd_egilea,'"'); SEPARATOR=", ") as ?wd_egileak)
?pag ?oocc ?oocc_wd (count(?citing) as ?citations) (min(?old_date) as ?data) ?wd_container
where { # values ?oocc { iwb:Q40479 iwb:Q40483 iwb:Q40482 iwb:Q40474 iwb:Q40484 iwb:Q40481 iwb:Q40480 iwb:Q40485 iwb:Q40473 iwb:Q40478 iwb:Q40472 iwb:Q40471 iwb:Q40476 iwb:Q40477 }
?oocc_item idp:P42 ?oocc.
?km_item idp:P88* ?oocc_item.
?citing idp:P62 ?km_item.
?km_item idp:P19 ?old_date.
?oocc idp:P1 ?oocc_wd.
?oocc_item idp:P19 ?data; ip:P17 ?creator_st.
optional {?creator_st ips:P17 ?egilea.}
optional {?creator_st ipq:P36 ?sordinal.}
?oocc_item idp:P10 ?title.
?oocc_item idp:P42 [idp:P1 ?wd_container].
?egilea idp:P1 ?wd_egilea.
# filter not exists {?oocc_item idp:P1 ?wd.}
optional {?oocc_item idp:P12 ?inguma.}
optional {?oocc_item idp:P26 ?issue.}
optional {?oocc_item idp:P80 ?pag.}
}
group by ?oocc_item ?title ?wd_egileak ?pag ?oocc ?oocc_wd ?citations ?data ?wd_container
order by desc(?citations)