Amazon X-ray data provides insight into movie characters

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I'm a regular user of Amazon Video: as someone who spends a fair bit of time on planes, it's great to be able to download some of my favourite shows (hello, Orphan Black and Vikings) and catch up on episodes during the trip. Amazon Video has a useful feature, too: if you forget the name of a character, or if you see an an actor and wonder what other things they've been in, you can press pause and see a list of the actors appearing in the scene:


The feature is called X-Ray, and I just learned from Curious Gnu that you can download the data files that provide the X-Ray data, as long as you have an Amazon Video subscription. The process isn't trivial (it involves using Developer Tools in Chrome to exploit a loophole in the streaming process), but at the end of the day you end up with a JSON file whcih you can easily read into R with the jsonlite package and then plot the data using any of R's visualization tools. For example, Curious Gnu created this visualization of the screentime of major Star Wars: The Force Awakens characters.


Of course, another way of collecting data like this is to analyze the movie script, but most scripts aren't readily available online (and even then, the format isn't exactly standardized). The advantage of using Amazon X-Ray JSON files is that the data is already structured, and are available for more movies and series … for as long as Amazon leaves the downloading loophole open.

For more details on how to download Amazon X-Ray data and more examples of movie data visualizations from Curious Gnu, follow the link below.

Curious Gnu: Using Amazon's X-Ray to Visualize Characters' Screen Time (via Verena Haunschmid)

To leave a comment for the author, please follow the link and comment on their blog: Revolutions. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)