@@ -55,7 +55,7 @@ p <- ggplot(district_density,aes(x=cluster, y=dem_margin, colour=region)) +
55
55
labs(title = "Democratic performance in the 2018 House elections, by region and density",
56
56
x = "Density Index from CityLab",
57
57
y = "Democratic Margin of Victory/Defeat")
58
- ggplotly(p)
58
+ p <- ggplotly(p)
59
59
60
60
# Create a shareable link to your chart
61
61
# Set up API credentials: https://plot.ly/r/getting-started
@@ -80,7 +80,7 @@ p <- ggplot(district_density,aes(x=cluster, y=dem_margin)) +
80
80
labs(title = "Democratic performance in the 2018 House elections, by region and density",
81
81
x = "Density Index from CityLab",
82
82
y = "Democratic Margin of Victory/Defeat")
83
- ggplotly(p)
83
+ p <- ggplotly(p)
84
84
85
85
# Create a shareable link to your chart
86
86
# Set up API credentials: https://plot.ly/r/getting-started
@@ -105,7 +105,7 @@ p <- ggplot(district_density,aes(x=region, y=dem_margin, colour=region)) +
105
105
labs(title = "Democratic performance in the 2018 House elections, by region and density",
106
106
x = "Density Index from CityLab",
107
107
y = "Democratic Margin of Victory/Defeat")
108
- ggplotly(p)
108
+ p <- ggplotly(p)
109
109
110
110
# Create a shareable link to your chart
111
111
# Set up API credentials: https://plot.ly/r/getting-started
@@ -138,7 +138,7 @@ p <- ggplot(district_density,aes(x=region, y=dem_margin, colour=region)) +
138
138
labs(title = "Democratic performance in the 2018 House elections, by region and density",
139
139
x = "Density Index from CityLab",
140
140
y = "Democratic Margin of Victory/Defeat")
141
- ggplotly(p)
141
+ p <- ggplotly(p)
142
142
143
143
# Create a shareable link to your chart
144
144
# Set up API credentials: https://plot.ly/r/getting-started
@@ -170,7 +170,7 @@ p <- ggplot(district_density,aes(x=region, y=dem_margin, colour=region)) +
170
170
y = "Democratic Margin of Victory/Defeat") +
171
171
theme(text = element_text(family = 'Fira Sans'),
172
172
legend.position = "none")
173
- ggplotly(p)
173
+ p <- ggplotly(p)
174
174
175
175
# Create a shareable link to your chart
176
176
# Set up API credentials: https://plot.ly/r/getting-started
@@ -200,7 +200,7 @@ p <- ggplot(district_density,aes(x=cluster, y=dem_margin, colour=region,
200
200
x = "Density Index from CityLab",
201
201
y = "Democratic Margin of Victory/Defeat") +
202
202
theme(text = element_text(family = 'Fira Sans'))
203
- ggplotly(p, tooltip=c("district","y"))
203
+ p <- ggplotly(p, tooltip=c("district","y"))
204
204
205
205
# Create a shareable link to your chart
206
206
# Set up API credentials: https://plot.ly/r/getting-started
0 commit comments