Skip to content

Job Satisfaction Analysis #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Job Satisfaction Analysis/DatasetLink.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://drive.google.com/file/d/1CnCnFGRt0LDJibsDuH2690gTPpcB-RJx/view?usp=sharing
644 changes: 644 additions & 0 deletions Job Satisfaction Analysis/JobSatisfaction.ipynb

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions Job Satisfaction Analysis/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import streamlit as st
import joblib
import pandas as pd

# Load the model
model = joblib.load('model.pkl')

# Define the feature columns used in the model
features = ['Hobby', 'OpenSource', 'Country', 'Student', 'Employment', 'FormalEducation',
'UndergradMajor', 'CompanySize', 'DevType', 'YearsCoding', 'YearsCodingProf']

st.title('Job Satisfaction Prediction')

# Create a form for user input
with st.form(key='prediction_form'):
Hobby = st.selectbox('Hobby:', ['Yes', 'No'])
OpenSource = st.selectbox('Open Source:', ['Yes', 'No'])
Country = st.selectbox('Country:', ['United States', 'India', 'Germany'])
Student = st.selectbox('Student:', ['Yes', 'No'])
Employment = st.selectbox('Employment:', ['Employed full-time', 'Employed part-time', 'Self-employed', 'Unemployed'])
FormalEducation = st.selectbox('Formal Education:', ["Bachelor’s degree (BA, BS, B.Eng., etc.)",
"Master’s degree (MA, MS, M.Eng., MBA, etc.)",
"Doctoral degree (PhD)"])
UndergradMajor = st.selectbox('Undergrad Major:', ["Computer science, computer engineering, or software engineering",
"Information technology, networking, or system administration",
"Other engineering discipline"])
CompanySize = st.selectbox('Company Size:', ['Fewer than 10 employees', '10 to 19 employees', '20 to 99 employees',
'100 to 499 employees', '500 to 999 employees', '1,000 to 4,999 employees'])
DevType = st.selectbox('Dev Type:', ['Developer, back-end', 'Developer, front-end', 'Developer, full-stack'])
YearsCoding = st.selectbox('Years Coding:', ['0-2 years', '3-5 years', '6-8 years', '9-11 years'])
YearsCodingProf = st.selectbox('Years Coding Professionally:', ['0-2 years', '3-5 years', '6-8 years', '9-11 years'])

submit_button = st.form_submit_button(label='Get Prediction')

if submit_button:
# Collect user input
input_data = {
'Hobby': Hobby,
'OpenSource': OpenSource,
'Country': Country,
'Student': Student,
'Employment': Employment,
'FormalEducation': FormalEducation,
'UndergradMajor': UndergradMajor,
'CompanySize': CompanySize,
'DevType': DevType,
'YearsCoding': YearsCoding,
'YearsCodingProf': YearsCodingProf
}

# Convert user input to DataFrame
input_df = pd.DataFrame([input_data])

# Ensure the input has the same columns as the training data
input_df = input_df[features]

# Make prediction
prediction = model.predict(input_df)

# Display the prediction
st.write(f'Predicted Job Satisfaction: {prediction[0]}')
12 changes: 12 additions & 0 deletions Job Satisfaction Analysis/requirement.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
here are requirement->
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler, OneHotEncoder
from sklearn.compose import ColumnTransformer
from sklearn.pipeline import Pipeline
from sklearn.impute import SimpleImputer
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy