Wes Anderson Actor Network - 2020 Shiny Contest Submission

Wes Anderson Actor Network

Authors: David Smale
Working with Shiny for 1+ years

Abstract:
An interactive network visualisation of actors appearing in Wes Anderson's 9 feature-length films to date. A Wes Anderson film (or any film for that matter) doesn’t really come to life until Bill Murray enters. Jason Schwartzman and Owen Wilson also gain regular employment from the Wes Anderson film factory. Who else has appeared in multiple films? Has his list of regulars changed over time? Explore these questions, and more, with this interactive, pastel-coloured, Futura-fonted, shiny app!

Full Description:
Sure, ggplot2 is pretty sweet, and dplyr has its uses, but I think we can all agree that the most vital package in the R universe is the {wesanderson} package by Karthik Ram.

The idea

For those that don't know, the {wesanderson} package collates an array of colour palettes inspired by the films of, well, Wes Anderson. Giving your data visualisations that pastel-coloured, twee, achingly-hip look you've been craving has never been so easy! I thought, what better way to utilise this package than with a visualisation of the films of, well, Wes Anderson.

First iteration

This project started out as a static network visualisation. You can read about this first iteration on my blog: https://davidsmale.netlify.com/portfolio/wes-anderson-actor-network/. Here is the static visualisation:

Going Interactive

I couldn't resist returning to this project to turn it into an interactive network after discovering the package {visNetwork} (whilst making my shiny app for last year's shiny contest!). So here it is, an interactive network visualisation of all credited actors to have appeared in Wes Anderson's 9 feature-length films to date.

The data

The list of actors and films was scraped from IMDb using the {rvest} package. The scraping code is in the original script which outputs the static viz (Wes Anderson Film Network.R).

Creating network data

The network data was created using the {tidygraph} package by Thomas Pedersen. I discuss my use of this package in my blog post referenced earlier.

Building the network viz

{tidygraph} and {visNetwork} are a match made in heaven. The node and edge aesthetics can be added to the {tidygraph} network data object then this is passed to the visIgraph function of {visNetwork}. It can then be rendered in {shiny} with the renderVisNetwork function. I've then added a few inputs in shiny for added interactivity.

The aesthetics

In an attempt to repeat the success of my submission to last year's contest (https://shiny.rstudio.com/gallery/magnetic-fields.html), I have once again designed the app to be aesthetically-aligned to the subject matter (I am a one-trick pony). Obviously, the colours are taken from scenes in his films (via the {wesanderson} package). Each film node is coloured by a colour taken from that film's colour palette. The font used is Futura, because Wes Anderson Loves Futura. The app is designed to be symmetrical, with a column on the left and right, and the title centred, because Wes also loves symmetry. Why not dramatically zoom into the network too, for added Wes-ness.

wes_anderson_app_demo

Although this app is made up of just one page, I spent an inordinate amount of time getting it just so. The node positions themselves have been partially manually placed, by taking the default positions (based on random seed) and then taking their coordinates out of shiny (using the visGetPositions function) to then tweak some of the node positions. The things you do for love. Also, CSS was used to alter the shiny inputs of the slider bar and input boxes. Wes is also a stickler for the details after all. As Max Fischer in Rushmore says:

"I guess you’ve just gotta find something you love to do and then… do it for the rest of your life."

Thanks for reading, and remember, please use Wes Anderson colour palettes responsibly.

David / @committedtotape


Category: Other
Keywords: network visualisation, film, wes anderson, twee
Shiny app: https://committedtotape.shinyapps.io/wesandersonnetwork/
Repo: https://github.com/committedtotape/wesandersonnetwork
RStudio Cloud: https://rstudio.cloud/project/1021822

Thumbnail:
image

Full image:

2 Likes