Feature summary
Implement a pre-calculated index or a native SPARQL function in the Wikidata Query Service (WDQS) to retrieve the "Day of Life" count (the delta in days between P569/Birth and P585/Event date). This index should be accessible via both SPARQL and the MediaWiki "On this day" API.
Use case(s)
While developing a "Biological Chronology" tool, I found that retrieving the relative age of historical figures in days (e.g., "What was Mozart's age in days at his first concert?") requires complex DATEDIFF boilerplate in SPARQL.
The underlying problems are:
- Computational Overhead: Calculating this delta on-the-fly for millions of entities is resource-intensive for WDQS.
- Technical Complexity: Handling calendar shifts (Julian/Gregorian) and precision levels manually in queries often leads to errors for third-party developers.
- Lack of Personalization: Current APIs are tied to absolute dates, making it impossible to perform efficient "human-scale" queries like "Find all events that happened to anyone on their 10,000th day of life."
Proposed Solution
Create a dedicated property or a computed index (e.g., wikibase:ageInDays) that stores the integer value of the difference between birth (P569) and a significant event (P585/P166/P793). This allows for O(1) lookups instead of expensive runtime calculations.
Examples of "Day of Life" milestones:
- Mozart (Q1192): Day 2,451 (First concert)
- Anne Frank (Q7339): Day 5,528 (Last diary entry)
- Marie Curie (Q7166): Day 13,181 (First Nobel Prize)
- Peter Higgs (Q103685): Day 30,352 (Experimental proof of Higgs boson)
Benefits & Impact
- Performance: Pre-calculating this metadata reduces server load by replacing expensive calculations with simple integer lookups.
- New Utility: This transforms Wikidata into a "Big Data-driven Life Coaching Tool", enabling a new class of educational apps (e.g., personalized "Day of Life" RSS feeds).
- Engagement: It creates a direct psychological connection between users and history by comparing life paths on a universal human scale (days lived).
Link to community discussion: https://www.wikidata.org/wiki/Wikidata:Project_chat#Proposal:_Implementing_%22Lifespan_Day-Indexing%22_%E2%80%94_Transforming_Wikidata_into_a_Personal_Motivation_Engine