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
Column
Description
property_id
Unique property listing ID
size_sqft
Property size in square feet
locality
Neighborhood/locality name
price_lakh
Sale price in Rs. Lakhs
Sample scope: 200 property listings across 5 localities.
C13.4 Objectives
Analyze the relationship between property size and price
Compare average prices across different localities
Identify which localities command a price premium
Recommend pricing guidance for buyers and sellers
C13.5 Step-by-Step Solution
Step 1: Load the property listings CSV into Pandas
Step 2: Clean missing size/price values
Step 3: Create a scatter plot of size vs price
Step 4: Calculate the correlation between size and price
Step 5: Calculate average price per locality and rank them
Step 6: Summarize pricing insights and recommendations
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.2 — Average property price by locality.
C13.9 Key Insights
Size and price show a strong positive correlation — larger properties reliably command higher prices, as expected, but with meaningful scatter suggesting other factors also matter.
City Center commands the highest average price (Rs.110L), more than double Old Town (Rs.48L) for comparable property sizes.
The price gap between top and bottom localities (over 2x) shows location is at least as important as size in determining property value.
C13.10 Business Recommendations
Buyers seeking value should prioritize Green Valley or Old Town, where prices are significantly lower for similar-sized properties.
Sellers in City Center and Lake View can justify premium pricing, but should benchmark against the size-price trend line to avoid overpricing beyond market norms.
The platform should build a simple 'fair price estimator' tool using this size + locality model to guide both buyers and sellers automatically.