Import data

# csv file
myData <- read_csv("../00_data/myData.csv")
myData
## # A tibble: 2,051 Ă— 16
##    date_long  year id_no country region source latitude longitude magnitude_body
##        <dbl> <dbl> <dbl> <chr>   <chr>  <chr>     <dbl>     <dbl>          <dbl>
##  1  19450716  1945 45001 USA     ALAMO… DOE        32.5     -106.              0
##  2  19450805  1945 45002 USA     HIROS… DOE        34.2      132.              0
##  3  19450809  1945 45003 USA     NAGAS… DOE        32.4      130.              0
##  4  19460630  1946 46001 USA     BIKINI DOE        11.4      165.              0
##  5  19460724  1946 46002 USA     BIKINI DOE        11.4      165.              0
##  6  19480414  1948 48001 USA     ENEWE… DOE        11.3      162.              0
##  7  19480430  1948 48002 USA     ENEWE… DOE        11.3      162.              0
##  8  19480514  1948 48003 USA     ENEWE… DOE        11.3      162.              0
##  9  19490829  1949 49001 USSR    SEMI … DOE        48         76               0
## 10  19510127  1951 51001 USA     NTS    DOE        37       -116               0
## # ℹ 2,041 more rows
## # ℹ 7 more variables: magnitude_surface <dbl>, depth <dbl>, yield_lower <dbl>,
## #   yield_upper <dbl>, purpose <chr>, name <chr>, type <chr>

State one question

The longer a professor has taught, the more he/she gets paid.

Plot data

ggplot(data = myData) +
    geom_point(mapping = aes(x = depth, y = region))

Interpret

There seems to be preliminary evident of a positive relationship between professors’ salary and their years of service.