Salary Trends in the U.S.
My analysis uses data from a public survey with more than 23,000 data points, and the visualizations show U.S salary trends by industry, age and years experience. The analysis was done using data from April 27, 2021 to May 15, 2024.
Problem
What career path will allow you to maximize your income?
Background
As I'm in the midst of my job search, I've been thinking a lot about opportunities in different industries, my salary options, etc. In researching, I came across a site which collected salary data from tens of thousands of people all over the world. The database contains data about industry, job title, age, salary, location, education level and years of experience. This information was collected via a public survey posted online. Having found this data and given my circumstances, I was excited to explore this data and learn more about what the highest paying jobs are.
Solution
Based on this data, the two ways to maximize your income, without taking into account your passion or dream job, is to either:
-
Get a job in the Computer/Tech industry where the average salary is about $155,000
-
Get a professional degree, such as MD or Law Degree



Approach
Cleaning
​
Since this data was collected in the form of a public survey where there's both quantitative and qualitative data, it requires extensive cleaning. I decided to use R since the dataset is so large and still growing. Using R allows me to pull the data directly from the active Google Sheet. The form had a combination of required and optional fields, multiple choice, free form text and structured text. These are the steps I took to clean the data:
​
-
Change the column names to something clear and readable
-
Format the data to the correct datatype
-
Categorize the currency field to standardize the format
-
Categorize non-standard industries into an "Other" category
*Since I was focusing on salaries in the U.S. I filtered the data to where currency = USD and continued cleaning so save some time. -
Removed any outliers and test data
​
Analyzing
​
I decided to focus my analysis on how age, education level and industry affect average salary in the U.S. These 3 factors are normally what people focus on the most when they're looking to start or change their careers.
​
Analyzing the data consisted of writing formulas and summarizing the data to get total and average salaries, building bar charts and looking for patterns, doing some more data cleaning, and repeating until the data made sense. Once I was at the point where the data was as clean as I could get it, I noticed a few things:
​
-
Salary by age trends up until age group 55-64, which is typically what you would expect since people may start to retire around that age. But what I thought was interesting was the rate of increase. There's a significant increase between age groups 18-24 and 25-34 of almost $30,000. Then there's a decent jump of about $20,000 between age groups 25-34 and 35-44. After that, there's only an increase of about $1,000 until salary starts to decrease.
-
Salary by education level trends as expected, but not as dramatically as I expected. Based on this data, the higher the level of education you achieve, the more money you can potentially make. The only caveat here is that a PhD and a Professional Degree (MD, JD, etc.) are considered to be somewhat equivalent in terms of level of education, but earning a Professional Degree you could potentially make almost $40,000 more. What surprised me was the difference in salary between a College Degree (Bachelors or Associates) and a Masters Degree being only about $5,000. I also expected the difference between a High School and a Masters Degree to be more than $15,000.
-
Salary by industry doesn't necessarily have a trend since the categories are more lateral than hierarchal, but it does show that the top 3 highest paying industries are Computing or Tech, Law, and Sales. Since a Law Degree is considered a Professional Degree, this point supports the education trend as well.
​
Feel free to view my code in GitHub!
Conclusion
Given the analysis above, in order to maximize your income while only factoring in highest paying industry, education level and age, you can do one of the following:
-
Get a PhD or, preferably, a Professional Degree (MD, JD/Lawyer, etc.)
-
Get a job in the Tech or Sales Industry
-
Aim to achieve your desired salary by ages 35-44