Skip to content

A django project to scrape the data of houses from https://divar.ir and store them in database. Also a model is trained using machine learning (Decision Tree) to predict house prices.

Notifications You must be signed in to change notification settings

masoudgheisari92/house-price-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Housing Price Prediction

Python Version Django version

About

This is a project to scrape the data of the houses (title, description, region, price, year of construction, area, number of rooms) from https://divar.ir and save them in database (sqlite) after preprocessing.

By using machine learning (Decision Tree), a model is trained to predict house prices.

Getting Started

  1. Clone the Repository

    git clone https://github.com/masoudgheisari92/house_price_prediction.git
  2. Make a .env file in house_price_prediction directory containing all the following environment variables:

    DJANGO_SECRET_KEY=""
    DJANGO_DEBUG=True
    DJANGO_ALLOWED_HOSTS=127.0.0.1,localhost
  3. Create virtual environment and install required packages:

    # create virtual environment
    python -m venv venv
    # activate virtual environment
    venv/Scripts/activate
    # install required packages
    pip install -r project/requirements.txt
  4. Run the migrations

    cd project
    python manage.py migrate
  5. Create superuser (admin)

    python manage.py createsuperuser
  6. Run server

    python manage.py runserver

APIs

  • /scrape scrape the data of the houses of a selected city.
  • /predict predict the price of a house based of its city, region, year of construction, area and the number of rooms.

Contact

Masoud Gheisari

About

A django project to scrape the data of houses from https://divar.ir and store them in database. Also a model is trained using machine learning (Decision Tree) to predict house prices.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published