Laptop Reviews Analysis with Preswald

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

Category: Community


We're thrilled to feature Balaji Bharadwaj in this edition of the Preswald Community Showcase! πŸŽ‰ Balaji has developed an incredible Preswald app that dives into 24,000 laptop reviews, uncovering trends in product performance, customer satisfaction, and user sentiment through compelling visualizations.

🌟 Project Overview

πŸ“Š Preswald and Product Review Analytics

This blog explores how Preswald is used to analyze large-scale laptop review data, enabling users to explore rating patterns, product rankings, and review content in an interactive dashboard.

Project Name: Laptop Reviews Analysis Dashboard
Built by: Balaji Bharadwaj
Dataset: 24,000 Laptop Reviews from Kaggle
Live App: Laptop Reviews Dashboard

πŸ“Š Description

Balaji's project provides:

  • ⭐ Distribution of ratings and trends over time

  • πŸ” Product-wise comparisons of popularity and satisfaction

  • πŸ“… Chronological review patterns and customer behavior

  • πŸ–ŠοΈ Sentiment analysis via review length, title keywords, and word clouds

  • 🀝 Correlation analysis between reviews and ratings

With Preswald, Balaji built an end-to-end analytical experience using pure Pythonβ€”no frontend required.


πŸš€ Code Snippets

Load Review Data

from preswald import connect, get_df, text, table

connect()
df = get_df('reviews_csv')

text("# Laptop Reviews Analysis Dashboard")
text("### Comprehensive analysis of 24,000 Laptop reviews")

Rating Distribution

import plotly.express as px
from preswald import plotly

fig_rating = px.histogram(
    df, x="rating", nbins=5, title="Rating Distribution"
)
plotly(fig_rating)

Top Rated Laptops

top_rated = df.groupby("product_name").agg(avg_rating=("rating", "mean"), count=("rating", "size"))
top_rated = top_rated[top_rated['count'] >= 20].sort_values("avg_rating", ascending=False).head(10)

Most Common Review Words

import re
from collections import Counter

words = re.findall(r'\b[a-zA-Z]{3,}\b', ' '.join(df['review'].dropna().astype(str)))
word_freq = Counter(words)
common_words = word_freq.most_common(20)

Review Length vs Rating

df['review_length'] = df['review'].apply(lambda x: len(str(x).split()))
fig = px.box(df, x="rating", y="review_length", title="Review Length by Rating")
plotly(fig)

πŸ“Š Summary Insights

  • Overall Average Rating: 4.6

  • Most Reviewed Product: Lenovo Ideapad 3

  • Highest Rated Product (min 20 reviews): Primebook 4G Android (4.95)

  • Average Review Length: 8 words

  • Most Common Words: "good", "laptop", "battery", "value"


πŸ“Š What is Preswald?

Preswald is an open-source framework for building data apps, dashboards, and internal tools with just Python. It enables developers to turn any analysis script into a shareable app, with UI components like tables, charts, and forms.

Key Features

  • User-friendly interface with automatic UI generation

  • DAG-based dependency tracking

  • Fast one-line deployment

  • Supports real-time data interactions and filters


πŸš€ Getting Started

Installation

pip install preswald

Start a Project

preswald init my_project
cd my_project
preswald run

Deploy

preswald deploy --target structured

Huge Thanks to Balaji Bharadwaj!

A huge thank you to Balaji Bharadwaj for sharing this insightful and data-rich project with the Preswald community! Check out more from Balaji:

Want to Contribute?

Got a cool idea for a Preswald app? We'd love to see it! Get started here: https://github.com/StructuredLabs/preswald and get featured in our next Community Showcase.

Happy building! πŸš€