1. Homepage
  2. Exam
  3. [2021] Auckland - STATS 787 Data Visualisation - Final Exam - Q5 Scatter Plot

[2021] Auckland - STATS 787 Data Visualisation - Final Exam - Q5 Scatter Plot

This question has been solved
Engage in a Conversation
5. [10 marks]

This question relates to the following code, which produces an interactive scatterplot that looks similar to the image below (except that it is interactive). CourseNana.COM


CourseNana.COM

library(ggplot2) CourseNana.COM

library(plotly) CourseNana.COM

sharedf <- highlight_key(singapore, ~ gender) CourseNana.COM

gg <- ggplot(sharedf) + CourseNana.COM

geom_point(aes(x=1:30, y=age, text=gender), CourseNana.COM

color=c(3, 4, rep(1, 28)), size=3) CourseNana.COM

pg <- ggplotly(gg) CourseNana.COM

highlight(pg, on = "plotly_selected", color = "red") CourseNana.COM

  CourseNana.COM

(a) [7 marks] CourseNana.COM

Explain in detail the purpose of every line of the code above, including the meaning of all functions and arguments. CourseNana.COM


CourseNana.COM

(b) [3 marks] CourseNana.COM

Describe what would happen in the interactive scatterplot for each of the following interactions (if we perform these interactions one after the other, in CourseNana.COM

the order below): CourseNana.COM

• We hover the mouse cursor over the green data symbol in the scatterplot. CourseNana.COM

• We select the green data symbol in the scatterplot (by clicking and dragging a rectangular selection around just that data symbol). CourseNana.COM

• We select the blue data symbol (by clicking and dragging a rectangular selection around just that data symbol). CourseNana.COM

CourseNana.COM

CourseNana.COM

CourseNana.COM

CourseNana.COM

Get the Solution to This Question

WeChat WeChat
Whatsapp WhatsApp
The University of Auckland代写,STATS 787代写,Data Visualisation代写,R lang代写,ggplot2代写,The University of Auckland代编,STATS 787代编,Data Visualisation代编,R lang代编,ggplot2代编,The University of Auckland代考,STATS 787代考,Data Visualisation代考,R lang代考,ggplot2代考,The University of Aucklandhelp,STATS 787help,Data Visualisationhelp,R langhelp,ggplot2help,The University of Auckland作业代写,STATS 787作业代写,Data Visualisation作业代写,R lang作业代写,ggplot2作业代写,The University of Auckland编程代写,STATS 787编程代写,Data Visualisation编程代写,R lang编程代写,ggplot2编程代写,The University of Aucklandprogramming help,STATS 787programming help,Data Visualisationprogramming help,R langprogramming help,ggplot2programming help,The University of Aucklandassignment help,STATS 787assignment help,Data Visualisationassignment help,R langassignment help,ggplot2assignment help,The University of Aucklandsolution,STATS 787solution,Data Visualisationsolution,R langsolution,ggplot2solution,