data <- read.csv(here("data", "finaldata.csv"), header = TRUE)Exploratory Data Analysis
First Few Observations
head(data) country_name ISO region year GDP OECD OECD2023 popdens urban
1 Afghanistan AFG Southern Asia 2000 NA 0 0 14.13654 16.25324
2 Afghanistan AFG Southern Asia 2001 NA 0 0 14.23156 16.25661
3 Afghanistan AFG Southern Asia 2002 183.5328 0 0 14.32270 16.42654
4 Afghanistan AFG Southern Asia 2003 200.4626 0 0 14.40691 16.60701
5 Afghanistan AFG Southern Asia 2004 221.6576 0 0 15.21947 16.71367
6 Afghanistan AFG Southern Asia 2005 255.0551 0 0 15.33619 16.85096
agedep male_edu temp matmor infantmor neonatmor under5mor drought
1 108.3466 2.762086 12.69959 1450 90.5 60.9 129.2 1
2 108.9899 2.856936 12.85570 1390 87.9 59.7 125.2 0
3 109.3472 2.954241 12.71081 1300 85.3 58.5 121.1 0
4 109.4475 3.054121 12.16592 1240 82.7 57.2 116.9 0
5 109.2868 3.156706 13.04643 1180 80.0 55.9 112.6 0
6 107.9646 3.262133 12.23141 1140 77.3 54.6 108.4 0
earthquake totaldeath armconflict
1 0 5065 1
2 1 5394 1
3 1 5553 1
4 1 1157 1
5 1 944 1
6 1 817 1
GDP
data |>
ggplot(aes(x = GDP)) +
geom_histogram(bins = 30) +
scale_x_log10()Warning: Removed 62 rows containing non-finite values (`stat_bin()`).
GDP is normally distributed.