Alice B. Popejoy and Stephanie M. Fullerton from the University of Washington (at the time of publishing, 2016) collected data on genome-wide association studies (GWAS) conducted until 2016, in which they studied what populations were involved in GWASs.
They collected this data by extracting and validating English-language GWASs reported in PubMed on a weekly basis. They repeated this process after 7 years to share the change in proportion of individuals included in GWAS and shared that while populations of Asian ancestry are better represented, “the degree to which prople of African and Latin American ancestry, Hispanic people and indigenous peoples are represented in GWAS has barely shifted.”
Creating vectors to contain the data and labels to make the pie graphs at the top of figures.
euro_asian_other_2009 <- c(96, 3, 1)
euro_asian_other_labels_2009 <- c("European\n", "\nAsian","\nOther")
euro_asian_other_2016 <- c(81, 14, 5)
euro_asian_other_labels_2016 <- c("European\n", "\nAsian","\nOther")
Creating pie graphs while changing different variables, like adding a title, setting an initial angle so that the slices in the minority are facing the bottom (to replicate the original pie chart), and changing colors to make it as ugly as possible.
# set up par()
par(mfrow = c(1,2), mar = c(2,3,1,5))
#pie graphs 1
# add main, init.angle, radius, and col
pie(x = euro_asian_other_2009, labels = euro_asian_other_labels_2009, main = "2009", init.angle = -82, radius = 1, col = c("red", "green", "pink"))
# pie graph 2
# add main, init.angle, radius, and col
pie(x = euro_asian_other_2016, labels = euro_asian_other_labels_2016, main = "2016", init.angle = -55, radius = 1, col = c("red", "green", "pink"))