##(1) a full data table
Name <- c("Harry Potter", "Hermione Granger", "Ron Weasley", "Draco Malfoy", "Minerva McGonagall", "Cedric Diggory","Severus Snape", "Rubeus Hagrid", "Neville Longbottom", "Luna Lovegood", "Ginny Weasley", "Sirius Black", "Remus Lupin", "Bellatrix Lestrange", "Tom Riddle", "Dolores Umbridge", "Albus Dumbledore")
House <- c("Gryffindor", "Gryffindor","Gryffindor","Slytherin","Gryffindor","Hufflepuff","Slytherin","Gryffindor","Gryffindor", "Ravenclaw", "Gryffindor", "Gryffindor","Gryffindor", "Slytherin","Slytherin","Slytherin", "Gryffindor")
Ancestry <- c("Half-blood", "Muggle-born", "Pure-blood", "Pure-blood", "Half-blood", "Pure-blood", "Half-blood","Half-blood", "Pure-blood", "Pure-blood", "Pure-blood", "Pure-blood","Half-blood", "Pure-blood", "Half-blood ", "Half-blood", "Half-blood")
Age <- c(42,43,42,42,97, 45,62, 94, 42, 41, 41, 63, 62, 71, 96, 61, 42)
Wand <- c(11, 10.75, 12, 10, 9.5, 12.25, 13.25, 16, 13, 11, 9.25, 15, 10.25, 12.25, 13.5, 8, 15)
Harry_Potter <- data.frame(Name, House, Ancestry, Age, Wand)
Harry_Potter
## Name House Ancestry Age Wand
## 1 Harry Potter Gryffindor Half-blood 42 11.00
## 2 Hermione Granger Gryffindor Muggle-born 43 10.75
## 3 Ron Weasley Gryffindor Pure-blood 42 12.00
## 4 Draco Malfoy Slytherin Pure-blood 42 10.00
## 5 Minerva McGonagall Gryffindor Half-blood 97 9.50
## 6 Cedric Diggory Hufflepuff Pure-blood 45 12.25
## 7 Severus Snape Slytherin Half-blood 62 13.25
## 8 Rubeus Hagrid Gryffindor Half-blood 94 16.00
## 9 Neville Longbottom Gryffindor Pure-blood 42 13.00
## 10 Luna Lovegood Ravenclaw Pure-blood 41 11.00
## 11 Ginny Weasley Gryffindor Pure-blood 41 9.25
## 12 Sirius Black Gryffindor Pure-blood 63 15.00
## 13 Remus Lupin Gryffindor Half-blood 62 10.25
## 14 Bellatrix Lestrange Slytherin Pure-blood 71 12.25
## 15 Tom Riddle Slytherin Half-blood 96 13.50
## 16 Dolores Umbridge Slytherin Half-blood 61 8.00
## 17 Albus Dumbledore Gryffindor Half-blood 42 15.00
##(2) visualization (graphs) for the applicable variables in the datase
barplot(Harry_Potter$Wand,
main = "Harry Potter Characters Wand Length",
ylab = "Wand Length",
xlab = "Names",
col = "#53131D",
border= "#DCB104",
space= 1.5,
ylim = c(0,20))
str(Harry_Potter)
## 'data.frame': 17 obs. of 5 variables:
## $ Name : chr "Harry Potter" "Hermione Granger" "Ron Weasley" "Draco Malfoy" ...
## $ House : chr "Gryffindor" "Gryffindor" "Gryffindor" "Slytherin" ...
## $ Ancestry: chr "Half-blood" "Muggle-born" "Pure-blood" "Pure-blood" ...
## $ Age : num 42 43 42 42 97 45 62 94 42 41 ...
## $ Wand : num 11 10.8 12 10 9.5 ...
##(3) a short conclusion at the end of your data report.
This data table has 17 rows and 5 columns. There are 5 variables: Name (character), House (character), Ancestry (character), Age, (Numeric), Wand(Numeric)