Rows: 5275 Columns: 10
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (5): iso2c, iso3c, country, region, income
dbl (5): year, gdp_percap, population, birth_rate, neonat_mortal_rate
ℹ 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.
View(nations_2_)
##loading libraries
library(ggplot2)
Warning: package 'ggplot2' was built under R version 4.4.2
library(dplyr)
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
ggplot(nations_region, aes(x = year, y = GDP, fill = region)) +geom_area(color ="white", size =0.2) +scale_fill_brewer(palette ="Set2") +labs(title ="Regional GDP Trends Over Time",x ="Year",y ="Total GDP (Trillions of USD)",fill ="Region") +theme_minimal()