Skip to content

This web application helps estimate the annual cost of living based on inputs like state, metro area, number of parents, children, and whether childcare is needed. Users can compare estimated costs with the median family income to see how affordable life is in a given scenario.

License

Notifications You must be signed in to change notification settings

Trevin07/Cost_estimator

Repository files navigation

Cost estimator

🏠 Cost of Living Estimator Web App

This web application helps estimate the annual cost of living based on inputs like state, metro area, number of parents, children, and whether childcare is needed. Users can compare estimated costs with the median family income to see how affordable life is in a given scenario.


📊 Model Details

  • Algorithm Used: Linear Regression
  • Training Data: Over 30,000 cleaned and preprocessed records
  • Evaluation Metrics:
    • Mean Squared Error (MSE)
    • R-squared Score: 0.99 (very high accuracy)

The model was trained to predict the total annual cost given specific family and location conditions. It uses encoded state information and matches combinations of inputs for fast, reliable predictions.


🌐 Tech Stack

  • Frontend: HTML, CSS (no static folder used)
  • Backend: Flask (Python)
  • Model Handling: joblib for loading the state encoder
  • Data: CSV dataset for cost lookup, trained locally
  • Model: Linear Regression model trained through Jupyter Notebook

📷 Screenshot

App Screenshot


🚀 How to Run Locally

  1. Clone the repo
  2. Make sure state_encoder.pkl and cost_lookup.csv are in the root folder
  3. Run the Flask app:
    python app.py
    

License

This project is licensed under the MIT License.

About

This web application helps estimate the annual cost of living based on inputs like state, metro area, number of parents, children, and whether childcare is needed. Users can compare estimated costs with the median family income to see how affordable life is in a given scenario.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published