BRIEF

  1. I have added all relevant R code (with issue of plotting 4 variables on one graph remaining unresolved by TAs) to make the graph fully reproducible. The process in which the data was wrangled and plotted is also fully comprehensible now.
  2. This is a SCATTER graph.
  3. The DATA was taken from the gapminder library. It had qualitative variables like continent and quantitative variables like year, minGdpPercap and maxGdpPercap
  4. The audience is general in nature, with possible specialization in economics field, and who may be interested in comparative economic statistics across geographies.
  5. This is a graph that depicts maximum and minimum GDP across 5 continents in a time series from 1950 to 2017.
  6. The scatter graph uses facets to show how maximum and minimum GDPs have varied over time over the last few decades.
  7. A negative aspect of this graph is that one has to rely on facets to see how maximum and minimum GDPs varied across continents. It would have been nice to have figured out a way to display 4 variables on one graph so the inaccuracies inherent to visualizing of data across facets could have been avoided.
  8. A common variation of this scatter graph is a dot plot plotting year versus the two GDP numbers. However, even that would require facet wrap and its inherent inaccuracies in visualization, especially if the number of facets cause multiple rows of graphs.
  9. The graph required me to first group the data by year, then by continent to allow summarization of the GDP. The data was then sorted by continent and then mapped using ggplot’s geom_point and facet_wrap methods.
library(gapminder)
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
gdp_metrics_by_continent <- gapminder %>% 
  group_by(year,continent) %>% 
  summarize(minGdpPercap = min(gdpPercap), maxGdpPercap = max(gdpPercap)) %>% 
  arrange(continent)
gdp_metrics_by_continent
## # A tibble: 60 x 4
## # Groups:   year [12]
##     year continent minGdpPercap maxGdpPercap
##    <int> <fct>            <dbl>        <dbl>
##  1  1952 Africa            299.        4725.
##  2  1957 Africa            336.        5487.
##  3  1962 Africa            355.        6757.
##  4  1967 Africa            413.       18773.
##  5  1972 Africa            464.       21011.
##  6  1977 Africa            502.       21951.
##  7  1982 Africa            462.       17364.
##  8  1987 Africa            390.       11864.
##  9  1992 Africa            411.       13522.
## 10  1997 Africa            312.       14723.
## # ... with 50 more rows
# Graph to accompany GDP analysis
library(ggplot2)
ggplot(gdp_metrics_by_continent, aes(year)) +
  geom_point(aes(y=minGdpPercap)) +
    geom_point(aes(y=maxGdpPercap)) +
  facet_wrap(~ continent)