Last month I looked at all Wikimedia Commons revisions and managed to generate some data and graphs for the usage of depicts statements since they were introduced on the project.
This month, I have applied the same analysis on Wikidata but looking at instance of and subclasses of items. A slightly bigger data set, however essentially the same process.
This will enable easy updating, of various pie charts that have been published over the years, such as
- https://commons.wikimedia.org/wiki/File:WikidataStatisticsofWikipediaType_of_content.png from 2015
- Wikidata:Statistics pie chart, that is generated by Module:Statistical_data/by_project/classes, but has not updated since 2020
- https://commons.wikimedia.org/wiki/File:Wikidata_content_2024.svg which was generated in 2024
In future, this could be easily adapted to show per Wikipedia project graphs, such as those that are currently at Wikidata:Statistics/Wikipedia
Method
The details of the method can be seen in code in my previous post about depicts statements, and this mostly stays the same.
In words:
- Look at every revision of Wikidata ever
- Parse the JSON to determine what values there are for P31 and P279 for each revision
- Find the latest revision of each item in each given month, and thus find the state of all items in that month
- Plot the data by number of items that are P31 or P279 of each value item
There are some minor defects to this logic currently that could be cleaned up with future iterations:
- Deleted items will continue being counted, as I don’t consider the point items are deleted
- Things will be double counted in this data, as 1 item may have multiple P31 and P279 values, and I don’t try to join these into higher level concept at all
We make an OTHER and UNALLOCATED count as part of the final data summarization. OTHER accounts for things that have not made it into the top 20 items by count, and UNALLOCATED means that we didn’t have a P31 or P279 value in the latest revision.
2025
For August 2025 (or at least part way through it), this is the current state of Wikidata per the above method.
You can now find a PNG of this pie chart on Wikimedia Commons https://commons.wikimedia.org/wiki/File:Wikidata_P31_%26_P279_analysis_August_2025.png