Group Abstract Group Abstract

Message Boards Message Boards

Visualizing data of Leonardo DiCaprio movies

3 Replies
Posted 10 years ago

it should be: script = Flatten[Table[Table[i, {i, blocks[[j]] + 3, blocks[[j + 1]] - 1}], {j, Length[blocks] - 1}]]; you lost the 'Table'

POSTED BY: eru era
Posted 10 years ago

That's a good example of great visual data , awesome work Jofre :)

POSTED BY: Thomas Eli

Alternatively, we can focus on the script of "The Revenant Movie" (I got the script from the internet Movie Script Database (IMSDb)). We can use the SmoothHistogram in order to compute the probability density function of names over the movie and visualize when they are playing an important role. For example, we can do that with the four main roles:

SmoothHistogram[{
Legended[First /@ StringPosition[ToLowerCase[scriptString], "glass"],Style["Hugh Glass (Leonardo DiCaprio)", Bold, 14]],
Legended[First /@ StringPosition[ToLowerCase[scriptString], "henry"], Style["Captain Andrew Henry (Domhnall Gleeson)", Bold, 14]],
Legended[First /@ StringPosition[ToLowerCase[scriptString], "fitzgerald"],Style["John Fitzgerald (Tom Hardy)", Bold, 14]],
Legended[First /@ StringPosition[ToLowerCase[scriptString], "bridger"],Style["Jim Bridger (Will Poulter)", Bold, 14]]}, 
AxesLabel -> {Style["number of letters", Bold, 14],Style["probability density function", Bold, 14]},
Filling -> Axis, 
ImageSize -> Large]

enter image description here

See also the probability density function of other groups of words (spoiler alert): enter image description here enter image description here enter image description here enter image description here

I hope you found this interesting!

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