Zenderl / conseil_federal

projet pour le cours en humanites numeriques unine 2023-2024 sujet pour le catalogue, le conseil federal entre 1848 et 2023. Et pour le 2e semestre, le Conseil national entre 1950 et 2019
Creative Commons Attribution Share Alike 4.0 International
0 stars 1 forks source link

ajout du genre #2

Open Zenderl opened 6 months ago

Zenderl commented 6 months ago

J'aurais besoin de rajouter une catégorie pour le genre dans les select. Serait-il aussi possible d'expliquer dans un tutorat comment on rajoute des catégorie et comment on les inclue dans les conditions pour que la case ne soient pas mis comme vide.

Bien à vous, Lara

SELECT DISTINCT ?item ?itemLabel ?itemDescription ?birthYear ?position ?positionLabel ?startYear ?startTime ?endTime where { ?item wdt:P31 wd:Q5; # Any instance of a human. p:P39 ?statement. ?statement ps:P39 wd:Q18510612; ps:P39 ?position; pq:P580 ?startTime; pq:P582 ?endTime. ?item wdt:P569 ?birthDate. BIND(REPLACE(str(?startTime), "(.)([0-9]{4})(.)", "$2") AS ?startYear) BIND(REPLACE(str(?birthDate), "(.)([0-9]{4})(.)", "$2") AS ?birthYear)

FILTER (?startYear > '1950')

SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } } ORDER BY ?startYear LIMIT 900

atterebf commented 5 months ago

voilà — il y a encore quelques améliorations à apporter, ce sera la semaine prochaine

SELECT DISTINCT ?item ?itemLabel ?itemDescription ?birthYear ?gender ?genderLabel ?position ?positionLabel ?startYear ?startTime ?endTime
where {
?item wdt:P31 wd:Q5; # Any instance of a human.
p:P39 ?statement.
?statement ps:P39 wd:Q18510612;
ps:P39 ?position;
pq:P580 ?startTime;
pq:P582 ?endTime.
?item wdt:P569 ?birthDate.
?item wdt:P21 ?gender
BIND(REPLACE(str(?startTime), "(.)([0-9]{4})(.)", "$2") AS ?startYear)
BIND(REPLACE(str(?birthDate), "(.)([0-9]{4})(.)", "$2") AS ?birthYear)

FILTER (?startYear > '1950')

SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?startYear
LIMIT 900