Animated Pixar Movie Analysis with Preswald

Amrutha GujjarAmrutha Gujjarβ€’β€’3 min read

Category: Community


We're thrilled to feature Zhuoyang Meng in this edition of the Preswald Community Showcase! πŸŽ‰ Zhuoyang has built an impressive Preswald app that analyzes and visualizes Pixar films data using interactive charts and tables.

🌟 Project Overview

πŸ“Š Preswald and Analytics

This blog explores how Preswald utilizes analytics to examine Pixar film trends, providing insights into box office performance, audience ratings, and production budgets through dynamic visualizations.

Project Name: Pixar Films Explorer
Built by: Zhuoyang Meng
Dataset: Pixar films dataset

Check out the project on GitHub

πŸ“Š Description

Zhuoyang's project provides an interactive dashboard for exploring Pixar films' performance. The app allows users to:

  • Filter films by release year, box office revenue, and audience rating.
  • Visualize trends using Plotly charts to analyze revenue growth and critical reception.
  • Compare production budgets dynamically in an interactive table.
  • Gain insights into Pixar's most successful films and production patterns.

With Preswald, Zhuoyang has created a seamless user experience, where users can dynamically adjust inputs and get instant updates without writing frontend code.

img


πŸš€ Code Snippets

Here’s a sneak peek at how Zhuoyang's project is structured:

Loading the Data

from preswald import connect, get_df, text

connect()  # Establish connection to data

# Load Pixar films dataset
pixar_df = get_df("pixar_films")

Creating an Interactive Revenue Trend Chart

from preswald import plotly
import plotly.express as px

fig = px.bar(pixar_df, x='release_year', y='box_office', color='film_title',
             title='Pixar Box Office Revenue Over Time')
plotly(fig)

Displaying Pixar Film Data in a Table

from preswald import table

table(pixar_df[['film_title', 'release_year', 'box_office', 'audience_rating', 'budget']])

With just a few lines of Python, Zhuoyang has built a fully interactive data app powered by Preswald! πŸš€

What is Preswald?

Preswald is an open-source framework for building data apps, dashboards, and internal tools with just Python. It provides pre-built UI components like tables, charts, and forms, so you don't have to write frontend code. Users can interact with your app, changing inputs, running queries, and updating visualizations, without you needing to manage the UI manually.

Preswald tracks state and dependencies, making computations efficient by updating only when necessary. It uses a workflow DAG to manage execution order, ensuring performance and predictability. Preswald allows you to turn Python scripts into shareable, production-ready applications easily.

Key Features

  • Add UI components to Python scripts: user-interactive buttons, text inputs, tables, and charts.
  • Stateful execution with automat