Asad Husain

Smartphone Price Predictor Shiny App

Building my first interactive web app using Shiny

Project 2 Image

Link to Github Repo | Link to App

What I Built

An R Shiny web app that predicts smartphone price ranges based on technical specs like battery size, RAM, screen resolution, and 5G capability. Built for phone companies to figure out optimal pricing strategies in the competitive smartphone market.
This was my crash course in Shiny development as we had to deliver a full-stack data science app in a couple months. A true sink-or-swim academic project situation.

How It Works


Data Foundation: Worked with 2000 smartphone records containing 20 different specifications each - everything from battery capacity to camera megapixels to connectivity features.
Interactive EDA: Built visualizations using ggplot2 to show how different specs correlate with price ranges. Users can explore relationships between features like "does more RAM really mean higher price?"
Smart Modeling: Tested multiple machine learning approaches and landed on Random Forest as the winner. Had to handle multicollinearity between features (turns out phone specs are pretty interconnected).
Price Prediction: The app takes in phone specifications and spits out which of 4 price segments (budget to premium) the device should fall into.

What I Learned

First time touching R, let alone building interactive web apps with Shiny. Had to learn data manipulation, statistical modeling, and web app deployment all at once. The syntax took some getting used to coming from Python, but R's data analysis capabilities are pretty sweet. Figuring out Shiny's reactive programming model was the trickiest part - making sure the app updates smoothly when users change inputs.

Result

Hit 94% accuracy on price range predictions, which felt pretty solid for a class project. More importantly, got that B grade and actually learned to love R's approach to data science.

Technologies Used: R, Shiny, ggplot2, Random Forest, deployed on shinyapps.io

Academic project at Purdue University, 2021