Figure Friday 2025-w22

Marvel films, compare worldwide gross revenue against budget, an AI Claude-experiment.

The Figure Friday dataset primarily contains financial data for all Marvel films. After reviewing the data and converting several columns from string values (e.g., “38%”) to numerical values, I decided to experiment with a few combinations:

  • Vibe Coding with Claude via OpenRouter.ai
  • A Dash Mantine app instead of a Dash Bootstrap app
  • Applying a UI/UX/Mantine style guide created by a member of the Plotly community (see video for explanation and download link)

The Prompt

The app needed to be simple: dark/light mode, a category filter (since Marvel films are often part of a series), and a scatter plot clearly showing how global earnings relate to the film’s budget.

After a somewhat failed experiment—due to version mismatches between various Python libraries on my system—I decided to use this prompt, followed by the pasted style guidelines:

#the data loaded is information about marvel movies. 

#assignment:
#create a dash app, use only dash mantine components.
#create the app based on the uploaded best practices for UI/UX/Mantine.
#add a light/dark mode switch with callback, make dark mode default
#create a filter dropdown for category, add "all categories" and make "all categories" default
#on appload, load the plots for "all categories"

#create a scatterplot
# x = year, y="% budget recovered"
# colors for traces: red if y < 200, blue if y > 250 else purple
# create a custom hover with film, category, worldwidegross and budget
# create a callback which makes it possible to filter on category

Result

The result didn’t work right away—there was an error in the component structure, and the hover data referenced a few columns that didn’t exist.

What bothered me more, though, was a horizontal line at 100% in the visualization labeled “Break Even.” That’s not necessarily accurate; I actually wanted the data points to change color based on the percentage. In the film industry, a movie typically doesn’t break even when ticket sales match the budget. It usually happens only when earnings reach 2.5 to 3 times the budget. Some argue for 2 to 3 times, but either way, it’s incorrect to assume that ticket sales equal to the budget means the film has broken even.

In the final visual, this is reflected by:

  • Orange dots if earnings are below 200%,
  • Gray for the in-between range,
  • Green if ticket sales are 3 times or more than the budget.

Although the app includes a dark/light mode switch, text colors in the visualization don’t adjust when switching to Dark Mode, making some text unreadable. Additionally, the legend disappears when selecting a category. These are fixable details, either by AI or by myself (I didn’t fix them and didn’t ask AI to help). Still, they annoyed me.

Model and Costs

Generating what I asked for in the prompt plus one small tweak initiated by Claude, ended up costing $1.82. We’re talking about a fairly simple task here. Compared to models generally considered “less advanced,” that’s a relatively high amount. So naturally, expectations are higher as well. Next time, I’ll try using a “lighter” model first.

The $1.82 was what remained of $10 in credits I purchased two months ago. I’m not a heavy-paying AI user, but I’ve done a few things via OpenRouter that I considered more complex, involving much more interaction. And each time I thought, “Well, that basically costs nothing.” 🙂 So, I’ve learned something from this experience.

The Prompt, One More Time

On Figure Friday, people post a link to their solution along with some explanation of how and why they built their app or chart. In response to my submission, someone commented: “It also depends on your prompt.” 🙂
This person had sent the data to Claude in free format, accompanied by a brief description. The result? A technically impressive app with KPI cards, lots of them, along with many filters and a variety of other chart types.

Regardless of the result, it was a completely different approach. My angle was: “I have this data and want to communicate it in this specific way.” His angle was more like: “Go ahead, make something cool with it.”
Function-driven versus more technically exploratory. One method isn’t necessarily better or worse than the other and the same goes for the outcomes.

My preliminary conclusion? At this point, I could just as easily stick with free or more affordable AI tools, as they would likely deliver similar results to Claude via OpenRouter for what I’m doing.

Demo

Py.cafe: demo en code

Community link: link

Example:

  • Dynamic filtering of the plot based on category selection
  • DMC core
  • Dark/Light mode
  • Scatterplot

Figure Friday is an initiative by the Dash/Plotly community, where each Friday a new dataset is shared and participants create a visualization or small app to extract insights from it. The following Friday at 18:00, there’s a Zoom session where some participants explain the thought process behind their work. In the community thread, people also share their code — and when possible, a live demo — to learn from each other.