π Project Overview
The Student Housing Cost Predictor is an interactive
Shiny web application designed to help students estimate their monthly
rent based on various factors such as location, apartment size,
amenities, and distance from campus.
π― Purpose
Choosing student housing can be challenging. This app simplifies the
decision-making process by providing transparent, data-driven rent
estimates. Students can compare different options and understand exactly
what factors contribute to their housing costs.
π‘ Key Features
2. Real-Time Cost Calculation
- Instant rent estimation based on your selections
- Transparent cost breakdown showing each componentβs
contribution
3. Cost Comparison
- Compare your estimated rent to average housing costs in your chosen
location
- See potential savings or additional expenses at a glance
4. Beautiful UI/UX
- Gradient color scheme with purple theme
- Responsive design that works on desktop and mobile
- Clear visual hierarchy with organized sections
π Cost Model Explained
The app uses a component-based pricing model to calculate rent:
Total Rent = Base Rent + Square Footage + Bedrooms + Location + Amenities + Distance
Model Components
Base Rent: $800/month
The foundation of the pricing model represents a standard 1-bedroom
apartment.
Bedroom Adjustment
- Each additional bedroom adds $250
- Formula: (bedrooms - 1) Γ $250
- 1 bedroom: $0 | 2 bedrooms: $250 | 3 bedrooms: $500
Location Multiplier
Adjusts the base rent based on location desirability:
| On Campus |
0.9 |
-10% discount (saves $80) |
| Off-Campus Suburban |
1.0 |
No adjustment |
| Off-Campus Urban |
1.2 |
+20% premium (adds $160) |
Amenities Cost
Additional features add to your rent:
| WiFi |
$30 |
| Utilities Included |
$100 |
| Furnished |
$150 |
| Parking |
$75 |
You can select multiple amenities - costs are cumulative
Distance Discount
Living further from campus reduces rent: - If distance > 2 miles:
-$15 per additional mile - Example: 4 miles away = -$30
reduction
Calculation Example
Scenario: 2-bedroom, 500 sqft apartment, off-campus
suburban, 3 miles away, with WiFi and parking
Base Rent: $800.00
Square Footage (500/200Γ200): $500.00
Bedrooms (2-1)Γ250: $250.00
Location (suburban): $0.00
Amenities (WiFi + Parking): $105.00
Distance (3-2)Γ-15: -$15.00
βββββββββββββββββββββββββββββββββββββ
TOTAL: $1,640.00
π οΈ Technology Stack
The application is built with:
- R Language - Core programming language
- Shiny - Interactive web framework
- CSS - Custom styling with gradient themes
- ShinyApps.io - Cloud hosting platform
Key R Packages
shiny - Web app framework
rlang - Error handling (via rsconnect)
π± How to Use the App
Step 2: Enter Your Details
Fill in the left sidebar with: - Apartment size in square feet -
Number of bedrooms - Location type - Distance from campus - Desired
amenities
Step 3: Calculate
Click the βCalculate Rentβ button to see your
estimated monthly rent.
Step 4: Review Results
- View your estimated monthly rent in large text
- Check the cost breakdown table to understand each component
- Compare your rent to the average in your location
- See if youβre saving or spending more than average
Step 5: Explore Options
- Adjust inputs to see how changes affect your rent
- Use the βResetβ button to start over
- Compare different scenarios side-by-side
π Interpretation Guide
Cost Breakdown Table
Shows exactly how much each factor contributes to your total
rent:
| Base Rent |
Starting point for all calculations |
| Square Footage Adjustment |
How size affects price |
| Bedroom Adjustment |
Cost of additional sleeping areas |
| Location Adjustment |
Market demand premium/discount |
| Amenities |
Cost of additional features |
| Distance Adjustment |
Savings from being further away |
| TOTAL |
Your estimated monthly rent |
Comparison Section
- Green checkmark (β): Youβre saving money compared
to average
- Red X (β): Your estimated rent is higher than
average
- Yellow dash (β): Your rent matches the average
πΎ Model Parameters & Assumptions
The model makes these assumptions:
- Linear scaling - Rent increases proportionally with
square footage
- Fixed amenity costs - Same amenity costs regardless
of location
- Cumulative amenities - Amenity costs add
together
- Distance efficiency - Every mile beyond 2 miles
saves exactly $15
- Location-only adjustments - Location multipliers
apply only to base rent
Average Housing Costs (Baseline)
- On Campus: $750/month
- Off-Campus Urban: $1,200/month
- Off-Campus Suburban: $950/month
π Model Limitations & Future Improvements
Current Limitations
- Doesnβt account for utility market variations
- Assumes uniform amenity value across locations
- Distance discount doesnβt account for transportation time value
- No consideration for roommate/shared housing scenarios
Potential Enhancements
- Add utilities cost breakdown by location
- Include neighborhood safety/walkability scores
- Add lease term length adjustments (6-month vs 12-month)
- Roommate sharing calculator
- Historical price trends
- Seasonal rent variations
π Example Scenarios
Budget Student (Minimal Amenities)
- 300 sqft, 1 bedroom, on-campus, 0.5 miles away
- No amenities selected
- Estimated Rent: ~$660/month
Standard Student (Comfortable)
- 450 sqft, 2 bedrooms, off-campus suburban, 2 miles away
- WiFi + Utilities + Parking
- Estimated Rent: ~$1,235/month
Premium Student (Full Amenities)
- 600 sqft, 2 bedrooms, off-campus suburban, 1 mile away
- WiFi + Utilities + Furnished + Parking
- Estimated Rent: ~$1,605/month
Urban Living (City Apartment)
- 500 sqft, 1 bedroom, off-campus urban, 1 mile away
- WiFi + Utilities
- Estimated Rent: ~$1,200/month
π Learning Outcomes
By using this app, students can:
- Understand housing economics - See how different
factors affect pricing
- Make informed decisions - Compare options
objectively
- Budget effectively - Plan finances around realistic
rent estimates
- Negotiate better - Understand market value of
amenities
- Explore trade-offs - See cost-benefit of distance
vs.Β amenities
π Code Structure
The Shiny app is organized into three main sections:
Global Functions & Settings
# Base rent: $800
# Cost calculation functions
# Location multipliers
# Amenity costs
# Distance discounts
User Interface (UI)
- Custom CSS styling with gradient theme
- Sidebar layout with input controls
- Main panel displaying results
- Interactive tables and text outputs
Server Logic
- Reactive cost calculations
- Input validation and updates
- Dynamic output generation
- Reset button functionality
π Deployment & Sharing
This app is deployed on ShinyApps.io, a cloud
platform that makes it easy to share Shiny applications online.
Share with Others
Simply share the URL with friends, classmates, or advisors. No
installation required!
π¬ Feedback & Suggestions
Have ideas for improvements? Want to see additional features?
- This model can be customized for different universities
- Amenity costs can be adjusted based on local market data
- Location categories can be expanded with more specific areas
- Integration with real housing listing APIs is possible
π About the Creator
Built by Vidhimistryy as an R Shiny application to
help students make informed housing decisions.
Skills Demonstrated: - Shiny web development - R
programming - Interactive UI/UX design - Data-driven decision making -
Cloud deployment
π License & Usage
This project is shared as an educational tool. Feel free to use it to
estimate housing costs for your needs!
Last Updated: 2026-02-13
Made with β€οΈ using R and Shiny