This project contains:
- A list of Cardinals obtained from Wikidata with a SPARQL query:
wikidata_cardinals.csv - A list of Cardinals obtained by scraping the College of Cardinals Dashboard (page 2):
vatican_cardinals.csv - A script to compare the two lists:
compare_cardinal_lists.py
Both lists contain 252 names and most differences have been solved (see Differences below).
$ ./compare_cardinal_lists.py -h
usage: compare_cardinal_lists.py [-h] [--output-dir OUTPUT_DIR] <wikidata> <vatican>
positional arguments:
<wikidata> Wikidata data.
<vatican> Vatican data.
options:
-h, --help show this help message and exit
--output-dir OUTPUT_DIR
Output directory [default: output].The script produces up to 5 files:
different_birthdate_wikidata_cardinals.csv, containing the pairs of cardinals with a different birth date.different_cardinal_start_wikidata_cardinals.csv, containing the pairs of cardinals with a different starting date for their cardinalitial tenure.fuzzymatch_wikidata_cardinals.csv, containing a list of the names that were fuzzy matched.missing_vatican_cardinals.csv, containing the names that appeaer in the Wikidata list, but are missing in the Vatican list.missing_wikidata_cardinals12.csv, containing the names that appeaer in the Vatican list, but are missing in the Wikidata list.
This is the query that produces wikidata_cardinals.csv.
It deduplicate results for people that have held multiple cardinal roles. It display the earliest time the person became a cardinal. It considers all the subclasses of cardinal recursively (so also subclasses of cardinal-deacon, cardinal-priest and cardinal-bishop).
SELECT DISTINCT ?cardinal ?cardinalLabel ?cardinalTypeSampleLabel ?birthDate ?birthPlaceLabel (?earliestCardinalStartTime AS ?cardinalStartTime) ?bishopStartTime ?priestStartTime WHERE {
# Subquery: Precompute earliest cardinalStartTime per cardinal
{
SELECT ?cardinal (MIN(?cardinalStartTime) AS ?earliestCardinalStartTime) (SAMPLE(?cardinalType) AS ?cardinalTypeSample) WHERE {
?cardinal wdt:P31 wd:Q5;
p:P39 ?cardinalPosition.
?cardinalPosition ps:P39 ?cardinalType.
OPTIONAL { ?cardinalPosition pq:P580 ?cardinalStartTime. }
# Only cardinal types (dynamic)
?cardinalType wdt:P279* wd:Q45722.
}
GROUP BY ?cardinal
}
# Main query
?cardinal wdt:P31 wd:Q5;
wdt:P569 ?birthDate;
p:P39 ?cardinalPosition.
?cardinalPosition ps:P39 ?cardinalType.
OPTIONAL { ?cardinalPosition pq:P580 ?cardinalStartTime. }
# Only cardinal types (dynamic)
?cardinalType wdt:P279* wd:Q45722.
# Filter to only the earliest cardinal position
FILTER(?cardinalStartTime = ?earliestCardinalStartTime)
FILTER(?birthDate > "1900-01-01"^^xsd:dateTime)
FILTER(NOT EXISTS { ?cardinal wdt:P570 ?deathDate. })
OPTIONAL { ?cardinal wdt:P19 ?birthPlace. }
OPTIONAL {
?cardinal p:P106 ?bishopPosition.
?bishopPosition ps:P106 wd:Q611644;
pq:P580 ?bishopStartTime.
}
OPTIONAL {
?cardinal p:P106 ?priestPosition.
?priestPosition ps:P106 wd:Q250867;
pq:P580 ?priestStartTime.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it". }
}
ORDER BY (?birthDate)As of today (2025-04-27), the differences between the two lists are the following:
-
The date format in the College of Cardinals Dashboard is inconsistent, sometimes
DD/MM/YYYYis used, other timesMM/DD/YYYYis used. Invatican_cardinals.csvwe useYYYY-MM-DD. For example, Cardinal Jean-Paul Vesco's birth date is 10 March 1962 (displaied asDD/MM/YYYY), but the proclamation date is 7 December 2024 (displaied asMM/DD/YYYY). -
The date of birth of Cardinal Toribio Ticona Porco (Q2444070) is unclear some sources report
1937-04-25[1] (used in Wikidata), while other sources report1937-05-23[2, 3] (used in the Vatican list).
The data is also available in an HTML table format at Vatican Press Office. The script vatican_cardinals_from_html.sh extracts this data using web scraping techniques.
The script:
- Uses
scrape-clito extract the HTML table data - Processes the table rows using
xq(from yq) to transform them into JSONL format - For each cardinal, extracts:
- name
- URL of their biographical page
- birth date (converting it to ISO format YYYY-MM-DD)
- type of cardinal
- who created them as cardinal
- country
- continent
- Saves the output in
vatican_cardinals_from_html.jsonl
Usage:
vatican_cardinals_from_html.sh [-o OUTPUT_FILE] [--csv]
vatican_cardinals_from_html.sh (-h | --help)
Extract the list of Cardinals in JSONL or CSV format from:
https://press.vatican.va/content/salastampa/it/documentation/cardinali---statistiche/elenco_per_eta.html
Options:
-o OUTPUT_FILE, Output file name [default: vatican_cardinals_from_html.<ext>]
--output-file OUTPUT_FILE
--csv Convert the results into CSV.
-h, --help Show this help and exits.The output is in jsonlines (.jsonl) format:
{"nome":"ACERBI Card. Angelo","url":"https://press.vatican.va/content/salastampa/it/documentation/cardinali_biografie/cardinali_bio_acerbi_a.html","data_di_nascita":"1925-09-23","tipo":"Non Elettore","creato_da":"Francesco","paese":"Italia","continente":"Europa"}
{"nome":"KARLIC Card. Estanislao Esteban","url":"https://press.vatican.va/content/salastampa/it/documentation/cardinali_biografie/cardinali_bio_karlic_ee.html","data_di_nascita":"1926-02-07","tipo":"Non Elettore","creato_da":"Benedetto XVI","paese":"Argentina","continente":"America del Sud"}
{"nome":"WAMALA Card. Emmanuel","url":"https://press.vatican.va/content/salastampa/it/documentation/cardinali_biografie/cardinali_bio_wamala_e.html","data_di_nascita":"1926-12-15","tipo":"Non Elettore","creato_da":"S. Giovanni Paolo II","paese":"Uganda","continente":"Africa"}
...
or in CSV (.csv) format, with the --csv:
nome,url,data_di_nascita,tipo,creato_da,paese,continente
ACERBI Card. Angelo,https://press.vatican.va/content/salastampa/it/documentation/cardinali_biografie/cardinali_bio_acerbi_a.html,1925-09-23,Non Elettore,Francesco,Italia,Europa
KARLIC Card. Estanislao Esteban,https://press.vatican.va/content/salastampa/it/documentation/cardinali_biografie/cardinali_bio_karlic_ee.html,1926-02-07,Non Elettore,Benedetto XVI,Argentina,America del Sud
WAMALA Card. Emmanuel,https://press.vatican.va/content/salastampa/it/documentation/cardinali_biografie/cardinali_bio_wamala_e.html,1926-12-15,Non Elettore,S. Giovanni Paolo II,Uganda,Africas
...
Authors:
The code is released under the MIT license, see LICENSE.md for details. The data is released under CC0 1.0 Universal - Public Domain Dedication.
