Wolfram Language

Knowledgebase Expansion

Combine Data from Multiple Domains

In addition to new entities and properties, the Wolfram Knowledgebase has also been enhanced by additional alignment and connections between data domains.

Start with a movie star.

In[1]:=
Click for copyable input
Entity["Person", "MattDamon::88f5d"][ EntityProperty["Person", "Image"]]
Out[1]=

Retrieve a list of his film appearances.

In[2]:=
Click for copyable input
films = Entity["Person", "MattDamon::88f5d"]["MovieAppearances"];

Extract a list of costars for whom some biographical information exists in the Wolfram Knowledgebase.

In[3]:=
Click for copyable input
costars = Cases[DeleteDuplicates[ Flatten[EntityValue[films, "Cast"]]], _Entity];
In[4]:=
Click for copyable input
RandomSample[costars, 10]
Out[4]=

Plot the known birthplaces of costars who have appeared in at least one of Matt Damon's films.

In[5]:=
Click for copyable input
Quiet@GeoGraphics[{Red, PointSize[0.01], Opacity[0.5], Point@DeleteMissing[EntityValue[costars, "BirthPlace"]]}]
Out[5]=

Turn again to the list of costars and find out if any of them achieved notoriety in another creative domain.

In[6]:=
Click for copyable input
writers = Normal[DeleteMissing[ EntityValue[costars, "NotableBooks", "EntityAssociation"]]]
Out[6]=

Utilize properties of movies and people to identify costars who presumably appeared only in archival footage and remove them from the list.

In[7]:=
Click for copyable input
firstFilm = Sort[EntityValue[films, "ReleaseDate"]][[1]]
Out[7]=
In[8]:=
Click for copyable input
impossibleCostars = Select[writers, First[#]["DeathDate"] < firstFilm &]
Out[8]=
In[9]:=
Click for copyable input
Complement[writers, impossibleCostars]
Out[9]=

Related Examples

de es fr ja ko pt-br ru zh