Professional Documents
Culture Documents
Assignment #1
Professors Nita Rudra & Joel Simmons
TA: Olivia Nesbit
Due: Oct 2, 3:00pm
I. Introduction:
In this assignment, you are asked to demonstrate your understanding of the
ggplot2 graphics package in R. On our course Canvas cite (following the links
for Files > Data), I have uploaded the following 4 files.
1. First, you are to make a scatter plot using any two numeric variables in the
Data_WVS_CrossSection data set. Besides the points themselves, the scatter
plot must contain the following information:
a. A regression line through the points that shows the general correlation
between the variables.
b. Country labels for each point that is plotted.
c. Use an aesthetic to denote to which region of the world the countries
belong.
d. Well-named X and Y-axes.
e. In the comments of your script file (about which more below), briefly
note what the general relationship between the two variables is and
whether you see any countries that seem like outliers from the general
trend.
2. For the second graph, each of you has been assigned a particular country. See
the (CountryAssignments file to see which country you should study.) Using the
Data_WVS_Individual data set, plot a histogram that shows how the survey
respondents for your assigned country answered any one of attitudes question.
Included in the data. While doing this, use an aesthetic to illustrate whether
there are any differences between how men and women responded to the
question.
3. For the third and final graph, use the Data_WDI6014 data set that we have
worked with before to plot the evolution of per capita GDP for your assigned
country. (NOTE: Some countries may not have data for certain variables
variables like foreign aid and literacy are often missing for example. To be
safe, plot something like per capita GDP or the GDP growth rate.)