Lab 4.1 - Collaboration Assignment

Group E:

Author

Andrew Koerner, Gustavo Maida & Paula Davila Benitez

First Graphs.

Code
library(ggplot2)

p <- ggplot(data = midwest, mapping = aes(x=percbelowpoverty, y=percollege))
p + geom_point() + 
        labs(x="Percent Below Poverty", 
                 y="Percent College-Educated", 
                 title="Percentage Below Poverty compared with Percentage of College Education",
                 subtitle="Comparing the 5 Midwest States")

Code
p <- ggplot(data = midwest, mapping = aes(x=percbelowpoverty, y=percollege))
p + geom_density_2d()+
    geom_point(aes(color = state)) + 
        labs(x="Percent Below Poverty", 
                 y="Percent College-Educated", 
                 title="Percentage Below Poverty compared with Percentage of College Education",
                 subtitle="Comparing the 5 Midwest States",
                 caption="Source: dataset{midwest}")

Interpretation

The second graphic provides a better visualization. We think adding color is beneficial to differentiate and compare every state. However, the geom density 2d function could be confusing and takes more room which does not allow the public to clearly difference between the dots. We came to the conclusion it was better without this function but adding the colors its fundamental.

Code
library(ggplot2)
p <- ggplot(data = midwest, mapping = aes(x=percbelowpoverty, y=percollege))
p + geom_density_2d()+
    geom_point(aes(color = state)) +
    facet_wrap(~state, ncol=5) +
        labs(x="Percent Below Poverty", 
                 y="Percent College-Educated", 
                 title="Percentage Below Poverty compared with Percentage of College Education",
                 subtitle="Comparing the 5 Midwest States",
                 caption="Source: dataset{midwest}")

Facet Interpretation

We agreed the first graph would be better if we only want to see all the states together, but if we would like to compare each state between each other the faceting would be very useful to clearly see these differences between the states.

END