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]:=
Entity["Person", "MattDamon::88f5d"][
EntityProperty["Person", "Image"]]
Out[1]=
Retrieve a list of his film appearances.
In[2]:=
films = Entity["Person", "MattDamon::88f5d"]["MovieAppearances"];
Extract a list of costars for whom some biographical information exists in the Wolfram Knowledgebase.
In[3]:=
costars =
Cases[DeleteDuplicates[
Flatten[EntityValue[films, "Cast"]]], _Entity];
In[4]:=
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]:=
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]:=
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]:=
firstFilm = Sort[EntityValue[films, "ReleaseDate"]][[1]]
Out[7]=
In[8]:=
impossibleCostars =
Select[writers, First[#]["DeathDate"] < firstFilm &]
Out[8]=
In[9]:=
Complement[writers, impossibleCostars]
Out[9]=