Skip to content

tien02/salary-prediction

Repository files navigation

Developer's Salary Prediction

Dataset

  • Use Stack Overflow Annual Developer Survey to train model. Download the dataset at here

  • For Salary prediction purpose, use 9 features RemoteWork, EdLevel, YearsCodePro, DevType, LanguageHaveWorkedWith, PlatformHaveWorkedWith, ToolsTechHaveWorkedWith, Country, Age to predict ConvertedCompYearly as Salary.

  • Data preprocessing: preprocess.py

  • Data visualization: visual.ipynb

Model

Best Result

Metrics Values
RMSE 37068.786
MAE 25121.021
R2-score 0.619

Run Code

  1. Install dependencies
pip install -r requirements.txt
  1. Download dataset & extract zip file
wget <link-to-data>
unzip stack-overflow-developer-survey-2022.zip -d data
  1. Run streamlit web app

I build a streamlit app to easily view the data and predict the salary.

Run code:

streamlit run web.py

Web demo