Import data

# csv file
data <- read_csv("data/myData.csv")
## Rows: 2051 Columns: 16
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (6): country, region, source, purpose, name, type
## dbl (10): date_long, year, id_no, latitude, longitude, magnitude_body, magni...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
data
## # 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>

Plot data

data %>%
    
    ggplot(aes(country)) +
    geom_bar()