Visualizing colonialism votes
In an earlier exercise, you graphed the percentage of votes each year where the US voted "yes". Now you'll create that same graph, but only for votes related to colonialism.
Bu egzersiz
Case Study: Exploratory Data Analysis in R
kursunun bir parçasıdırEgzersiz talimatları
- Load the
ggplot2package. - Filter the
votes_joineddataset for only votes by the United States relating to colonialism, thensummarize()the percentage of votes that are "yes" within eachyear. Name the resulting columnpercent_yesand save the entire data frame asUS_co_by_year. - Add a
geom_line()layer to yourggplot()call to create a line graph of the percentage of "yes" votes on colonialism (percent_yes) cast by the US over time.
Uygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
# Load the ggplot2 package
# Filter, then summarize by year: US_co_by_year
# Graph the % of "yes" votes over time
___(US_co_by_year, ___) ___
___