I've a list of Entities from Wikidata
listOfKeys = {"Ambientalismo", "Anoressia", "Aspetto fisico",
"Attivismo", "Burocrazia", "COVID-19", "Cambiamento climatico",
"Canoni estetici"};
list3 = First[#, Missing["NotFound"]] & /@ (WikidataSearch /@
listOfKeys) //DeleteMissing
Then I defined a function to look for the parent of the Entity and apply it to the element of the list: (this instruction
ExternalIdentifier["WikidataID",
"P279", <|"Label" -> "SubclassOf"|>]
means that the ID is P279 and it's human readable meaning is SubclassOf)
findParent := # ->
WikidataData[#,
ExternalIdentifier["WikidataID",
"P279", <|"Label" -> "SubclassOf"|>]] &
Graph[findParent /@ list3]
The result first problem is that the graph should connect an entity to another entity, while I get a list of associations between 1 entity and a list of entities.