Abstract
Data science jobs are in high demand and have a wide range of salaries alongside the various careeer titles listed in the industry. Like in all statistics, It’s important when considering a career to have as much data as possible on order to make an informed decision about where to invest your time and effort. This notebook will utilize the Data jobs salaries dataset created by LORENZO VÁZQUEZ to visualize the salaries of data science jobs based on a variety of separate parameters. It will bin the data into categories based on job title and then summarize the data for each title to determine its viability and variability.
Intro to the data
Where was it found?
I downloaded the data from Kaggle.com.
When was it last updated?
The data is updated weekly and was most recently updated on November
21st 2023.
What is its time and geographical frame?
The data is collected on weekly basis and includes data from 2021
until present. The data is collected globally and is sorted by employee
residence and company location.
How many columns and rows are included?
There are 11 columns and 8,816 rows.
What does each row represent?
each row represents a single job’s salary information.
This gives us a glimpse into our data set.
## Rows: 8,816
## Columns: 11
## $ work_year <int> 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 202…
## $ experience_level <chr> "MI", "MI", "EN", "MI", "MI", "MI", "MI", "MI", "SE…
## $ employment_type <chr> "CT", "FT", "FT", "FL", "FT", "FT", "FT", "FT", "FT…
## $ job_title <chr> "AI Engineer", "Data Scientist", "Data Scientist", …
## $ salary <int> 50000, 60000, 53000, 21000, 135000, 120000, 150000,…
## $ salary_currency <chr> "USD", "EUR", "EUR", "USD", "USD", "USD", "USD", "U…
## $ salary_in_usd <int> 50000, 64781, 57223, 21000, 135000, 120000, 150000,…
## $ employee_residence <chr> "CZ", "ES", "NL", "PK", "US", "US", "US", "US", "US…
## $ remote_ratio <int> 100, 100, 50, 100, 0, 0, 100, 100, 0, 0, 100, 100, …
## $ company_location <chr> "CA", "ES", "NL", "LU", "US", "US", "US", "US", "US…
## $ company_size <chr> "L", "L", "L", "S", "M", "M", "M", "M", "M", "M", "…
The glimpse shows that the data has a number of columns that will not be necessary for our analysis, so we narrow the data by using the group by and summary functions of dplyr.
job_title_sal <- salaries_w %>% group_by(job_title) %>%
summarize(
count = n(),
avg_sal = mean(salary_in_usd),
min_sal = min(salary_in_usd),
max_sal = max(salary_in_usd)
) %>%
arrange(desc(count))
print(job_title_sal)## # A tibble: 123 × 5
## job_title count avg_sal min_sal max_sal
## <chr> <int> <dbl> <int> <int>
## 1 Data Engineer 2062 146596. 17025 385000
## 2 Data Scientist 1856 156057. 16000 412000
## 3 Data Analyst 1324 109721. 15000 430967
## 4 Machine Learning Engineer 908 183570. 20000 392000
## 5 Applied Scientist 258 190479. 20000 350000
## 6 Research Scientist 247 183088. 23000 450000
## 7 Analytics Engineer 241 156172. 37573 430640
## 8 Data Architect 201 164180. 52500 376080
## 9 Business Intelligence Engineer 134 152842. 43064 259000
## 10 Research Engineer 133 184970. 16455 385000
## # ℹ 113 more rows
The data is now sorted into bins based on job title and include average, minimum, and maximum salary amounts. The results are sorted in descending order based on the highest number of title occurrence.
We take the top ten job titles and feed them into a horizontal bar chart to get a clearer picture of the comparison of average salaries.
To make sure we have an understanding that the whole story is not told by average salary I made a box and whisker plot highlighting the top 6 job titles so that we can see the outliers.
options(scipen = 99)
salaries_w %>% filter(job_title == "Applied Scientist" | job_title == "Research Engineer" | job_title == "Machine Learning Engineer" | job_title == "Research Scientist" | job_title == "Data Architect" | job_title == "Analytics Engineer") %>%
ggplot(aes(x = reorder(job_title, -salary_in_usd), y = salary_in_usd)) +
geom_boxplot() +
coord_flip() +
labs(title = "Box and Whisker Plot of Top 6 Data Jobs",
x = "Job Title",
y = "Salary in USD")
Business Questions
After investigating the data I set out to ask some pertinent questions.
1. Which data job has the highest average salary?
Looking at our Horizontal bar chart and our table we can easily see that our highest average salary goes to applied scientist at $190,479.37. You can also see in the box and whisker plot that the average line shows highest. It is interesting to see though that the position has a number of outliers skewing the average.
2. Which job title has the most consistent salary range?
To answer that we can look at our table with min/max values and determine the range through simple algebra. We should also discount job titles that are singular or have very few positions globally. For this question I decided to discount any job titles that had less than 100 positions globally. Business intelligence engineer comes out in front with the most consistent salary range. It shows a difference of only 215,936 from lowest to highest salary amounts.
3. Which job title has the widest salary range?
Using the same method from the previous question I found the widest salary range from the research scientist title. With a range of 427,000 it nearly doubles the range of the previous job title. It would be difficult to determine a reasonable starting salary when searching for a job with such a wide pay range.
Results / Conclusion
The data presented could help a job seeker find where to focus their efforts when applying for jobs. Looking at our results gives us a better understanding of the standards in the industry and allows us to more efficiently utilize our time. While the highest average salary position seems like it would be a good place to start, it also has an inconsistent salary range across the globe. When deciding where to invest your time and energy it may be wiser to seek a more reliable position.