We start by downloading the file from Princeton University which contains the following data:
Source: Princeton University
- Download source: http://data.princeton.edu/wws509/datasets/#salary.
- To keep things simple, we then select the yr and sl to study how the number of years in rank influences the salary. To cut down on data wrangling code, we save those two columns in a file (Year_Salary.csv), as depicted in the following table, to study their linear relationship:
- We visually inspect the data by using a scatter plot ...