library(tidyverse) # All the tidy things
library(jsonlite) # Converting json data into data frames
library(magrittr) # Extracting items from list objects using piping grammar
library(httr) # Interacting with HTTP verbsStudio Ghibli API
Studio Ghibli Film Analysis
The Studio Ghibli API is a free API that provides data about the studio’s films. It includes information like each film’s title, director, Rotten Tomatoes score, and plot description. This is useful for fans, critics, or researchers who want to explore themes across Ghibli films, compare directors, or simply enjoy the data for artistic or nostalgic purposes.
To see all of Studio Ghibli’s available endpoints, including locations, people, and species, you can visit here. Each endpoint can be accessed using a simple GET request in R.
How to Access
Unlike many APIs, Studio Ghibli’s doesn’t require an API key. You can request data directly from any of the endpoints listed using a standard GET request.
Demonstration
Load libraries
Retrieving film data
Here, the /films endpoint is accessed to return information about every Studio Ghibli film. The API sends back data in JSON format, a structured text format, which is then converted into an R data frame and refined into a clean version. Each row represents a single film.
#define endpoint
ghibli_endpoint <- "https://ghibliapi.vercel.app/films"
#request URL and convert into text format
response <- ghibli_endpoint %>%
GET()
ghibli_data <-
response %>%
content(as = "text", encoding = "UTF-8") %>%
fromJSON()
#selecting specific columns for analysis
ghibli_clean <-
ghibli_data %>%
select(title,
director,
description,
release_date,
running_time,
rt_score)Exploring Data
I thought it’d be interesting to assess each film’s popularity and explore why certain ones resonate so strongly with viewers. This was done through creating summary of the avg score, run-time (minutes), and count of movies per director to analyze which directors have most popular works.
From here, I looked at the top directors individually, using their film description to find common themes.
#see the avg rating and run time for directors to assess which directors have most popualr films
ghibli_summary <-
ghibli_clean %>%
group_by(director) %>%
summarize(
avg_score = mean(as.numeric(rt_score)),
avg_length = mean(as.numeric(running_time)),
film_count = n()
) %>%
arrange(desc(avg_score))ghibli_summary# A tibble: 7 × 4
director avg_score avg_length film_count
<chr> <dbl> <dbl> <int>
1 Hiromasa Yonebayashi 93.5 98.5 2
2 Michaël Dudok de Wit 93 80 1
3 Hayao Miyazaki 92.8 112 9
4 Yoshifumi Kondō 91 111 1
5 Isao Takahata 90 113. 5
6 Hiroyuki Morita 89 75 1
7 Gorō Miyazaki 51.3 96.3 3
#search top directors to discover their movies and asses commonalities
ghibli_clean %>%
filter(director == "Hiromasa Yonebayashi") %>%
select(title, release_date,running_time, rt_score, description)Top 3 directors with highest avg Rotten Tomatoes score were Hiromasa Yonebayashi, Michaël Dudok de Wit, and Hayao Miyazaki. Yonebayashi’s films seem to focus on themes like family, secrecy, and loyalty. There’s a quiet emotional depth to his stories that explore what it means to trust and be vulnerable with others. de Wit’s Red Turtle feels more reflective and symbolic, showing how isolation can shift into acceptance and connection. It’s about cycles of life, love, and how humans fit within Nature’s rhythm. Miyazaki’s films take those same ideas and express them on a larger, more imaginative scale, exploring flight, magic and balance between people and the world around them. Even when his stories touch on conflict or loss, there’s always a sense of hope running through them.
Conclusion
Across Yonebayashi, de Wit, and Miyazaki, the most loved Studio Ghibli films share a similar core theme. Each one takes feelings of loneliness, change or uncertainty and turns them into something hopeful. Whether it’s through quiet relationships, moments in nature, or magical worlds, their stories remind us that connection and empathy matter most. That mix of vulnerability, and wonder is likely what makes people films by these directors so much.