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.
Graph1Countries <-c("China", "Germany", "Japan", "United States")Graph1Data <-filter(Nations, country %in% Graph1Countries)
plot1 <-ggplot(Graph1Data, aes(x=year, y=GDP, color = country)) +geom_point() +geom_line() +scale_color_brewer(palette ="Set1") +labs(title ="China's Rise to Become The Largest Economy", x ="Years", y="GDP($trillion)")plot1
`summarise()` has grouped output by 'region'. You can override using the
`.groups` argument.
plot2 <-ggplot(sumregion, aes(x = year, y = sum_GDP, fill = region)) +geom_area() +scale_fill_brewer(palette ="Set2") +labs(title ="GDP by World Bank Region",x ="year",y ="GDP (Trillion)")plot2