Page MenuHomePhabricator

Reproduce the data needed for Wikidata:Statistics pie chart in an automated way
Closed, ResolvedPublic

Description

I don't want to start looking at the Lua that looks like it is generating this chart...

The chart shows the spread of P31/P279 throughout all wikidata items.

I believe this should be trivial to recreate using SPARQL.

SELECT (count(distinct(?s)) AS ?scount) WHERE {?s wdt:P31 wd:Q5}

etc.

Details

Related Gerrit Patches:
analytics/limn-wikidata-data : masterAdd instanceof tracking script

Event Timeline

Addshore created this task.Nov 19 2015, 2:27 PM
Addshore raised the priority of this task from to Needs Triage.
Addshore updated the task description. (Show Details)
Addshore added a subscriber: Addshore.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptNov 19 2015, 2:27 PM
Addshore added a subscriber: Lydia_Pintscher.EditedNov 26 2015, 1:21 PM

@Lydia_Pintscher
The question is do we generally want to track the number of statements for each property or only for this specific use case?

We might even be able to do this from some links table rather than from SPARQL

It should be noted in the other dash we were tracking for all of them !

I am mostly interested in this particular usecase - so tracking how many items we have for the biggest categories of entities.

Addshore triaged this task as Normal priority.Nov 27 2015, 9:24 PM
Addshore set Security to None.

Change 255975 had a related patch set uploaded (by Addshore):
Add instanceof tracking script

https://gerrit.wikimedia.org/r/255975

Change 255975 merged by Addshore:
Add instanceof tracking script

https://gerrit.wikimedia.org/r/255975

Addshore closed this task as Resolved.Nov 30 2015, 9:11 PM
Addshore claimed this task.

Done, rough graph has been added to https://grafana.wikimedia.org/dashboard/db/wikidata-datamodel for now (although this dash needs cleaning up)