@@ -24,7 +24,7 @@ recent_turnout <- read.csv("https://raw.githubusercontent.com/plotly/datasets/ma
24
24
recent_turnout$region <- factor(recent_turnout$region, levels=c("British","Northern","Western","Mediterranean","Central/Eastern"))
25
25
26
26
library(plotly)
27
- fig <- recent_turnout %>%
27
+ p <- recent_turnout %>%
28
28
ggplot(aes(x=nat_turnout,y=euro_turnout)) +
29
29
geom_text(aes(size=population/3.5, label=abbreviation, colour=region), alpha=1) +
30
30
labs(title = "Recent turnout in European Union countries",
@@ -45,7 +45,7 @@ recent_turnout <- read.csv("https://raw.githubusercontent.com/plotly/datasets/ma
45
45
recent_turnout$region <- factor(recent_turnout$region, levels=c("British","Northern","Western","Mediterranean","Central/Eastern"))
46
46
47
47
library(plotly)
48
- fig <- recent_turnout %>%
48
+ p <- recent_turnout %>%
49
49
ggplot(aes(x=nat_turnout,y=euro_turnout)) +
50
50
geom_point(aes(size=population, colour=region, text=paste("country:", country)), alpha=0.4) +
51
51
geom_text(aes(size=population/3.5, label=abbreviation), colour="gray20", alpha=1) +
@@ -66,7 +66,7 @@ recent_turnout$region <- factor(recent_turnout$region, levels=c("British","North
66
66
67
67
library(plotly)
68
68
library(LaCroixColoR)
69
- fig <- recent_turnout %>%
69
+ p <- recent_turnout %>%
70
70
ggplot(aes(x=nat_turnout,y=euro_turnout)) +
71
71
geom_point(aes(size=population, colour=region, text=paste("country:", country)), alpha=0.4) +
72
72
geom_text(aes(size=population/3.5, label=abbreviation), colour="gray20", alpha=1) +
@@ -90,7 +90,7 @@ m <- lm(euro_turnout ~ nat_turnout, data = recent_turnout)
90
90
91
91
library(plotly)
92
92
library(LaCroixColoR)
93
- fig <- recent_turnout %>%
93
+ p <- recent_turnout %>%
94
94
ggplot(aes(x=nat_turnout,y=euro_turnout)) +
95
95
stat_smooth(geom="line", method="lm", alpha=0.3, se=FALSE) +
96
96
geom_point(aes(size=population, colour=region, text=paste("country:", country)), alpha=0.4) +
@@ -119,7 +119,7 @@ m <- lm(euro_turnout ~ nat_turnout, data = recent_turnout)
119
119
120
120
library(plotly)
121
121
library(LaCroixColoR)
122
- fig <- recent_turnout %>%
122
+ p <- recent_turnout %>%
123
123
ggplot(aes(x=nat_turnout,y=euro_turnout)) +
124
124
stat_smooth(geom="line", method="lm", alpha=0.3, se=FALSE) +
125
125
geom_point(aes(size=population, colour=region, text=paste("country:", country)), alpha=0.4) +
0 commit comments