A powerful web-based tool for analyzing Tehran real estate market data from Divar.ir
Discover market trends β’ Analyze property prices β’ Visualize data insights
https://divarrealstatesinthesedays.netlify.app/
- Real-time property data processing
- Interactive filtering by date, district, and price ranges
- Advanced statistical metrics and market insights
- Trend analysis with growth calculations
- Time Series Charts: Track property listings over time
- Price Distribution: Compare average prices across districts
- Interactive Maps: Geographic visualization with Leaflet
- Statistical Dashboard: Key market indicators at a glance
- Date range selection with Persian calendar support
- District-based filtering (Districts 1, 2, 3, 6, 15)
- Real-time data updates
- Export filtered results to CSV
- Responsive design for all devices
- Persian/Farsi number formatting
- Dark theme with modern UI
- Fast client-side processing
Visit the live demo: divarrealstatesinthesedays.netlify.app
Prerequisites:
- .NET 8 SDK
- Modern web browser
Installation:
# Clone the repository
git clone https://github.com/yourusername/divar-analyzer.git
cd divar-analyzer
# Navigate to backend
cd Backend/DivarAnalyzer
# Restore dependencies
dotnet restore
# Run the application
dotnet run
# Open browser
# Navigate to https://localhost:5001docker compose up --buildπ― Click "Click to load sample data" to generate demo data
π Or upload your own CSV file with property listings
π
Set date ranges using the date pickers
ποΈ Select specific districts (1, 2, 3, 6, 15)
π Filter by price ranges and property types
π Click "Analyze" to generate comprehensive analysis
π View interactive charts and market trends
πΊοΈ Explore geographic distribution on the map
π Review detailed statistics and insights
πΎ Download filtered data as CSV
π Generate detailed market reports
π Share analysis results
π― ASP.NET Core 8.0 # Web API Framework
π CsvHelper # CSV Processing
π AngleSharp # Web Scraping
π System.Text.Json # JSON Serialization
ποΈ Entity Framework # Data Access (Future)
β‘ Vanilla JavaScript # Core Logic
π Chart.js # Interactive Charts
πΊοΈ Leaflet # Interactive Maps
π PapaParse # CSV Processing
π¨ Custom CSS # Modern UI Design
- DivarDataAnalyzer: Core analysis engine
- DivarScraper: Data collection service
- DivarController: RESTful API endpoints
- Interactive Dashboard: Real-time visualization
GET /api/divar/sample-data?count=100Generate sample real estate data for testing
POST /api/divar/analyze
Content-Type: application/json
{
"data": [...],
"fromDate": "2024-01-01",
"toDate": "2024-12-31",
"district": "all"
}POST /api/divar/export-csv
Content-Type: application/json
[...propertyData]{
"success": true,
"data": {
"rawData": [...],
"aggregatedData": [...],
"metrics": {
"totalListings": 1250,
"avgTotal": 15000000000,
"avgSqm": 85000000
},
"insights": [...]
},
"message": "Analysis completed successfully"
}public class RealEstateData
{
public DateTime ScrapedDate { get; set; }
public string District { get; set; }
public int? Size { get; set; }
public long? TotalPrice { get; set; }
public long? PricePerSqm { get; set; }
public double? Latitude { get; set; }
public double? Longitude { get; set; }
public string Title { get; set; }
public int? Age { get; set; }
}- District 1: Shemiran (Ψ΄Ω ΫΨ±Ψ§Ω)
- District 2: Vanak (ΩΩΪ©)
- District 3: Zaferaniyeh (Ψ²ΨΉΩΨ±Ψ§ΩΫΩ)
- District 6: Yusefabad (ΫΩΨ³ΩβΨ’Ψ¨Ψ§Ψ―)
- District 15: Shahrak (Ψ΄ΩΨ±Ϊ©)
{
"DivarScraper": {
"RequestDelayMs": 2000,
"MaxRetryAttempts": 3,
"RateLimitPerMinute": 30
},
"DataAnalysis": {
"MaxRecordsPerAnalysis": 50000,
"DefaultSampleSize": 100,
"BaselineDate": "2024-06-12"
}
}The frontend is deployed on Netlify with automatic builds:
- Live URL: https://divarrealstatesinthesedays.netlify.app/
- Build Command: None (static files)
- Publish Directory:
Frontend/
# Azure App Service
az webapp up --name divar-analyzer --resource-group myResourceGroup
# Docker
docker build -t divar-analyzer .
docker run -p 5000:5000 divar-analyzer
# Railway/Heroku
git push railway main- Basic data analysis and visualization
- Interactive charts and maps
- CSV export functionality
- Responsive design
- Real-time data scraping
- Advanced filtering options
- Price prediction models
- Historical trend analysis
- User authentication
- Saved searches and alerts
- API rate limiting
- Chatbot using LLM Agent for asking about the infrmations
- Database integration
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow C# coding conventions
- Write meaningful commit messages
- Add tests for new features
- Update documentation
- Divar.ir
- Chart.js - Excellent charting library
- Leaflet - Open-source mapping solution
- OpenStreetMap - Map data provider
- Netlify - Frontend hosting platform
- π Bug Reports: Create an Issue
- π‘ Feature Requests: Start a Discussion
- π§ Email: [email protected]