SAMANTUS Python for Data Analytics — Complete Training Manual CAPSTONE PROJECT 13
← Back to Course Index

Real Estate Price Analysis


On This Page

Capstone Project 13: Real Estate Price Analysis


C13.1  Project Overview

This project analyzes property listing data to understand how size and location drive pricing — helping buyers, sellers, and agents make more informed decisions.

C13.2  Business Problem

A real estate platform wants to help users understand fair pricing by analyzing how strongly property size and locality influence final sale price.

C13.3  Dataset Description

ColumnDescription
property_idUnique property listing ID
size_sqftProperty size in square feet
localityNeighborhood/locality name
price_lakhSale price in Rs. Lakhs

Sample scope: 200 property listings across 5 localities.

C13.4  Objectives


C13.5  Step-by-Step Solution

C13.6  Complete Python Code

► real_estate_analysis.py
import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv("property_listings.csv")
df = df.dropna(subset=['size_sqft','price_lakh'])

correlation = df[['size_sqft','price_lakh']].corr()
print("Size-Price Correlation:\n", correlation)

avg_price_by_locality = df.groupby('locality')['price_lakh'].mean().sort_values(ascending=False)
print("Average Price by Locality:\n", avg_price_by_locality.round(1))

plt.scatter(df["size_sqft"], df["price_lakh"], alpha=0.5)
plt.title("Size vs Price")
plt.savefig("size_price.png")

C13.7  Expected Output

Output
Average Price by Locality:
City Center   110
Lake View     95
Sector 12      85
Green Valley  62
Old Town      48

C13.8  Visualizations

Figure C13.1 — Relationship between property size and sale price.
Figure C13.1 — Relationship between property size and sale price.
Figure C13.2 — Average property price by locality.
Figure C13.2 — Average property price by locality.

C13.9  Key Insights

C13.10  Business Recommendations