Use this template for your ECON 334 R assignments. Replace this line and everything below with your answers to the assigned questions. Remember that you can paste R code chunks between these delimiters:
Question 1
friends <- c("Tracy","Tina","Lucy")
friends
## [1] "Tracy" "Tina" "Lucy"
ages <- c(23,22,23)
ages
## [1] 23 22 23
b.1
friends <- c("Tracy","Tina","Lucy")
friends
ages <- c(23,22,23)
ages
This option combines two objects (friends and ages) into one library and remove the ##Attaching packages when I knit the file.
b.2
This options doesn’t load the output so this part of the knitted file is blank.
b.3
## [1] "Tracy" "Tina" "Lucy"
## [1] 23 22 23
This option only shows the #Attaching packages in the knitted file.
Question 2
a.Example of bad data visualization
The Economist, Why ticket prices on long-haul flights have plummeted
Link of source: https://rigorousthemes.com/blog/bad-data-visualization-examples/
Reasons why my image is not a good data visualization:
Bad taste at choosing the format and design for data visualization.
Display complex details that overlap each other, making it harder for readers to interpret.
Although the protractor features two lines representing types of flights and their distances, the price for each flights are not mentioned.
b.Example of good data visualization
Google Analytics Dashboard
Link of source: https://www.oneclickitsolution.com/blog/data-visualization-examples/
Reasons why my image is a good data visualization:
Make good use of of different type of graph with properly chosen format and design.
Avoid unnecessary content-free decoration, including chartjunk.
The graphics are not too dense on data-to-ink ratio, helping the readers interpret the data easier.