Message Boards Message Boards

Twogether: A webapp listing all the films given two actors

Posted 5 years ago
4 Replies

This looks awesome, thanks for sharing! But how does this work? It would be interesting to see the code. If you want to know how to post code - here is a guide: http://wolfr.am/READ-1ST

POSTED BY: Marina Shchitova

Here's the code:

CloudDeploy[
FormPage[{
{"actor1", "Name one movie star:"}-> Person,
{"actor2", "Name another movie star:"} -> Person
},
With[
{ movies=EntityClass["Movie", {EntityProperty["Movie", "Cast"] -> ContainsAll[{#actor1, #actor2}]}],
numMovies = Length[EntityList[movies]]
},
Grid[
Join[ {{"", "Title", "Poster", "Release Date"}}, 
Partition[
Flatten[
Riffle[
Range[numMovies],
EntityValue[movies,{"Name","Image", "ReleaseDate"}]
]
],
4],
1], 
Frame->All 
] 
]&,
AppearanceRules-> <|"Title" -> "Two-gether",
"Description" ->"Enter the names of any two actors, and get a list of all the movies they starred in together.",
"SubmitLabel" -> "Go!"|>,
PageTheme -> "Red"
],
"twogether",
Permissions -> "Public"]
Attachments:

Great. IMDB used to do this, but doesn't anymore.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract