Open MansMeg opened 1 year ago
OT One thing I have missed is to match "Johansson i Rimforsa" to Rimforsa (Q1019412)
For pictures we have a construction with depicts P180
@salgo60 Two questions.
@salgo60 Two questions.
- I cant find your object i riksdagen kallad? In the above example it is just name (X i Rimforsa)?
- We might need to detail ”i riksdagen kallad” further by date (since some mps change their iort over time).
@MansMeg
==> SPARQL / query retrieve the Node P2561 and then the reference ( still work in progress)
To see Q number/ P numbers as in the picture add the gadgets I have in my common.js to your Special:MyPage/common.js (you need an account) see also #123
see #139
@MansMeg if you in the query editor click code you will get the code to use to retrieve the data from a program - video
# pip install sparqlwrapper
# https://rdflib.github.io/sparqlwrapper/
import sys
from SPARQLWrapper import SPARQLWrapper, JSON
endpoint_url = "https://query.wikidata.org/sparql"
query = """#title: object i riksdagen kallad i Wikidata for 1st and 2nd
SELECT ?person ?personLabel ?oit ?serial ?sourcevolume ?sourcepage ?SPA {
values ?befattning {wd:Q110346241 wd:Q81531912} # 1st 2nd
?person wdt:P39 ?befattning.
?person p:P2561 ?nodeOIT.
?nodeOIT ps:P2561 ?oit.
?nodeOIT pq:P3831 wd:Q110382440 # I riksdagen kallad
OPTIONAL {?nodeOIT pq:P1545 ?serial}
OPTIONAL{?nodeOIT prov:wasDerivedFrom [ pr:P4819 ?SPAid ] }
OPTIONAL{?nodeOIT prov:wasDerivedFrom [ pr:P304 ?sourcepage ] }
OPTIONAL{?nodeOIT prov:wasDerivedFrom [ pr:P478 ?sourcevolume ] }
OPTIONAL{?nodeOIT prov:wasDerivedFrom [ pr:P1810 ?sourcenameas ] }
BIND(URI(CONCAT("https://portrattarkiv.se/details/",?SPAid)) AS ?SPA)
SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". }
} order by ?personLabel"""
def get_results(endpoint_url, query):
user_agent = "WDQS-example Python/%s.%s" % (sys.version_info[0], sys.version_info[1])
# TODO adjust user agent; see https://w.wiki/CX6
sparql = SPARQLWrapper(endpoint_url, agent=user_agent)
sparql.setQuery(query)
sparql.setReturnFormat(JSON)
return sparql.query().convert()
results = get_results(endpoint_url, query)
for result in results["results"]["bindings"]:
print(result)
Great!
Yes. We don't have a source for that per se. But I guess that could be arranged when we look into this. @Lottabrorsson , do you know if the i-orts are set/defined somewhere in the protocols? Maybe the first day of parliament or so? I.e. is there somewhere we could look up and reference when it comes to changes in iort?
If we find a good reference, is it possible to add a start and end date for the iort object in wikidata, @salgo60 ?
If we find a good reference, is it possible to add a start and end date for the iort object in wikidata, @salgo60 ?
YES that would be great but give us a persistent identifier to the source so we can quote it and other people can understand why we have a date #148 #208
The problem is not updating Wikidata ´the problem is that everyone can update Wikidata and 12 000 people are doing it every month... 😨 - listen to the changes
I would like to see usage of P1214 "time of earliest written record"
Right now I see that Wikidata is your friend but I hope that we in the future will get the persistent identifiers from you and you are the most trusted source in this equation.....
cc: @dpriskorn has added a lot of word usage to Wikidata from Riksdagen
I would like to see usage of P1214 "time of earliest written record"
Just curious -- why this and not P580 & P582 (start time and end time)?
I would like to see usage of P1214 "time of earliest written record"
Just curious -- why this and not P580 & P582 (start time and end time)?
Maybe both ;-) Feels more academic 😅 looks like in WD its used mostly for cities...
I think Riksarkivet used a term like that for Tora but I am not sure...
I feel step 1 is to start define your data and then use SKOS/Simple Knowledge Organization System and make it 5 star data see my test #129
Now we are fetching iort from wikidatas alias (where iort has also been updated manually in the project). @salgo60 has created a more formal object called "i riksdagen kallad" that contain the information more specifically. We should transition to using this, more specific, object instead. Although this is not as updated as the alias. Hence, I see that we need to do the following: