Message Boards Message Boards

Twogether: A webapp listing all the films given two actors

Posted 5 years ago

Can you name all the movies that included...

Spencer Tracy and Katherine Hepburn? Bill Murray and Dan Ackroyd? Corey Haim and Corey Feldman?

I wrote a webapp with the Wolfram Language which takes two actors as input, and which lists back all the movies they were cast in together as output.

I call the app Twogether, and you can find it here:

https://www.wolframcloud.com/objects/mitchell/twogether

Please enjoy! Thanks.

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:

Thanks. I have a great nephew who is interested in learning to code. I sent the code to his parents so that they can see what can be done with very little work. I think that almost all the commands are covered in Stephen's book, which is where I will start him learning,

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