In this assignment, we created a series of analog (meaning hand-drawn with pencil and paper) graphics in order to have an appreciation for the mechanistic steps involved in accurately graphing data. The visualizations created are numerically and visually accurate and precisely scaled.
Since preprocessing is involved in many graphics, we analyzed and summarized those data in R. Close attention was paid to scaling the data and labelling the axes accurately. The final HTML document includes scanned images for various types of plots and a short summary of the process as shown here.
We begin by looking up the mtcars data in R. This is the dataset that we used to create our graphics. In the following section, we analyze the data in R and then, draw the analog plots using pencil and graph paper.
mtcars data set that have different carb values.class(mtcars$carb)
## [1] "numeric"
carb.factor <- table(mtcars$carb)
carb.factor
##
## 1 2 3 4 6 8
## 7 10 3 10 1 1
percent.carb <- prop.table(carb.factor)*100
percent.carb
##
## 1 2 3 4 6 8
## 21.875 31.250 9.375 31.250 3.125 3.125
angle.carb <- percent.carb*360/100
angle.carb
##
## 1 2 3 4 6 8
## 78.75 112.50 33.75 112.50 11.25 11.25
# place the code to import graphics here
knitr::include_graphics("C:/Harrisburg University Classes/Sem 2 - Fall 2017/ANLY-512/Assignments/Problem Set 1/Fig1 Pie Chart.png")
gear type in mtcars dataset.gear.factor <- table(mtcars$gear)
gear.factor
##
## 3 4 5
## 15 12 5
# place the code to import graphics here
knitr::include_graphics("C:/Harrisburg University Classes/Sem 2 - Fall 2017/ANLY-512/Assignments/Problem Set 1/Fig2 Bar Chart.png")
gear type and how they are further divded out by cyl.counts <- table(mtcars$cyl, mtcars$gear)
counts
##
## 3 4 5
## 4 1 8 2
## 6 2 4 1
## 8 12 0 2
# place the code to import graphics here
knitr::include_graphics("C:/Harrisburg University Classes/Sem 2 - Fall 2017/ANLY-512/Assignments/Problem Set 1/Fig3 Stacked Bar Chart.png")
wt and mpg.# place the code to import graphics here
knitr::include_graphics("C:/Harrisburg University Classes/Sem 2 - Fall 2017/ANLY-512/Assignments/Problem Set 1/Fig4 Scatter Plot.png")
mpg of cars from the mtcars dataset.# place the code to import graphics here
# Mileage histogram of cars
knitr::include_graphics("C:/Harrisburg University Classes/Sem 2 - Fall 2017/ANLY-512/Assignments/Problem Set 1/Fig5 Histogram.png")