{"id":22455287,"url":"https://github.com/malek-logh/realestatemappertool","last_synced_at":"2026-04-20T10:03:17.721Z","repository":{"id":250066735,"uuid":"833371620","full_name":"Malek-logh/RealEstateMapperTool","owner":"Malek-logh","description":"This project involves scraping real estate data from https://www.mubawab.tn, cleaning and inserting it into a PostgreSQL database, and performing clustering analysis with visualization on Tunisia map","archived":false,"fork":false,"pushed_at":"2024-07-25T00:46:06.000Z","size":1948,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T13:17:36.470Z","etag":null,"topics":["beautifulsoup","docker","folium","postgres","python","selenium"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Malek-logh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-24T23:10:54.000Z","updated_at":"2025-02-05T13:27:42.000Z","dependencies_parsed_at":"2024-07-25T01:54:37.230Z","dependency_job_id":null,"html_url":"https://github.com/Malek-logh/RealEstateMapperTool","commit_stats":null,"previous_names":["malek-logh/realestatemappertool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Malek-logh/RealEstateMapperTool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malek-logh%2FRealEstateMapperTool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malek-logh%2FRealEstateMapperTool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malek-logh%2FRealEstateMapperTool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malek-logh%2FRealEstateMapperTool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Malek-logh","download_url":"https://codeload.github.com/Malek-logh/RealEstateMapperTool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malek-logh%2FRealEstateMapperTool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32042294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beautifulsoup","docker","folium","postgres","python","selenium"],"created_at":"2024-12-06T07:11:20.984Z","updated_at":"2026-04-20T10:03:17.701Z","avatar_url":"https://github.com/Malek-logh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Real Estate Data Processing and Visualization\n\nThis project involves scraping real estate data, cleaning and inserting it into a PostgreSQL database, and performing clustering analysis with visualization on a map. The main components of the project are:\n\n1. **Data Scraping and Cleaning**\n2. **Database Setup and Data Insertion**\n3. **Clustering and Geospatial Visualization of Real Estate Data**\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Project Structure](#project-structure)\n- [Scripts Overview](#scripts-overview)\n- [Docker Setup](#docker-setup)\n\n## Installation\n\nTo get started with this project, follow these steps:\n\n### Prerequisites\n\n- Python 3.7+\n- Docker\n- Docker Compose\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/Malek-logh/RealEstateMapperTool.git\nRealEstateMapperTool\n```\n\n### Install Python Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### Create `requirements.txt`\n\n```text\npandas\nbeautifulsoup4\nselenium\nsqlalchemy\npsycopg2\nscikit-learn\nfolium\n```\n\n## Usage\n\n### Step 1: Scrape Data\n\nRun the scraping scripts to collect data from real estate websites. Make sure you have the necessary drivers for Selenium (e.g., ChromeDriver).\n\n```bash\npython scrapingTerrain.py\npython scrapingMaison.py\npython scrapingAppartement.py\n```\n\n### Step 2: Insert Data into PostgreSQL\n\nStart the PostgreSQL database using Docker Compose and insert the scraped data.\n\n```bash\ndocker-compose up -d\npython insertdata.py\n```\n\n### Step 3: Perform Clustering and Visualization\n\nRun the clustering analysis and generate the map with clustered data points.\n\n```bash\npython clustering.py\n```\n\n## Project Structure\n\n```\nreal-estate-data/\n├── scrapingTerrain.py\n├── scrapingMaison.py\n├── scrapingAppartement.py\n├── MubawabTerrain.csv\n├── MubawabMaison.csv\n├── MubawabAppartement.csv\n├── insertdata.py\n├── clustering.py\n├── docker-compose.yml\n├── requirements.txt\n└── README.md\n```\n\n## Scripts Overview\n\n### `scrapingTerrain.py`, `scrapingMaison.py`, `scrapingAppartement.py`\n\nThese scripts scrape data from https://www.mubawab.tn/ and save it into CSV files. They use `BeautifulSoup` for parsing HTML and `selenium` for web interactions.\n\n### `insertdata.py`\n\nThis script reads the data from the CSV files, cleans it, and inserts it into a PostgreSQL database. It uses `pandas` for data manipulation and `sqlalchemy` for database interactions.\n\n### `clustering.py`\n\nThis script performs clustering analysis on the real estate data and visualizes the results on Tunisa map using `folium`. It uses `scikit-learn` for clustering and `folium` for map visualization.\n\n### `docker-compose.yml`\n\nThis file sets up the PostgreSQL database and pgAdmin using Docker Compose.\n\n## Docker Setup\n\nUse Docker Compose to set up and run the PostgreSQL database and pgAdmin.\n\n```bash\ndocker-compose up -d\n```\n\n- Access pgAdmin at `http://localhost:8081`\n- PostgreSQL will be running on port `5432`\n\n## Example Map Visualization\n\n![Example Map Visualization(1).png](Example%20Map%20Visualization(1).png)\n![Example Map Visualization(2).png](Example%20Map%20Visualization(2).png)\n\n\n## Contributing\n\nFeel free to fork this project, make your changes, and submit a pull request. Any contributions are highly appreciated!\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalek-logh%2Frealestatemappertool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalek-logh%2Frealestatemappertool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalek-logh%2Frealestatemappertool/lists"}