Uploaded by Abhi Karri

Lab 12 – In Lab Activity (for Extra Credit)

advertisement
Lab 12 – In Lab Activity (for Extra Credit)
In groups of 3 or 4 (can be your lab group OR a different group), you will complete the below
problems. ONE person will submit a pdf of the group’s work, then add the names of the group
members that are present in the lab (attendance will be taken and if a group adds a student’s
name who is not present in lab, then that whole group will not receive the extra credit).
As mentioned in the announcement, attending your registered lab on Tuesday, December 6th and
following along and completing the in-lab activity will be part of how you can get the extra
credit.
Names of students present in lab (who equally contributed to the activity):
Problem 1: As a group, select a different static variable (not the ones we did together in the
lab) you are interested in analyzing/mapping (select a variable from the static_data.csv). Refer to
the Data Dictionary.
A. Create a map of that static variable using ggplot2. You can follow the code we used
to create the maps we went through together in lab. Note you will have to change a few
of the arguments to be able to create your map. Make sure to include appropriate
labels and a Map Title.
B. Briefly describe in 2-3 sentences any interesting observations or trends you notice
about your variable in the US. If you don’t notice anything in particular, describe what
you expected to see.
Toward the southeast, the obesity rates are generally higher compared to the West. Also,
in warmer areas around the country there tends to be higher obesity. In addition to this
observation, we also observe that obesity rates seem to be sequestered in higher groups
around busier states with higher populations.
What you need to submit to get credit:
1. At the top of the Word document, include all the names of all the group members
present in lab.
2. Include your chosen static variable map (you can copy the map and paste it into a
word document) & your response to Problem 1B.
3. Copy and paste the R code used to generate your map (just your code used to generate
the map you created).
ggplot(data = static, aes(x = long, y = lat, group = group, fill = Obesity)) +
+ geom_polygon() +
+ labs(title = "Average Percentage of Obese Adults in 2016 By State (BMI 30+)", x =
"Longitude", y = "Latitude", fill = "Percentage of Obese Adults") +
+ scale_fill_gradient(low = "white", high = "red")
Download