Data Science for Fundraising: Build Data-Driven Solutions Using R by Ashutosh Nandeshwar & Rodger Devine

Data Science for Fundraising: Build Data-Driven Solutions Using R by Ashutosh Nandeshwar & Rodger Devine

Author:Ashutosh Nandeshwar & Rodger Devine
Language: eng
Format: mobi
Publisher: Data Insight Partners LLC
Published: 2018-03-03T08:00:00+00:00


FIGURE 10.44: Alumni size and participation rates (FY15)

10.10.2 Creating Bubble Plots

When you replace the individual data points in a scatter plot with circles proportional to some measure, you create bubble plots. Hans Rosling gave the most wonderful example of a bubble plot in his video. Thanks to the gapminder library we can use the data set to create our own bubble plot, as seen in Figure 10.45.

library(gapminder)

library(dplyr)

library(ggplot2)

plot_data <- filter(gapminder, year == '2007')

g <- ggplot(data = plot_data,

aes(x = gdpPercap,

y = lifeExp,

size = pop,

color = continent)) +

geom_point(alpha = 0.4) + theme_bare

print(g)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.