Amazon X-ray data provides insight into movie characters

June 24, 2016

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

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 on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


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)