id large_stringlengths 2 10 | label large_stringlengths 0 250 | description large_stringlengths 0 286 |
|---|---|---|
Q1469 | Loire | longest river in France |
Q1644 | Elbe | major river in Central Europe |
Q3190 | 2012 Rhythmic Gymnastics European Championships | sporting event |
Q3908 | Galicia | autonomous community of Spain |
Q4358 | 2012 Ukrainian parliamentary election | Ukrainian parliamentary election of 2012 |
Q5351 | Guillaume IX | Duke of Aquitaine and Gascony and Count of Poitou |
Q5902 | Red Dwarf | science-fiction comedy television programme |
Q6654 | Croatian | South Slavic language spoken in Croatia |
Q6775 | Höckendorf | village and former municipality in Saxony, Germany |
Q7788 | Khabarovsk Krai | federal subject of Russia |
Q10034 | Bunschoten | municipality in the Netherlands |
Q10237 | Romano Canavese | Italian comune |
Q10640 | Football Manager | series of association football management simulation games |
Q10830 | Montecastrilli | town in the region Umbria, Italy |
Q11052 | Nümbrecht | municipality in the Oberbergischer Kreis, in Northrhine-Westfalia, Germany |
Q11394 | endangered species | species of organisms facing a very high risk of extinction |
Q12751 | Haute-Savoie | French department |
Q14336 | Teruel | municipality of Aragon, Spain, in the province of Teruel and the comarca of Communidad de Teruel |
Q14561 | Wayland | computer display server protocol |
Q15071 | 2010 Australian Grand Prix | 2010 Formula One World Championship race |
Q15802 | Daniel Passarella | Argentine footballer (born 1953) |
Q16303 | Cormot-le-Grand | former commune in Côte-d'Or, France |
Q16917 | hospital | health care facility |
Q16919 | Malloa | Chilean commune and town |
Q18063 | Donato | Italian comune |
Q18810 | Urohidrosis | habit in some birds |
Q19308 | Hitman | video game series |
Q19365 | Vicente Guaita | Spanish association football player |
Q21029 | ISO 3166-2:HU | entry for Hungary in ISO 3166-2 |
Q21783 | Arzviller | commune in Moselle, France |
Q21795 | Ceratophyllum | genus of plants |
Q22388 | Château-Voué | commune in Moselle, France |
Q22487 | Mandello Vitta | Italian comune |
Q22576 | Santeri Paloniemi | Finnish alpine skier |
Q23261 | Hideaki Anno | Japanese animator, film director, businessman (born 1960) |
Q23882 | ZX Spectrum | series of personal home computers |
Q24707 | Ministry of the colleges and universities of the GDR | body who oversaw higher education in German Democratic Republic |
Q25149 | Aristomachos | Wikimedia disambiguation page |
Q25232 | Benetice | part of Světlá nad Sázavou in Havlíčkův Brod District |
Q27753 | S | Wikimedia disambiguation page |
Q28921 | Hanna Schygulla | German actress and chanson singer |
Q29288 | Caesar | cocktail created and primarily consumed in Canada |
Q29624 | Zhubei City | A county-administered city in Hsinchu County, Taiwan |
Q29774 | International Organization of Supreme Audit Institutions | worldwide affiliation of governmental entities |
Q29880 | Ben Botica | rugby union player |
Q30540 | HAL | Wikimedia disambiguation page |
Q30675 | Minya Governorate | Egyptian governorate |
Q31736 | Larry O'Brien Championship Trophy | basketball trophy |
Q33647 | Kreisgrabenanlage Dresden-Nickern | heritage monument in Dresden, Germany |
Q33663 | Omagua | Tupí-Guaraní language of Peru |
Q33740 | Ormuri | language |
Q33849 | Thianges | commune in Nièvre, France |
Q35533 | Kaingang | Indigenous Brazilian ethnic group |
Q35818 | Fornax Dwarf | dwarf galaxy |
Q36734 | Phoenician | ancient Semitic language of the Mediterranean |
Q36996 | Holy Trinity Cathedral of Tbilisi | Cathedral in Tbilisi, Georgia |
Q37587 | Valentine's Day | holiday observed on February 14 to celebrate love and friendship |
Q37593 | Pyramid Creek Falls Provincial Park | waterfall in Near Blue River |
Q39857 | Rea | Italian comune |
Q40169 | Assyria | Roman province (116–118 AD) |
Q41472 | Mohs scale of mineral hardness | qualitative ordinal scale characterizing scratch resistance of various minerals |
Q41726 | freemasonry | group of fraternal organizations |
Q41753 | Klagenfurt am Wörthersee | capital city of Carinthia, Austria |
Q42375 | International Mother Language Day | worldwide annual observance to promote awareness of linguistic and cultural diversity |
Q42565 | Oggiono | Italian comune |
Q42700 | Khao Manee | cat breed |
Q43269 | Zulia | state of Venezuela |
Q43329 | Gratsjovka | village in Kaliningrad, Russia |
Q43490 | Manicoré | municipality of Brazil |
Q44113 | I Don't Know Anything | single |
Q44732 | Battle of the Golden Spurs | 1302 battle between Flamish citizens and the king |
Q45456 | Ainsley Howard | British actress |
Q45573 | Eli Whiteside | American baseball catcher |
Q45579 | Marie des Anges | Italian religious |
Q45580 | Franz Stelzhamer | (1802-1874) |
Q46631 | Vazzola | Italian comune |
Q47092 | rape | type of sexual assault usually involving sexual intercourse without consent |
Q47978 | Hatana | islet in Rotuma, a dependency of Fiji |
Q48481 | Torri del Benaco | commune in Province of Verona |
Q49278 | Order of Railroad Telegraphers | United States labor union established in the late nineteenth century to promote the interests of telegraph operators working for the railroads |
Q49393 | projectile | any object thrown into space (empty or not) by the exertion of a force |
Q49751 | voiced pharyngeal fricative | type of consonantal sound used in some spoken languages |
Q51269 | ? | episode of Lost (S2 E21) |
Q52103 | Talla | Italian comune |
Q53553 | Alexa Glatch | American tennis player |
Q53793 | Siedenbollentin | municipality of Germany |
Q54232 | Oreol 1 | |
Q54414 | 1992 Brazilian Grand Prix | Formula One motor race held at Interlagos |
Q55191 | Katherine Pulaski | fictional character, chief medical officer in Star Trek: The Next Generation |
Q55339 | Pichanges | commune in Côte-d'Or, France |
Q55937 | Polish politician | |
Q56075 | Monsampolo del Tronto | Italian comune |
Q56143 | Chosun University | private university in Gwangju, South Korea |
Q56168 | Timucua | Native American people |
Q56251 | Kera | Chadic language of Chad and Cameroon |
Q56373 | Zeme | Tibetan–Burman language of Northeastern India |
Q56587 | Feylis | Kurdish tribe |
Q57531 | Princess Ludovika, Duchess in Bavaria | Bavarian Royal and Noble (1808-1892) |
Q57534 | Mohammed Magariaf | Libyan politician |
Q58393 | Dodonaea viscosa | species of plant |
End of preview. Expand
in Data Studio
Wikidata Label Maps 2025-08-20
Label maps extracted from the 2025-08-20 Wikidata dump.
Use these to resolve Q and P identifiers to English labels quickly.
Files
entity_map.parquet- columns:id,label,description
Q items. 77.4M rows.prop_map.parquet- columns:id,label,description,datatype
P items. 11,568 rows.
All files are Parquet with Zstandard compression.
Download Options
A) Hugging Face snapshot to a local folder
from huggingface_hub import snapshot_download
local_dir = snapshot_download(repo_id="yashkumaratri/wikidata-label-maps-20250820")
print(local_dir) # contains entity_map.parquet and prop_map.parquet
B) Git LFS
git lfs install
git clone https://huggingface.co/datasets/yashkumaratri/wikidata-label-maps-20250820
Citation
If you find this dataset useful in your research or applications, please consider citing it:
@misc{atri2025wikidatalabelmaps,
title = {Wikidata Label Maps (20250820 snapshot)},
author = {Yash Kumar Atri},
year = {2025},
howpublished = {\url{https://huggingface.co/datasets/yashkumaratri/wikidata-label-maps-20250820}},
note = {Dataset on Hugging Face}
}
This dataset is part of ongoing work on large-scale dynamic knowledge resources; a broader benchmark and paper will be released later.
Usage Examples
Polars
Basic usage:
import polars as pl
pq = pl.read_parquet("entity_map.parquet")
pp = pl.read_parquet("prop_map.parquet")
print(pq.shape, pp.shape)
print(pq.head(3))
print(pp.filter(pl.col("id") == "P31"))
Lazy joins for speed and low memory:
import polars as pl
events = pl.scan_parquet("events_sample.parquet") # needs subj_id, pred_id, maybe obj_id
pp = pl.scan_parquet("prop_map.parquet").select("id","label","datatype").rename({"id":"pred_id","label":"predicate_label","datatype":"predicate_datatype"})
pq = pl.scan_parquet("entity_map.parquet").select("id","label").rename({"id":"subj_id","label":"subject_label"})
resolved = (
events
.join(pp, on="pred_id", how="left")
.join(pq, on="subj_id", how="left")
).collect(streaming=True)
print(resolved.head())
pandas
import pandas as pd
pq = pd.read_parquet("entity_map.parquet", columns=["id","label"])
pp = pd.read_parquet("prop_map.parquet", columns=["id","label","datatype"])
events = pd.read_parquet("events_sample.parquet", columns=["subj_id","pred_id"])
events = events.merge(pp.rename(columns={"id":"pred_id","label":"predicate_label","datatype":"predicate_datatype"}), on="pred_id", how="left")
events = events.merge(pq.rename(columns={"id":"subj_id","label":"subject_label"}), on="subj_id", how="left")
print(events.head())
Hugging Face datasets
from datasets import load_dataset
ds_q = load_dataset("yashkumaratri/wikidata-label-maps-20250820", data_files="entity_map.parquet", split="train")
ds_p = load_dataset("yashkumaratri/wikidata-label-maps-20250820", data_files="prop_map.parquet", split="train")
print(ds_q.num_rows, ds_p.num_rows)
print(ds_p.filter(lambda x: x["id"] == "P31")[:1])
DuckDB SQL
-- in duckdb shell or via Python duckdb.execute
INSTALL httpfs; LOAD httpfs; -- if reading from remote
PRAGMA threads=16;
-- Point to local files if already downloaded
CREATE VIEW entity_map AS SELECT * FROM parquet_scan('entity_map.parquet');
CREATE VIEW prop_map AS SELECT * FROM parquet_scan('prop_map.parquet');
-- Sample lookup
SELECT e.id AS qid, e.label AS q_label, e.description
FROM entity_map e
WHERE e.id IN ('Q155','Q42')
LIMIT 10;
-- Join against an events parquet
SELECT ev.*, p.label AS predicate_label, q.label AS subject_label
FROM parquet_scan('events_sample.parquet') ev
LEFT JOIN prop_map p ON ev.pred_id = p.id
LEFT JOIN entity_map q ON ev.subj_id = q.id
LIMIT 20;
PySpark
from pyspark.sql import SparkSession
spark = SparkSession.builder.getOrCreate()
pq = spark.read.parquet("entity_map.parquet").selectExpr("id as subj_id", "label as subject_label")
pp = spark.read.parquet("prop_map.parquet").selectExpr("id as pred_id", "label as predicate_label", "datatype as predicate_datatype")
ev = spark.read.parquet("events_sample.parquet") # must have subj_id, pred_id
resolved = ev.join(pp, "pred_id", "left").join(pq, "subj_id", "left")
resolved.show(5, truncate=False)
Fast Lookup Helpers
Polars dictionary maps
For very fast lookups when you need to resolve many IDs:
import polars as pl
pq = pl.read_parquet("entity_map.parquet", columns=["id","label"])
pp = pl.read_parquet("prop_map.parquet", columns=["id","label","datatype"])
Q_LABEL = dict(zip(pq["id"].to_list(), pq["label"].to_list()))
P_LABEL = dict(zip(pp["id"].to_list(), pp["label"].to_list()))
P_TYPE = dict(zip(pp["id"].to_list(), pp["datatype"].to_list()))
print(Q_LABEL.get("Q155","Q155"))
print(P_LABEL.get("P31","P31"), P_TYPE.get("P31"))
Minimal resolver class
import polars as pl
class WDResolver:
def __init__(self, entity_parquet: str, prop_parquet: str):
self.q = pl.read_parquet(entity_parquet).select(["id","label"]).rename({"id":"qid"})
self.p = pl.read_parquet(prop_parquet).select(["id","label","datatype"]).rename({"id":"pid"})
def resolve_subjects(self, df: pl.DataFrame, subj_col="subj_id") -> pl.DataFrame:
return (
df.lazy()
.join(self.q.rename({"qid": subj_col, "label": "subject_label"}), on=subj_col, how="left")
.collect(streaming=True)
)
def resolve_predicates(self, df: pl.DataFrame, pred_col="pred_id") -> pl.DataFrame:
return (
df.lazy()
.join(self.p.rename({"pid": pred_col, "label": "predicate_label", "datatype": "predicate_datatype"}), on=pred_col, how="left")
.collect(streaming=True)
)
Utility Functions
Simple quantity unit display example
For displaying Wikidata quantity values with proper unit labels:
def display_quantity(text: str, qlabel_map: dict) -> str:
# Examples: "+267106 1" or "+1234 Q11573" where second token may be a unit QID
if not isinstance(text, str):
return str(text)
parts = text.strip().split()
if not parts:
return text
amt = parts[0].lstrip("+")
if len(parts) == 1:
return amt
unit = parts[1]
if unit.startswith("Q"):
return f"{amt} {qlabel_map.get(unit, unit)}"
return f"{amt} {unit}"
Validator script
To validate the downloaded files:
# validate_maps.py
import polars as pl, os
root = os.path.dirname(__file__) or "."
q = pl.read_parquet(os.path.join(root, "entity_map.parquet"), columns=["id","label","description"])
p = pl.read_parquet(os.path.join(root, "prop_map.parquet"), columns=["id","label","description","datatype"])
print(f"[ok] entity_map rows={q.height:,} unique ids={q.select(pl.col('id').n_unique()).item():,}")
print(f"[ok] prop_map rows={p.height:,} unique ids={p.select(pl.col('id').n_unique()).item():,}")
print("[sample] P31:", p.filter(pl.col("id")=="P31").to_dicts())
print(q.sample(3, seed=42).to_dicts())
Common Use Cases
- Knowledge Graph Processing: Join these maps with your Wikidata triples to get human-readable labels
- Data Analysis: Convert Q/P identifiers in your datasets to meaningful names
- Search & Discovery: Build search indices with proper entity and property names
- Data Validation: Check if your Q/P identifiers exist and get their descriptions
Performance Tips
- Use lazy evaluation with Polars
.scan_parquet()for large datasets - Create dictionary lookups for frequent ID resolution
- Use streaming collection for memory-efficient processing
- Consider loading only the columns you need with
columns=["id","label"]
- Downloads last month
- 42