Skip to content

This is a project to help tech newbies get started with open source by building

License

Notifications You must be signed in to change notification settings

Greyisheep/rent-predictor

Repository files navigation

Rent Predictor

Rent Predictor is an open-source project designed to simplify contributions for those new to open source, adhering to best practices while addressing a common and relatable issue—apartment searching for students. The project offers search functionalities and easily accessible databases in the form of spreadsheets. The model package provides insights into apartment prices in different areas, aiding students in streamlining their search locations. The open-source nature of the data collection ensures accessibility, usability, and verifiability for end-users.

Table of Contents

  1. Built with
  2. License
  3. Installation
  4. Usage
  5. Configuration
  6. Data
  7. Goals
  8. Next Steps
  9. Contributing
  10. Contact Information

Built with

python jupyter FastAPI NumPy pandas Pydantic scikit-learn pytest React JavaScript

License

License: LGPL v2.1

Installation

Follow these steps to set up and run Rent Predictor on your local machine.

Prerequisites

Make sure you have the following installed on your system:

  • Python (version 3.7 or higher)
  • pip (Python package installer)

Optional (The README is written with this set of Prerequisites in mind)

  • git (Distributed Version Control System, and terminal)
  • VSCode (integrated development environment)
  • Node.Js (JavaScript runtime environment)

Clone the Repository

  1. Open the Git Bash terminal by searching for it
  2. Navigate to the choice of location for the project
  3. Clone the repository with:
git clone https://github.com/Greyisheep/rent-predictor
cd rent-predictor/house_prices_api

Create a Virtual Environment

  1. Type code . and hit the enter button; this takes you to VSCode
  2. In VSCode, press ctrl + ` which opens up a terminal, navigate to the Git Bash terminal
  3. Create a Virtual Environment with:
python -m venv venv

Activate the Virtual Environment

For Windows:

source venv/Scripts/activate

For MacOS/Linux:

source venv/bin/activate

Install Dependencies

pip install -r requirements.txt

For the Front-end setup

  1. Navigate to the react-frontend directory
cd ../simple_frontend/react-frontend/

Install the Dependencies

Using npm

  1. Run the following command to install the dependencies:
npm install

Using yarn

  1. Run the following command to install the dependencies:
yarn install

Usage

To try out functionalities of the API, change the directory into house_prices_api

Functionalities available:

  • Train the pipeline by running:
python model_package/regression_model/train_pipeline.py
  • Start Uvicorn server by running:
python app/main.py

README2

  • Test the API by running: pytest README3 README4

  • Run all tests, checks and start the Uvicorn server with one command: tox

To use the project from the React frontend, navigate to the react-frontend directory (Run on a separate terminal, and make sure the API port is running) and follow these commands

  • Start the frontend app by running:
npm start

READMEnpm

  • To try out the frontend, open http://localhost:3000 To get a prediction output: Fill the form, and press the Submit button

This can be used as a prediction input:

prediction_input

This is the result on the fastapi server:

READMEpred

Configuration

This project is ready to use as is, but if you wish to configure it, i.e., adjust some of the variables, data source, etc., navigate to the config.yml file in the house_prices_api/model_package/regression_model/. This config file is intentionally heavily commented, to aid adjustments and understanding.

Data

If you want your apartment to be displayed in our database, kindly fill out the following Google form:

Google Form Link

The data for this project is available in a Google Sheets spreadsheet. The spreadsheet contains data on rent prices and apartment features for different locations in Nigeria. To access the spreadsheet, click on the following link:

Spreadsheet Link

Goals

The goals of this project are to:

  • Create an open-source apartment search and prediction web app for students in Nigeria.
  • Make it easier for students to find affordable apartments that meet their needs.
  • Help students save money on rent.

Next Steps

The next steps for this project are to:

  • Set up continuous integration and deployment pipelines.
  • Deploy the ML API with containers.
  • Set up differential testing.
  • Set up other backend protocols for user authentication, search, etc.
  • Build a React-based front end for the application.
  • Conduct full integration testing.
  • Create tutorial videos and blogs
  • Expand laterally to handle multiple case scenarios especially for students from other schools

Contributing

We welcome contributions to this project! To contribute, please fork the repo and create a pull request with your changes. Please make sure to test your changes and include a clear and concise description of what your changes do.

Contact Information

Reach me on the following platforms: Gmail LinkedIn Twitter

About

This is a project to help tech newbies get started with open source by building

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •