├── Chapter01
├── README.md
└── install_packages.r
├── Chapter02
├── Chapter_2.r
├── README.md
├── mtcars.csv
└── mtcars.xlsx
├── Chapter03
├── Chapter_3.r
├── README.md
└── highway_mpg.csv
├── Chapter04
├── Chapter_4.r
├── Iris.csv
└── README.md
├── Chapter05
├── Chapter_5.r
├── README.md
└── auto-mpg.csv
├── Chapter06
├── Chapter_6.r
├── README.md
├── bank-additional-full.csv
└── bank-additional-names.txt
├── Chapter07
├── AirQualityUCI.csv
├── AirQualityUCI.xlsx
├── Chapter_7.r
└── README.md
├── Chapter08
├── Chapter_8.r
├── README.md
└── longley.xlsx
├── Chapter09
├── Chapter_9.r
├── README.md
├── auto-mpg.csv
├── auto-mpg.data
├── auto-mpg.data-original
└── auto-mpg.names
├── Chapter10
├── Chapter_10.r
├── Glass.xlsx
├── README.md
├── glass.csv
├── glass.data
├── glass.names
├── glass.tag
└── glass.txt
├── Chapter11
└── README.md
├── LICENSE
└── README.md
/Chapter01/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter01/README.md
--------------------------------------------------------------------------------
/Chapter01/install_packages.r:
--------------------------------------------------------------------------------
1 | # Package management
2 |
3 | # Get a list of installed R packages
4 | installed.packages()
5 |
6 | # Update Packages
7 | update.packages()
8 |
9 | # Install one package
10 | install.packages("packagename")
11 |
12 | # Install mutiple packages
13 | install.packages("packagename1", "packagename2")
14 |
15 | # Remove packages
16 | remove.packages("packagename")
--------------------------------------------------------------------------------
/Chapter02/Chapter_2.r:
--------------------------------------------------------------------------------
1 | library(readr)
2 | read_csv("mtcars.csv")
3 |
4 |
5 |
6 | cars_data <- read_csv(readr_example("mtcars.csv"))
7 |
8 |
9 |
10 | read_csv("data.csv", skip = 2)
11 |
12 | read_csv("data.csv", col_names = FALSE)
13 |
14 | cars_data <- read_csv(readr_example("mtcars.csv"), col_types="ddddddddd")
15 |
16 |
17 | read_csv(file, col_names = TRUE, col_types = NULL,
18 | locale = default_locale(), na = c("", "NA"), quoted_na = TRUE,
19 | quote = "\"", comment = "", trim_ws = TRUE, skip = 0,
20 | n_max = Inf, guess_max = min(1000, n_max),
21 | progress = show_progress(), skip_empty_rows = TRUE)
22 |
23 | read_tsv("data.tsv")
24 |
25 | read_tsv(file, col_names = TRUE, col_types = NULL,
26 | locale = default_locale(), na = c("", "NA"), quoted_na = TRUE,
27 | quote = "\"", comment = "", trim_ws = TRUE, skip = 0,
28 | n_max = Inf, guess_max = min(1000, n_max),
29 | progress = show_progress(), skip_empty_rows = TRUE)
30 |
31 | read_delim("data.del", delim = "|")
32 |
33 | read_fwf("data.txt")
34 |
35 | read_fwf(data.txt, fwf_widths(c(10, 20, 18), c("ID", "Revenue", "Region")))
36 |
37 |
38 | read_table("table.csv")
39 |
40 | read_log("data.log")
41 |
42 |
43 | library(readxl)
44 |
45 | read_excel("data.xls")
46 |
47 | read_excel("data.xlsx")
48 | excel_sheets("data.xlsx")
49 |
50 | read_excel("data.xlsx", sheet= 1)
51 |
52 | read_excel("data.xlsx", sheet= "sheet1")
53 |
54 | library(jsonlite)
55 |
56 | json_data <-
57 | '[
58 | {"Name" : "John", "Age" : 42, "City" : "New York"},
59 | {"Name" : "Jane", "Age" : 41, "City" : "Paris"},
60 | {},
61 | {"Name" : "Bob", "City" : "London"}
62 | ]'
63 | df <- fromJSON(json_data)
64 | df
65 | library(httr)
66 | r <- GET("http://httpbin.org/get")
67 | r
68 | content(r, "raw")
69 |
70 | #Using rvest package for web scraping
71 | install.packages('rvest')
72 | library(rvest)
73 | url <- 'https://www.imdb.com/search/title?count=100&release_date=2017,2017&title_type=feature'
74 | #Reading html code from mentioned url
75 | webpage <- read_html(url)
76 | webpage
77 | rank_data_html <- html_nodes(webpage,'.text-primary')
78 | rank_data_html
79 | rank_data <- html_text(rank_data_html)> head(rank_data)[1] "1." "2." "3." "4." "5." "6."
80 |
81 |
82 | library(DBI)
83 |
84 | con <- dbConnect(RSQLite::SQLite(), dbname = ":memory:")
85 |
86 | dbListTables(con)
87 |
--------------------------------------------------------------------------------
/Chapter02/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter02/README.md
--------------------------------------------------------------------------------
/Chapter02/mtcars.csv:
--------------------------------------------------------------------------------
1 | ,mpg,cyl,disp,hp,drat,wt,qsec,vs,am,gear,carb
2 | Mazda RX4,21,6,160,110,3.9,2.62,16.46,0,1,4,4
3 | Mazda RX4 Wag,21,6,160,110,3.9,2.875,17.02,0,1,4,4
4 | Datsun 710,22.8,4,108,93,3.85,2.32,18.61,1,1,4,1
5 | Hornet 4 Drive,21.4,6,258,110,3.08,3.215,19.44,1,0,3,1
6 | Hornet Sportabout,18.7,8,360,175,3.15,3.44,17.02,0,0,3,2
7 | Valiant,18.1,6,225,105,2.76,3.46,20.22,1,0,3,1
8 | Duster 360,14.3,8,360,245,3.21,3.57,15.84,0,0,3,4
9 | Merc 240D,24.4,4,146.7,62,3.69,3.19,20,1,0,4,2
10 | Merc 230,22.8,4,140.8,95,3.92,3.15,22.9,1,0,4,2
11 | Merc 280,19.2,6,167.6,123,3.92,3.44,18.3,1,0,4,4
12 | Merc 280C,17.8,6,167.6,123,3.92,3.44,18.9,1,0,4,4
13 | Merc 450SE,16.4,8,275.8,180,3.07,4.07,17.4,0,0,3,3
14 | Merc 450SL,17.3,8,275.8,180,3.07,3.73,17.6,0,0,3,3
15 | Merc 450SLC,15.2,8,275.8,180,3.07,3.78,18,0,0,3,3
16 | Cadillac Fleetwood,10.4,8,472,205,2.93,5.25,17.98,0,0,3,4
17 | Lincoln Continental,10.4,8,460,215,3,5.424,17.82,0,0,3,4
18 | Chrysler Imperial,14.7,8,440,230,3.23,5.345,17.42,0,0,3,4
19 | Fiat 128,32.4,4,78.7,66,4.08,2.2,19.47,1,1,4,1
20 | Honda Civic,30.4,4,75.7,52,4.93,1.615,18.52,1,1,4,2
21 | Toyota Corolla,33.9,4,71.1,65,4.22,1.835,19.9,1,1,4,1
22 | Toyota Corona,21.5,4,120.1,97,3.7,2.465,20.01,1,0,3,1
23 | Dodge Challenger,15.5,8,318,150,2.76,3.52,16.87,0,0,3,2
24 | AMC Javelin,15.2,8,304,150,3.15,3.435,17.3,0,0,3,2
25 | Camaro Z28,13.3,8,350,245,3.73,3.84,15.41,0,0,3,4
26 | Pontiac Firebird,19.2,8,400,175,3.08,3.845,17.05,0,0,3,2
27 | Fiat X1-9,27.3,4,79,66,4.08,1.935,18.9,1,1,4,1
28 | Porsche 914-2,26,4,120.3,91,4.43,2.14,16.7,0,1,5,2
29 | Lotus Europa,30.4,4,95.1,113,3.77,1.513,16.9,1,1,5,2
30 | Ford Pantera L,15.8,8,351,264,4.22,3.17,14.5,0,1,5,4
31 | Ferrari Dino,19.7,6,145,175,3.62,2.77,15.5,0,1,5,6
32 | Maserati Bora,15,8,301,335,3.54,3.57,14.6,0,1,5,8
33 | Volvo 142E,21.4,4,121,109,4.11,2.78,18.6,1,1,4,2
34 |
--------------------------------------------------------------------------------
/Chapter02/mtcars.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter02/mtcars.xlsx
--------------------------------------------------------------------------------
/Chapter03/Chapter_3.r:
--------------------------------------------------------------------------------
1 | # Reading the dataset
2 | mpg <-read.csv("highway_mpg.csv", stringsAsFactors = FALSE)
3 | View(mpg)
4 | str(mpg)
5 |
6 |
7 | install.packages("tidyr")
8 | library(tidyr)
9 | mpg2 <- mpg %>% gather(mpg, "Year of Establishment", "year", -manufacturer)
10 | View(mpg2)
11 | mpg4<- unite_(mpg, "FuelEfficiency", c("drv","fl"))
12 | View(mpg4)
13 | mpg3<- mpg4 %>% separate(FuelEfficiency, c("drv", "f1"))
14 | View(mpg3)
15 | install.packages("dplyr")
16 | library(dplyr)
17 | mpgMutate <- mpg %>% mutate(nv=cyl+displ)
18 | View(mpgMutate)
19 |
20 | mpgGroupBy <- mpg %>%group_by(model)
21 | View(mpgGroupBy)
22 | mpgSummarize<- mpg %>% group_by(displ) %>% summarize(avg_displ=mean(displ))
23 | mpgSummarize
24 | View(mpgSummarize)
25 | mpgArrange<- mpg %>%arrange(mpg$year)
26 | View(mpgArrange)
27 | glimpse(mpg)
28 | mpgSubset <- select(mpg, manufacturer, model)
29 | View(mpgSubset)
30 | mpgFilter <- mpg %>% filter(year>2000)
31 | View(mpgFilter)
32 | library(lubridate) # work with dates
33 | library(dplyr) # data manipulation (filter, summarize, mutate)
34 | library(ggplot2) # graphics
35 | library(gridExtra) # tile several plots next to each other
36 |
37 | library(scales)
38 |
39 | # Create a group_by object using the year column
40 | mpg.grp.year <- group_by(mpg, year) # column name to group by
41 | class(mpg.grp.year)
42 |
43 | # how many measurements were made each year?
44 | tally(mpg.grp.year)
45 | summarize(mpg.grp.year,
46 | + mean(displ) # calculate the annual mean of displ
47 | + )
48 |
49 | summarize(mpg.grp.year,
50 | + mean(displ, na.rm = TRUE)
51 | + )
52 |
53 | mpg %>%
54 | + group_by(year) %>% # group by year
55 | + tally() # count measurements per year
56 |
57 |
58 | year.sum <- mpg %>%
59 | + group_by(year) %>% # group by year
60 | + summarize(mean(displ, na.rm=TRUE))
61 | > year.sum
62 |
63 | str(year.sum)
64 |
65 |
66 | qplot(mpg.grp.year$displ, mpg.grp.year$year,xlab = "Displacement", ylab = "year",main = "Manipulating Grouped Data")
67 |
68 |
69 |
--------------------------------------------------------------------------------
/Chapter03/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter03/README.md
--------------------------------------------------------------------------------
/Chapter03/highway_mpg.csv:
--------------------------------------------------------------------------------
1 | manufacturer,model,displ,year,cyl,trans,drv,cty,hwy,fl,class
2 | audi,a4,1.8,1999,4,auto(l5),f,18,29,p,compact
3 | audi,a4,1.8,1999,4,manual(m5),f,21,29,p,compact
4 | audi,a4,2,2008,4,manual(m6),f,20,31,p,compact
5 | audi,a4,2,2008,4,auto(av),f,21,30,p,compact
6 | audi,a4,2.8,1999,6,auto(l5),f,16,26,p,compact
7 | audi,a4,2.8,1999,6,manual(m5),f,18,26,p,compact
8 | audi,a4,3.1,2008,6,auto(av),f,18,27,p,compact
9 | audi,a4 quattro,1.8,1999,4,manual(m5),4,18,26,p,compact
10 | audi,a4 quattro,1.8,1999,4,auto(l5),4,16,25,p,compact
11 | audi,a4 quattro,2,2008,4,manual(m6),4,20,28,p,compact
12 | audi,a4 quattro,2,2008,4,auto(s6),4,19,27,p,compact
13 | audi,a4 quattro,2.8,1999,6,auto(l5),4,15,25,p,compact
14 | audi,a4 quattro,2.8,1999,6,manual(m5),4,17,25,p,compact
15 | audi,a4 quattro,3.1,2008,6,auto(s6),4,17,25,p,compact
16 | audi,a4 quattro,3.1,2008,6,manual(m6),4,15,25,p,compact
17 | audi,a6 quattro,2.8,1999,6,auto(l5),4,15,24,p,midsize
18 | audi,a6 quattro,3.1,2008,6,auto(s6),4,17,25,p,midsize
19 | audi,a6 quattro,4.2,2008,8,auto(s6),4,16,23,p,midsize
20 | chevrolet,c1500 suburban 2wd,5.3,2008,8,auto(l4),r,14,20,r,suv
21 | chevrolet,c1500 suburban 2wd,5.3,2008,8,auto(l4),r,11,15,e,suv
22 | chevrolet,c1500 suburban 2wd,5.3,2008,8,auto(l4),r,14,20,r,suv
23 | chevrolet,c1500 suburban 2wd,5.7,1999,8,auto(l4),r,13,17,r,suv
24 | chevrolet,c1500 suburban 2wd,6,2008,8,auto(l4),r,12,17,r,suv
25 | chevrolet,corvette,5.7,1999,8,manual(m6),r,16,26,p,2seater
26 | chevrolet,corvette,5.7,1999,8,auto(l4),r,15,23,p,2seater
27 | chevrolet,corvette,6.2,2008,8,manual(m6),r,16,26,p,2seater
28 | chevrolet,corvette,6.2,2008,8,auto(s6),r,15,25,p,2seater
29 | chevrolet,corvette,7,2008,8,manual(m6),r,15,24,p,2seater
30 | chevrolet,k1500 tahoe 4wd,5.3,2008,8,auto(l4),4,14,19,r,suv
31 | chevrolet,k1500 tahoe 4wd,5.3,2008,8,auto(l4),4,11,14,e,suv
32 | chevrolet,k1500 tahoe 4wd,5.7,1999,8,auto(l4),4,11,15,r,suv
33 | chevrolet,k1500 tahoe 4wd,6.5,1999,8,auto(l4),4,14,17,d,suv
34 | chevrolet,malibu,2.4,1999,4,auto(l4),f,19,27,r,midsize
35 | chevrolet,malibu,2.4,2008,4,auto(l4),f,22,30,r,midsize
36 | chevrolet,malibu,3.1,1999,6,auto(l4),f,18,26,r,midsize
37 | chevrolet,malibu,3.5,2008,6,auto(l4),f,18,29,r,midsize
38 | chevrolet,malibu,3.6,2008,6,auto(s6),f,17,26,r,midsize
39 | dodge,caravan 2wd,2.4,1999,4,auto(l3),f,18,24,r,minivan
40 | dodge,caravan 2wd,3,1999,6,auto(l4),f,17,24,r,minivan
41 | dodge,caravan 2wd,3.3,1999,6,auto(l4),f,16,22,r,minivan
42 | dodge,caravan 2wd,3.3,1999,6,auto(l4),f,16,22,r,minivan
43 | dodge,caravan 2wd,3.3,2008,6,auto(l4),f,17,24,r,minivan
44 | dodge,caravan 2wd,3.3,2008,6,auto(l4),f,17,24,r,minivan
45 | dodge,caravan 2wd,3.3,2008,6,auto(l4),f,11,17,e,minivan
46 | dodge,caravan 2wd,3.8,1999,6,auto(l4),f,15,22,r,minivan
47 | dodge,caravan 2wd,3.8,1999,6,auto(l4),f,15,21,r,minivan
48 | dodge,caravan 2wd,3.8,2008,6,auto(l6),f,16,23,r,minivan
49 | dodge,caravan 2wd,4,2008,6,auto(l6),f,16,23,r,minivan
50 | dodge,dakota pickup 4wd,3.7,2008,6,manual(m6),4,15,19,r,pickup
51 | dodge,dakota pickup 4wd,3.7,2008,6,auto(l4),4,14,18,r,pickup
52 | dodge,dakota pickup 4wd,3.9,1999,6,auto(l4),4,13,17,r,pickup
53 | dodge,dakota pickup 4wd,3.9,1999,6,manual(m5),4,14,17,r,pickup
54 | dodge,dakota pickup 4wd,4.7,2008,8,auto(l5),4,14,19,r,pickup
55 | dodge,dakota pickup 4wd,4.7,2008,8,auto(l5),4,14,19,r,pickup
56 | dodge,dakota pickup 4wd,4.7,2008,8,auto(l5),4,9,12,e,pickup
57 | dodge,dakota pickup 4wd,5.2,1999,8,manual(m5),4,11,17,r,pickup
58 | dodge,dakota pickup 4wd,5.2,1999,8,auto(l4),4,11,15,r,pickup
59 | dodge,durango 4wd,3.9,1999,6,auto(l4),4,13,17,r,suv
60 | dodge,durango 4wd,4.7,2008,8,auto(l5),4,13,17,r,suv
61 | dodge,durango 4wd,4.7,2008,8,auto(l5),4,9,12,e,suv
62 | dodge,durango 4wd,4.7,2008,8,auto(l5),4,13,17,r,suv
63 | dodge,durango 4wd,5.2,1999,8,auto(l4),4,11,16,r,suv
64 | dodge,durango 4wd,5.7,2008,8,auto(l5),4,13,18,r,suv
65 | dodge,durango 4wd,5.9,1999,8,auto(l4),4,11,15,r,suv
66 | dodge,ram 1500 pickup 4wd,4.7,2008,8,manual(m6),4,12,16,r,pickup
67 | dodge,ram 1500 pickup 4wd,4.7,2008,8,auto(l5),4,9,12,e,pickup
68 | dodge,ram 1500 pickup 4wd,4.7,2008,8,auto(l5),4,13,17,r,pickup
69 | dodge,ram 1500 pickup 4wd,4.7,2008,8,auto(l5),4,13,17,r,pickup
70 | dodge,ram 1500 pickup 4wd,4.7,2008,8,manual(m6),4,12,16,r,pickup
71 | dodge,ram 1500 pickup 4wd,4.7,2008,8,manual(m6),4,9,12,e,pickup
72 | dodge,ram 1500 pickup 4wd,5.2,1999,8,auto(l4),4,11,15,r,pickup
73 | dodge,ram 1500 pickup 4wd,5.2,1999,8,manual(m5),4,11,16,r,pickup
74 | dodge,ram 1500 pickup 4wd,5.7,2008,8,auto(l5),4,13,17,r,pickup
75 | dodge,ram 1500 pickup 4wd,5.9,1999,8,auto(l4),4,11,15,r,pickup
76 | ford,expedition 2wd,4.6,1999,8,auto(l4),r,11,17,r,suv
77 | ford,expedition 2wd,5.4,1999,8,auto(l4),r,11,17,r,suv
78 | ford,expedition 2wd,5.4,2008,8,auto(l6),r,12,18,r,suv
79 | ford,explorer 4wd,4,1999,6,auto(l5),4,14,17,r,suv
80 | ford,explorer 4wd,4,1999,6,manual(m5),4,15,19,r,suv
81 | ford,explorer 4wd,4,1999,6,auto(l5),4,14,17,r,suv
82 | ford,explorer 4wd,4,2008,6,auto(l5),4,13,19,r,suv
83 | ford,explorer 4wd,4.6,2008,8,auto(l6),4,13,19,r,suv
84 | ford,explorer 4wd,5,1999,8,auto(l4),4,13,17,r,suv
85 | ford,f150 pickup 4wd,4.2,1999,6,auto(l4),4,14,17,r,pickup
86 | ford,f150 pickup 4wd,4.2,1999,6,manual(m5),4,14,17,r,pickup
87 | ford,f150 pickup 4wd,4.6,1999,8,manual(m5),4,13,16,r,pickup
88 | ford,f150 pickup 4wd,4.6,1999,8,auto(l4),4,13,16,r,pickup
89 | ford,f150 pickup 4wd,4.6,2008,8,auto(l4),4,13,17,r,pickup
90 | ford,f150 pickup 4wd,5.4,1999,8,auto(l4),4,11,15,r,pickup
91 | ford,f150 pickup 4wd,5.4,2008,8,auto(l4),4,13,17,r,pickup
92 | ford,mustang,3.8,1999,6,manual(m5),r,18,26,r,subcompact
93 | ford,mustang,3.8,1999,6,auto(l4),r,18,25,r,subcompact
94 | ford,mustang,4,2008,6,manual(m5),r,17,26,r,subcompact
95 | ford,mustang,4,2008,6,auto(l5),r,16,24,r,subcompact
96 | ford,mustang,4.6,1999,8,auto(l4),r,15,21,r,subcompact
97 | ford,mustang,4.6,1999,8,manual(m5),r,15,22,r,subcompact
98 | ford,mustang,4.6,2008,8,manual(m5),r,15,23,r,subcompact
99 | ford,mustang,4.6,2008,8,auto(l5),r,15,22,r,subcompact
100 | ford,mustang,5.4,2008,8,manual(m6),r,14,20,p,subcompact
101 | honda,civic,1.6,1999,4,manual(m5),f,28,33,r,subcompact
102 | honda,civic,1.6,1999,4,auto(l4),f,24,32,r,subcompact
103 | honda,civic,1.6,1999,4,manual(m5),f,25,32,r,subcompact
104 | honda,civic,1.6,1999,4,manual(m5),f,23,29,p,subcompact
105 | honda,civic,1.6,1999,4,auto(l4),f,24,32,r,subcompact
106 | honda,civic,1.8,2008,4,manual(m5),f,26,34,r,subcompact
107 | honda,civic,1.8,2008,4,auto(l5),f,25,36,r,subcompact
108 | honda,civic,1.8,2008,4,auto(l5),f,24,36,c,subcompact
109 | honda,civic,2,2008,4,manual(m6),f,21,29,p,subcompact
110 | hyundai,sonata,2.4,1999,4,auto(l4),f,18,26,r,midsize
111 | hyundai,sonata,2.4,1999,4,manual(m5),f,18,27,r,midsize
112 | hyundai,sonata,2.4,2008,4,auto(l4),f,21,30,r,midsize
113 | hyundai,sonata,2.4,2008,4,manual(m5),f,21,31,r,midsize
114 | hyundai,sonata,2.5,1999,6,auto(l4),f,18,26,r,midsize
115 | hyundai,sonata,2.5,1999,6,manual(m5),f,18,26,r,midsize
116 | hyundai,sonata,3.3,2008,6,auto(l5),f,19,28,r,midsize
117 | hyundai,tiburon,2,1999,4,auto(l4),f,19,26,r,subcompact
118 | hyundai,tiburon,2,1999,4,manual(m5),f,19,29,r,subcompact
119 | hyundai,tiburon,2,2008,4,manual(m5),f,20,28,r,subcompact
120 | hyundai,tiburon,2,2008,4,auto(l4),f,20,27,r,subcompact
121 | hyundai,tiburon,2.7,2008,6,auto(l4),f,17,24,r,subcompact
122 | hyundai,tiburon,2.7,2008,6,manual(m6),f,16,24,r,subcompact
123 | hyundai,tiburon,2.7,2008,6,manual(m5),f,17,24,r,subcompact
124 | jeep,grand cherokee 4wd,3,2008,6,auto(l5),4,17,22,d,suv
125 | jeep,grand cherokee 4wd,3.7,2008,6,auto(l5),4,15,19,r,suv
126 | jeep,grand cherokee 4wd,4,1999,6,auto(l4),4,15,20,r,suv
127 | jeep,grand cherokee 4wd,4.7,1999,8,auto(l4),4,14,17,r,suv
128 | jeep,grand cherokee 4wd,4.7,2008,8,auto(l5),4,9,12,e,suv
129 | jeep,grand cherokee 4wd,4.7,2008,8,auto(l5),4,14,19,r,suv
130 | jeep,grand cherokee 4wd,5.7,2008,8,auto(l5),4,13,18,r,suv
131 | jeep,grand cherokee 4wd,6.1,2008,8,auto(l5),4,11,14,p,suv
132 | land rover,range rover,4,1999,8,auto(l4),4,11,15,p,suv
133 | land rover,range rover,4.2,2008,8,auto(s6),4,12,18,r,suv
134 | land rover,range rover,4.4,2008,8,auto(s6),4,12,18,r,suv
135 | land rover,range rover,4.6,1999,8,auto(l4),4,11,15,p,suv
136 | lincoln,navigator 2wd,5.4,1999,8,auto(l4),r,11,17,r,suv
137 | lincoln,navigator 2wd,5.4,1999,8,auto(l4),r,11,16,p,suv
138 | lincoln,navigator 2wd,5.4,2008,8,auto(l6),r,12,18,r,suv
139 | mercury,mountaineer 4wd,4,1999,6,auto(l5),4,14,17,r,suv
140 | mercury,mountaineer 4wd,4,2008,6,auto(l5),4,13,19,r,suv
141 | mercury,mountaineer 4wd,4.6,2008,8,auto(l6),4,13,19,r,suv
142 | mercury,mountaineer 4wd,5,1999,8,auto(l4),4,13,17,r,suv
143 | nissan,altima,2.4,1999,4,manual(m5),f,21,29,r,compact
144 | nissan,altima,2.4,1999,4,auto(l4),f,19,27,r,compact
145 | nissan,altima,2.5,2008,4,auto(av),f,23,31,r,midsize
146 | nissan,altima,2.5,2008,4,manual(m6),f,23,32,r,midsize
147 | nissan,altima,3.5,2008,6,manual(m6),f,19,27,p,midsize
148 | nissan,altima,3.5,2008,6,auto(av),f,19,26,p,midsize
149 | nissan,maxima,3,1999,6,auto(l4),f,18,26,r,midsize
150 | nissan,maxima,3,1999,6,manual(m5),f,19,25,r,midsize
151 | nissan,maxima,3.5,2008,6,auto(av),f,19,25,p,midsize
152 | nissan,pathfinder 4wd,3.3,1999,6,auto(l4),4,14,17,r,suv
153 | nissan,pathfinder 4wd,3.3,1999,6,manual(m5),4,15,17,r,suv
154 | nissan,pathfinder 4wd,4,2008,6,auto(l5),4,14,20,p,suv
155 | nissan,pathfinder 4wd,5.6,2008,8,auto(s5),4,12,18,p,suv
156 | pontiac,grand prix,3.1,1999,6,auto(l4),f,18,26,r,midsize
157 | pontiac,grand prix,3.8,1999,6,auto(l4),f,16,26,p,midsize
158 | pontiac,grand prix,3.8,1999,6,auto(l4),f,17,27,r,midsize
159 | pontiac,grand prix,3.8,2008,6,auto(l4),f,18,28,r,midsize
160 | pontiac,grand prix,5.3,2008,8,auto(s4),f,16,25,p,midsize
161 | subaru,forester awd,2.5,1999,4,manual(m5),4,18,25,r,suv
162 | subaru,forester awd,2.5,1999,4,auto(l4),4,18,24,r,suv
163 | subaru,forester awd,2.5,2008,4,manual(m5),4,20,27,r,suv
164 | subaru,forester awd,2.5,2008,4,manual(m5),4,19,25,p,suv
165 | subaru,forester awd,2.5,2008,4,auto(l4),4,20,26,r,suv
166 | subaru,forester awd,2.5,2008,4,auto(l4),4,18,23,p,suv
167 | subaru,impreza awd,2.2,1999,4,auto(l4),4,21,26,r,subcompact
168 | subaru,impreza awd,2.2,1999,4,manual(m5),4,19,26,r,subcompact
169 | subaru,impreza awd,2.5,1999,4,manual(m5),4,19,26,r,subcompact
170 | subaru,impreza awd,2.5,1999,4,auto(l4),4,19,26,r,subcompact
171 | subaru,impreza awd,2.5,2008,4,auto(s4),4,20,25,p,compact
172 | subaru,impreza awd,2.5,2008,4,auto(s4),4,20,27,r,compact
173 | subaru,impreza awd,2.5,2008,4,manual(m5),4,19,25,p,compact
174 | subaru,impreza awd,2.5,2008,4,manual(m5),4,20,27,r,compact
175 | toyota,4runner 4wd,2.7,1999,4,manual(m5),4,15,20,r,suv
176 | toyota,4runner 4wd,2.7,1999,4,auto(l4),4,16,20,r,suv
177 | toyota,4runner 4wd,3.4,1999,6,auto(l4),4,15,19,r,suv
178 | toyota,4runner 4wd,3.4,1999,6,manual(m5),4,15,17,r,suv
179 | toyota,4runner 4wd,4,2008,6,auto(l5),4,16,20,r,suv
180 | toyota,4runner 4wd,4.7,2008,8,auto(l5),4,14,17,r,suv
181 | toyota,camry,2.2,1999,4,manual(m5),f,21,29,r,midsize
182 | toyota,camry,2.2,1999,4,auto(l4),f,21,27,r,midsize
183 | toyota,camry,2.4,2008,4,manual(m5),f,21,31,r,midsize
184 | toyota,camry,2.4,2008,4,auto(l5),f,21,31,r,midsize
185 | toyota,camry,3,1999,6,auto(l4),f,18,26,r,midsize
186 | toyota,camry,3,1999,6,manual(m5),f,18,26,r,midsize
187 | toyota,camry,3.5,2008,6,auto(s6),f,19,28,r,midsize
188 | toyota,camry solara,2.2,1999,4,auto(l4),f,21,27,r,compact
189 | toyota,camry solara,2.2,1999,4,manual(m5),f,21,29,r,compact
190 | toyota,camry solara,2.4,2008,4,manual(m5),f,21,31,r,compact
191 | toyota,camry solara,2.4,2008,4,auto(s5),f,22,31,r,compact
192 | toyota,camry solara,3,1999,6,auto(l4),f,18,26,r,compact
193 | toyota,camry solara,3,1999,6,manual(m5),f,18,26,r,compact
194 | toyota,camry solara,3.3,2008,6,auto(s5),f,18,27,r,compact
195 | toyota,corolla,1.8,1999,4,auto(l3),f,24,30,r,compact
196 | toyota,corolla,1.8,1999,4,auto(l4),f,24,33,r,compact
197 | toyota,corolla,1.8,1999,4,manual(m5),f,26,35,r,compact
198 | toyota,corolla,1.8,2008,4,manual(m5),f,28,37,r,compact
199 | toyota,corolla,1.8,2008,4,auto(l4),f,26,35,r,compact
200 | toyota,land cruiser wagon 4wd,4.7,1999,8,auto(l4),4,11,15,r,suv
201 | toyota,land cruiser wagon 4wd,5.7,2008,8,auto(s6),4,13,18,r,suv
202 | toyota,toyota tacoma 4wd,2.7,1999,4,manual(m5),4,15,20,r,pickup
203 | toyota,toyota tacoma 4wd,2.7,1999,4,auto(l4),4,16,20,r,pickup
204 | toyota,toyota tacoma 4wd,2.7,2008,4,manual(m5),4,17,22,r,pickup
205 | toyota,toyota tacoma 4wd,3.4,1999,6,manual(m5),4,15,17,r,pickup
206 | toyota,toyota tacoma 4wd,3.4,1999,6,auto(l4),4,15,19,r,pickup
207 | toyota,toyota tacoma 4wd,4,2008,6,manual(m6),4,15,18,r,pickup
208 | toyota,toyota tacoma 4wd,4,2008,6,auto(l5),4,16,20,r,pickup
209 | volkswagen,gti,2,1999,4,manual(m5),f,21,29,r,compact
210 | volkswagen,gti,2,1999,4,auto(l4),f,19,26,r,compact
211 | volkswagen,gti,2,2008,4,manual(m6),f,21,29,p,compact
212 | volkswagen,gti,2,2008,4,auto(s6),f,22,29,p,compact
213 | volkswagen,gti,2.8,1999,6,manual(m5),f,17,24,r,compact
214 | volkswagen,jetta,1.9,1999,4,manual(m5),f,33,44,d,compact
215 | volkswagen,jetta,2,1999,4,manual(m5),f,21,29,r,compact
216 | volkswagen,jetta,2,1999,4,auto(l4),f,19,26,r,compact
217 | volkswagen,jetta,2,2008,4,auto(s6),f,22,29,p,compact
218 | volkswagen,jetta,2,2008,4,manual(m6),f,21,29,p,compact
219 | volkswagen,jetta,2.5,2008,5,auto(s6),f,21,29,r,compact
220 | volkswagen,jetta,2.5,2008,5,manual(m5),f,21,29,r,compact
221 | volkswagen,jetta,2.8,1999,6,auto(l4),f,16,23,r,compact
222 | volkswagen,jetta,2.8,1999,6,manual(m5),f,17,24,r,compact
223 | volkswagen,new beetle,1.9,1999,4,manual(m5),f,35,44,d,subcompact
224 | volkswagen,new beetle,1.9,1999,4,auto(l4),f,29,41,d,subcompact
225 | volkswagen,new beetle,2,1999,4,manual(m5),f,21,29,r,subcompact
226 | volkswagen,new beetle,2,1999,4,auto(l4),f,19,26,r,subcompact
227 | volkswagen,new beetle,2.5,2008,5,manual(m5),f,20,28,r,subcompact
228 | volkswagen,new beetle,2.5,2008,5,auto(s6),f,20,29,r,subcompact
229 | volkswagen,passat,1.8,1999,4,manual(m5),f,21,29,p,midsize
230 | volkswagen,passat,1.8,1999,4,auto(l5),f,18,29,p,midsize
231 | volkswagen,passat,2,2008,4,auto(s6),f,19,28,p,midsize
232 | volkswagen,passat,2,2008,4,manual(m6),f,21,29,p,midsize
233 | volkswagen,passat,2.8,1999,6,auto(l5),f,16,26,p,midsize
234 | volkswagen,passat,2.8,1999,6,manual(m5),f,18,26,p,midsize
235 | volkswagen,passat,3.6,2008,6,auto(s6),f,17,26,p,midsize
236 |
--------------------------------------------------------------------------------
/Chapter04/Chapter_4.r:
--------------------------------------------------------------------------------
1 | #Installing package
2 | install.packages("ggplot2")
3 | library('ggplot2')
4 | #Scattered Plots
5 | library(readr)
6 | options(repr.plot.width = 6, repr.plot.height = 6)
7 | Iris <- read.csv('Iris.csv')
8 | class(Iris)
9 | #[1] "data.frame"
10 | View(Iris)
11 | head(Iris)
12 |
13 | summary(Iris)
14 |
15 |
16 | ggplot(data=Iris,aes(x=SepalWidthCm, y=SepalLengthCm)) + geom_point() + theme_minimal()
17 | ggplot(data=Iris,aes(x=SepalWidthCm, y=SepalLengthCm,color=Species)) + geom_point() + theme_minimal()
18 | #Creating histograms
19 | hist(iris$Sepal.Width, freq=NULL, density=NULL, breaks=12,
20 | xlab="Sepal Width", ylab="Frequency", main="Histogram of Sepal Width")
21 |
22 | library(ggplot2)
23 |
24 |
25 | histogram <- ggplot(data=iris, aes(x=Sepal.Width))
26 | histogram + geom_histogram(binwidth=0.2, color="black", aes(fill=Species)) +
27 | xlab("Sepal Width") + ylab("Frequency") + ggtitle("Histogram of Sepal Width")
28 | library(ggplot2)
29 |
30 |
31 | #Density Plots
32 | ggplot(iris) +
33 | geom_density(aes(x = Petal.Width, fill = Species), alpha=0.25)
34 |
35 | #Probability Plots
36 | p1 <- ggplot(data = Iris, aes(PetalWidthCm)) +
37 | stat_function(fun = dnorm, n = 101, args = list(mean = 0, sd = 1)) + ylab("") +
38 | scale_y_continuous(breaks = NULL)
39 | p1
40 |
41 | p2 <- ggplot(data = Iris, aes(PetalWidthCm)) +
42 | stat_function(fun = pnorm, n = 101, args = list(mean = 0, sd = 1)) + ylab("") +
43 | scale_y_continuous(breaks = NULL)
44 | p2
45 |
46 | p4 <- ggplot(data = Iris, aes(PetalWidthCm)) +
47 | stat_function(fun = rnorm, n = 101, args = list(mean = 0, sd = 1)) + ylab("") +
48 | scale_y_continuous(breaks = NULL)
49 | p4
50 |
51 | #Box plots
52 |
53 | ggplot(data=Iris,aes(x=Species, y=SepalLengthCm,color=Species)) + geom_boxplot() +theme_minimal()+
54 | theme(legend.position="none")
55 |
56 | ggplot(data=Iris,aes(x=Species, y=SepalLengthCm,color=Species)) + geom_violin() +theme_minimal()+
57 | theme(legend.position="none")
58 |
59 | #Residual Plots
60 | ggplot(lm(Sepal.Length~Sepal.Width, data=iris)) + geom_point(aes(x=.fitted, y=.resid))
61 |
62 |
63 |
--------------------------------------------------------------------------------
/Chapter04/Iris.csv:
--------------------------------------------------------------------------------
1 | Id,SepalLengthCm,SepalWidthCm,PetalLengthCm,PetalWidthCm,Species
2 | 1,5.1,3.5,1.4,0.2,Iris-setosa
3 | 2,4.9,3.0,1.4,0.2,Iris-setosa
4 | 3,4.7,3.2,1.3,0.2,Iris-setosa
5 | 4,4.6,3.1,1.5,0.2,Iris-setosa
6 | 5,5.0,3.6,1.4,0.2,Iris-setosa
7 | 6,5.4,3.9,1.7,0.4,Iris-setosa
8 | 7,4.6,3.4,1.4,0.3,Iris-setosa
9 | 8,5.0,3.4,1.5,0.2,Iris-setosa
10 | 9,4.4,2.9,1.4,0.2,Iris-setosa
11 | 10,4.9,3.1,1.5,0.1,Iris-setosa
12 | 11,5.4,3.7,1.5,0.2,Iris-setosa
13 | 12,4.8,3.4,1.6,0.2,Iris-setosa
14 | 13,4.8,3.0,1.4,0.1,Iris-setosa
15 | 14,4.3,3.0,1.1,0.1,Iris-setosa
16 | 15,5.8,4.0,1.2,0.2,Iris-setosa
17 | 16,5.7,4.4,1.5,0.4,Iris-setosa
18 | 17,5.4,3.9,1.3,0.4,Iris-setosa
19 | 18,5.1,3.5,1.4,0.3,Iris-setosa
20 | 19,5.7,3.8,1.7,0.3,Iris-setosa
21 | 20,5.1,3.8,1.5,0.3,Iris-setosa
22 | 21,5.4,3.4,1.7,0.2,Iris-setosa
23 | 22,5.1,3.7,1.5,0.4,Iris-setosa
24 | 23,4.6,3.6,1.0,0.2,Iris-setosa
25 | 24,5.1,3.3,1.7,0.5,Iris-setosa
26 | 25,4.8,3.4,1.9,0.2,Iris-setosa
27 | 26,5.0,3.0,1.6,0.2,Iris-setosa
28 | 27,5.0,3.4,1.6,0.4,Iris-setosa
29 | 28,5.2,3.5,1.5,0.2,Iris-setosa
30 | 29,5.2,3.4,1.4,0.2,Iris-setosa
31 | 30,4.7,3.2,1.6,0.2,Iris-setosa
32 | 31,4.8,3.1,1.6,0.2,Iris-setosa
33 | 32,5.4,3.4,1.5,0.4,Iris-setosa
34 | 33,5.2,4.1,1.5,0.1,Iris-setosa
35 | 34,5.5,4.2,1.4,0.2,Iris-setosa
36 | 35,4.9,3.1,1.5,0.1,Iris-setosa
37 | 36,5.0,3.2,1.2,0.2,Iris-setosa
38 | 37,5.5,3.5,1.3,0.2,Iris-setosa
39 | 38,4.9,3.1,1.5,0.1,Iris-setosa
40 | 39,4.4,3.0,1.3,0.2,Iris-setosa
41 | 40,5.1,3.4,1.5,0.2,Iris-setosa
42 | 41,5.0,3.5,1.3,0.3,Iris-setosa
43 | 42,4.5,2.3,1.3,0.3,Iris-setosa
44 | 43,4.4,3.2,1.3,0.2,Iris-setosa
45 | 44,5.0,3.5,1.6,0.6,Iris-setosa
46 | 45,5.1,3.8,1.9,0.4,Iris-setosa
47 | 46,4.8,3.0,1.4,0.3,Iris-setosa
48 | 47,5.1,3.8,1.6,0.2,Iris-setosa
49 | 48,4.6,3.2,1.4,0.2,Iris-setosa
50 | 49,5.3,3.7,1.5,0.2,Iris-setosa
51 | 50,5.0,3.3,1.4,0.2,Iris-setosa
52 | 51,7.0,3.2,4.7,1.4,Iris-versicolor
53 | 52,6.4,3.2,4.5,1.5,Iris-versicolor
54 | 53,6.9,3.1,4.9,1.5,Iris-versicolor
55 | 54,5.5,2.3,4.0,1.3,Iris-versicolor
56 | 55,6.5,2.8,4.6,1.5,Iris-versicolor
57 | 56,5.7,2.8,4.5,1.3,Iris-versicolor
58 | 57,6.3,3.3,4.7,1.6,Iris-versicolor
59 | 58,4.9,2.4,3.3,1.0,Iris-versicolor
60 | 59,6.6,2.9,4.6,1.3,Iris-versicolor
61 | 60,5.2,2.7,3.9,1.4,Iris-versicolor
62 | 61,5.0,2.0,3.5,1.0,Iris-versicolor
63 | 62,5.9,3.0,4.2,1.5,Iris-versicolor
64 | 63,6.0,2.2,4.0,1.0,Iris-versicolor
65 | 64,6.1,2.9,4.7,1.4,Iris-versicolor
66 | 65,5.6,2.9,3.6,1.3,Iris-versicolor
67 | 66,6.7,3.1,4.4,1.4,Iris-versicolor
68 | 67,5.6,3.0,4.5,1.5,Iris-versicolor
69 | 68,5.8,2.7,4.1,1.0,Iris-versicolor
70 | 69,6.2,2.2,4.5,1.5,Iris-versicolor
71 | 70,5.6,2.5,3.9,1.1,Iris-versicolor
72 | 71,5.9,3.2,4.8,1.8,Iris-versicolor
73 | 72,6.1,2.8,4.0,1.3,Iris-versicolor
74 | 73,6.3,2.5,4.9,1.5,Iris-versicolor
75 | 74,6.1,2.8,4.7,1.2,Iris-versicolor
76 | 75,6.4,2.9,4.3,1.3,Iris-versicolor
77 | 76,6.6,3.0,4.4,1.4,Iris-versicolor
78 | 77,6.8,2.8,4.8,1.4,Iris-versicolor
79 | 78,6.7,3.0,5.0,1.7,Iris-versicolor
80 | 79,6.0,2.9,4.5,1.5,Iris-versicolor
81 | 80,5.7,2.6,3.5,1.0,Iris-versicolor
82 | 81,5.5,2.4,3.8,1.1,Iris-versicolor
83 | 82,5.5,2.4,3.7,1.0,Iris-versicolor
84 | 83,5.8,2.7,3.9,1.2,Iris-versicolor
85 | 84,6.0,2.7,5.1,1.6,Iris-versicolor
86 | 85,5.4,3.0,4.5,1.5,Iris-versicolor
87 | 86,6.0,3.4,4.5,1.6,Iris-versicolor
88 | 87,6.7,3.1,4.7,1.5,Iris-versicolor
89 | 88,6.3,2.3,4.4,1.3,Iris-versicolor
90 | 89,5.6,3.0,4.1,1.3,Iris-versicolor
91 | 90,5.5,2.5,4.0,1.3,Iris-versicolor
92 | 91,5.5,2.6,4.4,1.2,Iris-versicolor
93 | 92,6.1,3.0,4.6,1.4,Iris-versicolor
94 | 93,5.8,2.6,4.0,1.2,Iris-versicolor
95 | 94,5.0,2.3,3.3,1.0,Iris-versicolor
96 | 95,5.6,2.7,4.2,1.3,Iris-versicolor
97 | 96,5.7,3.0,4.2,1.2,Iris-versicolor
98 | 97,5.7,2.9,4.2,1.3,Iris-versicolor
99 | 98,6.2,2.9,4.3,1.3,Iris-versicolor
100 | 99,5.1,2.5,3.0,1.1,Iris-versicolor
101 | 100,5.7,2.8,4.1,1.3,Iris-versicolor
102 | 101,6.3,3.3,6.0,2.5,Iris-virginica
103 | 102,5.8,2.7,5.1,1.9,Iris-virginica
104 | 103,7.1,3.0,5.9,2.1,Iris-virginica
105 | 104,6.3,2.9,5.6,1.8,Iris-virginica
106 | 105,6.5,3.0,5.8,2.2,Iris-virginica
107 | 106,7.6,3.0,6.6,2.1,Iris-virginica
108 | 107,4.9,2.5,4.5,1.7,Iris-virginica
109 | 108,7.3,2.9,6.3,1.8,Iris-virginica
110 | 109,6.7,2.5,5.8,1.8,Iris-virginica
111 | 110,7.2,3.6,6.1,2.5,Iris-virginica
112 | 111,6.5,3.2,5.1,2.0,Iris-virginica
113 | 112,6.4,2.7,5.3,1.9,Iris-virginica
114 | 113,6.8,3.0,5.5,2.1,Iris-virginica
115 | 114,5.7,2.5,5.0,2.0,Iris-virginica
116 | 115,5.8,2.8,5.1,2.4,Iris-virginica
117 | 116,6.4,3.2,5.3,2.3,Iris-virginica
118 | 117,6.5,3.0,5.5,1.8,Iris-virginica
119 | 118,7.7,3.8,6.7,2.2,Iris-virginica
120 | 119,7.7,2.6,6.9,2.3,Iris-virginica
121 | 120,6.0,2.2,5.0,1.5,Iris-virginica
122 | 121,6.9,3.2,5.7,2.3,Iris-virginica
123 | 122,5.6,2.8,4.9,2.0,Iris-virginica
124 | 123,7.7,2.8,6.7,2.0,Iris-virginica
125 | 124,6.3,2.7,4.9,1.8,Iris-virginica
126 | 125,6.7,3.3,5.7,2.1,Iris-virginica
127 | 126,7.2,3.2,6.0,1.8,Iris-virginica
128 | 127,6.2,2.8,4.8,1.8,Iris-virginica
129 | 128,6.1,3.0,4.9,1.8,Iris-virginica
130 | 129,6.4,2.8,5.6,2.1,Iris-virginica
131 | 130,7.2,3.0,5.8,1.6,Iris-virginica
132 | 131,7.4,2.8,6.1,1.9,Iris-virginica
133 | 132,7.9,3.8,6.4,2.0,Iris-virginica
134 | 133,6.4,2.8,5.6,2.2,Iris-virginica
135 | 134,6.3,2.8,5.1,1.5,Iris-virginica
136 | 135,6.1,2.6,5.6,1.4,Iris-virginica
137 | 136,7.7,3.0,6.1,2.3,Iris-virginica
138 | 137,6.3,3.4,5.6,2.4,Iris-virginica
139 | 138,6.4,3.1,5.5,1.8,Iris-virginica
140 | 139,6.0,3.0,4.8,1.8,Iris-virginica
141 | 140,6.9,3.1,5.4,2.1,Iris-virginica
142 | 141,6.7,3.1,5.6,2.4,Iris-virginica
143 | 142,6.9,3.1,5.1,2.3,Iris-virginica
144 | 143,5.8,2.7,5.1,1.9,Iris-virginica
145 | 144,6.8,3.2,5.9,2.3,Iris-virginica
146 | 145,6.7,3.3,5.7,2.5,Iris-virginica
147 | 146,6.7,3.0,5.2,2.3,Iris-virginica
148 | 147,6.3,2.5,5.0,1.9,Iris-virginica
149 | 148,6.5,3.0,5.2,2.0,Iris-virginica
150 | 149,6.2,3.4,5.4,2.3,Iris-virginica
151 | 150,5.9,3.0,5.1,1.8,Iris-virginica
152 |
--------------------------------------------------------------------------------
/Chapter04/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter04/README.md
--------------------------------------------------------------------------------
/Chapter05/Chapter_5.r:
--------------------------------------------------------------------------------
1 | #Install required packages
2 | install.packages("rmarkdown")
3 | install.packages("tinytex")
4 |
5 | install.packages("knitr")
6 | library(readr)
7 | Autompg <- read.csv("auto-mpg.csv")
8 | Autompg
9 | View(Autompg)
10 |
11 | ```{Summary of dataset imported}
12 | summary(Autompg)
13 | ```
14 | ## Including Plots
15 | You can also embed plots, for example:
16 | ```{r pressure, echo=FALSE}
17 | plot(Autompg$mpg~Autompg$weight)
18 |
19 | summary(Autompg)
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Chapter05/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter05/README.md
--------------------------------------------------------------------------------
/Chapter05/auto-mpg.csv:
--------------------------------------------------------------------------------
1 | mpg,cylinders,displacement,horsepower,weight,acceleration,model year,origin,car name
2 | 18,8,307,130,3504,12,70,1,chevrolet chevelle malibu
3 | 15,8,350,165,3693,11.5,70,1,buick skylark 320
4 | 18,8,318,150,3436,11,70,1,plymouth satellite
5 | 16,8,304,150,3433,12,70,1,amc rebel sst
6 | 17,8,302,140,3449,10.5,70,1,ford torino
7 | 15,8,429,198,4341,10,70,1,ford galaxie 500
8 | 14,8,454,220,4354,9,70,1,chevrolet impala
9 | 14,8,440,215,4312,8.5,70,1,plymouth fury iii
10 | 14,8,455,225,4425,10,70,1,pontiac catalina
11 | 15,8,390,190,3850,8.5,70,1,amc ambassador dpl
12 | 15,8,383,170,3563,10,70,1,dodge challenger se
13 | 14,8,340,160,3609,8,70,1,plymouth 'cuda 340
14 | 15,8,400,150,3761,9.5,70,1,chevrolet monte carlo
15 | 14,8,455,225,3086,10,70,1,buick estate wagon (sw)
16 | 24,4,113,95,2372,15,70,3,toyota corona mark ii
17 | 22,6,198,95,2833,15.5,70,1,plymouth duster
18 | 18,6,199,97,2774,15.5,70,1,amc hornet
19 | 21,6,200,85,2587,16,70,1,ford maverick
20 | 27,4,97,88,2130,14.5,70,3,datsun pl510
21 | 26,4,97,46,1835,20.5,70,2,volkswagen 1131 deluxe sedan
22 | 25,4,110,87,2672,17.5,70,2,peugeot 504
23 | 24,4,107,90,2430,14.5,70,2,audi 100 ls
24 | 25,4,104,95,2375,17.5,70,2,saab 99e
25 | 26,4,121,113,2234,12.5,70,2,bmw 2002
26 | 21,6,199,90,2648,15,70,1,amc gremlin
27 | 10,8,360,215,4615,14,70,1,ford f250
28 | 10,8,307,200,4376,15,70,1,chevy c20
29 | 11,8,318,210,4382,13.5,70,1,dodge d200
30 | 9,8,304,193,4732,18.5,70,1,hi 1200d
31 | 27,4,97,88,2130,14.5,71,3,datsun pl510
32 | 28,4,140,90,2264,15.5,71,1,chevrolet vega 2300
33 | 25,4,113,95,2228,14,71,3,toyota corona
34 | 25,4,98,?,2046,19,71,1,ford pinto
35 | 19,6,232,100,2634,13,71,1,amc gremlin
36 | 16,6,225,105,3439,15.5,71,1,plymouth satellite custom
37 | 17,6,250,100,3329,15.5,71,1,chevrolet chevelle malibu
38 | 19,6,250,88,3302,15.5,71,1,ford torino 500
39 | 18,6,232,100,3288,15.5,71,1,amc matador
40 | 14,8,350,165,4209,12,71,1,chevrolet impala
41 | 14,8,400,175,4464,11.5,71,1,pontiac catalina brougham
42 | 14,8,351,153,4154,13.5,71,1,ford galaxie 500
43 | 14,8,318,150,4096,13,71,1,plymouth fury iii
44 | 12,8,383,180,4955,11.5,71,1,dodge monaco (sw)
45 | 13,8,400,170,4746,12,71,1,ford country squire (sw)
46 | 13,8,400,175,5140,12,71,1,pontiac safari (sw)
47 | 18,6,258,110,2962,13.5,71,1,amc hornet sportabout (sw)
48 | 22,4,140,72,2408,19,71,1,chevrolet vega (sw)
49 | 19,6,250,100,3282,15,71,1,pontiac firebird
50 | 18,6,250,88,3139,14.5,71,1,ford mustang
51 | 23,4,122,86,2220,14,71,1,mercury capri 2000
52 | 28,4,116,90,2123,14,71,2,opel 1900
53 | 30,4,79,70,2074,19.5,71,2,peugeot 304
54 | 30,4,88,76,2065,14.5,71,2,fiat 124b
55 | 31,4,71,65,1773,19,71,3,toyota corolla 1200
56 | 35,4,72,69,1613,18,71,3,datsun 1200
57 | 27,4,97,60,1834,19,71,2,volkswagen model 111
58 | 26,4,91,70,1955,20.5,71,1,plymouth cricket
59 | 24,4,113,95,2278,15.5,72,3,toyota corona hardtop
60 | 25,4,97.5,80,2126,17,72,1,dodge colt hardtop
61 | 23,4,97,54,2254,23.5,72,2,volkswagen type 3
62 | 20,4,140,90,2408,19.5,72,1,chevrolet vega
63 | 21,4,122,86,2226,16.5,72,1,ford pinto runabout
64 | 13,8,350,165,4274,12,72,1,chevrolet impala
65 | 14,8,400,175,4385,12,72,1,pontiac catalina
66 | 15,8,318,150,4135,13.5,72,1,plymouth fury iii
67 | 14,8,351,153,4129,13,72,1,ford galaxie 500
68 | 17,8,304,150,3672,11.5,72,1,amc ambassador sst
69 | 11,8,429,208,4633,11,72,1,mercury marquis
70 | 13,8,350,155,4502,13.5,72,1,buick lesabre custom
71 | 12,8,350,160,4456,13.5,72,1,oldsmobile delta 88 royale
72 | 13,8,400,190,4422,12.5,72,1,chrysler newport royal
73 | 19,3,70,97,2330,13.5,72,3,mazda rx2 coupe
74 | 15,8,304,150,3892,12.5,72,1,amc matador (sw)
75 | 13,8,307,130,4098,14,72,1,chevrolet chevelle concours (sw)
76 | 13,8,302,140,4294,16,72,1,ford gran torino (sw)
77 | 14,8,318,150,4077,14,72,1,plymouth satellite custom (sw)
78 | 18,4,121,112,2933,14.5,72,2,volvo 145e (sw)
79 | 22,4,121,76,2511,18,72,2,volkswagen 411 (sw)
80 | 21,4,120,87,2979,19.5,72,2,peugeot 504 (sw)
81 | 26,4,96,69,2189,18,72,2,renault 12 (sw)
82 | 22,4,122,86,2395,16,72,1,ford pinto (sw)
83 | 28,4,97,92,2288,17,72,3,datsun 510 (sw)
84 | 23,4,120,97,2506,14.5,72,3,toyouta corona mark ii (sw)
85 | 28,4,98,80,2164,15,72,1,dodge colt (sw)
86 | 27,4,97,88,2100,16.5,72,3,toyota corolla 1600 (sw)
87 | 13,8,350,175,4100,13,73,1,buick century 350
88 | 14,8,304,150,3672,11.5,73,1,amc matador
89 | 13,8,350,145,3988,13,73,1,chevrolet malibu
90 | 14,8,302,137,4042,14.5,73,1,ford gran torino
91 | 15,8,318,150,3777,12.5,73,1,dodge coronet custom
92 | 12,8,429,198,4952,11.5,73,1,mercury marquis brougham
93 | 13,8,400,150,4464,12,73,1,chevrolet caprice classic
94 | 13,8,351,158,4363,13,73,1,ford ltd
95 | 14,8,318,150,4237,14.5,73,1,plymouth fury gran sedan
96 | 13,8,440,215,4735,11,73,1,chrysler new yorker brougham
97 | 12,8,455,225,4951,11,73,1,buick electra 225 custom
98 | 13,8,360,175,3821,11,73,1,amc ambassador brougham
99 | 18,6,225,105,3121,16.5,73,1,plymouth valiant
100 | 16,6,250,100,3278,18,73,1,chevrolet nova custom
101 | 18,6,232,100,2945,16,73,1,amc hornet
102 | 18,6,250,88,3021,16.5,73,1,ford maverick
103 | 23,6,198,95,2904,16,73,1,plymouth duster
104 | 26,4,97,46,1950,21,73,2,volkswagen super beetle
105 | 11,8,400,150,4997,14,73,1,chevrolet impala
106 | 12,8,400,167,4906,12.5,73,1,ford country
107 | 13,8,360,170,4654,13,73,1,plymouth custom suburb
108 | 12,8,350,180,4499,12.5,73,1,oldsmobile vista cruiser
109 | 18,6,232,100,2789,15,73,1,amc gremlin
110 | 20,4,97,88,2279,19,73,3,toyota carina
111 | 21,4,140,72,2401,19.5,73,1,chevrolet vega
112 | 22,4,108,94,2379,16.5,73,3,datsun 610
113 | 18,3,70,90,2124,13.5,73,3,maxda rx3
114 | 19,4,122,85,2310,18.5,73,1,ford pinto
115 | 21,6,155,107,2472,14,73,1,mercury capri v6
116 | 26,4,98,90,2265,15.5,73,2,fiat 124 sport coupe
117 | 15,8,350,145,4082,13,73,1,chevrolet monte carlo s
118 | 16,8,400,230,4278,9.5,73,1,pontiac grand prix
119 | 29,4,68,49,1867,19.5,73,2,fiat 128
120 | 24,4,116,75,2158,15.5,73,2,opel manta
121 | 20,4,114,91,2582,14,73,2,audi 100ls
122 | 19,4,121,112,2868,15.5,73,2,volvo 144ea
123 | 15,8,318,150,3399,11,73,1,dodge dart custom
124 | 24,4,121,110,2660,14,73,2,saab 99le
125 | 20,6,156,122,2807,13.5,73,3,toyota mark ii
126 | 11,8,350,180,3664,11,73,1,oldsmobile omega
127 | 20,6,198,95,3102,16.5,74,1,plymouth duster
128 | 21,6,200,?,2875,17,74,1,ford maverick
129 | 19,6,232,100,2901,16,74,1,amc hornet
130 | 15,6,250,100,3336,17,74,1,chevrolet nova
131 | 31,4,79,67,1950,19,74,3,datsun b210
132 | 26,4,122,80,2451,16.5,74,1,ford pinto
133 | 32,4,71,65,1836,21,74,3,toyota corolla 1200
134 | 25,4,140,75,2542,17,74,1,chevrolet vega
135 | 16,6,250,100,3781,17,74,1,chevrolet chevelle malibu classic
136 | 16,6,258,110,3632,18,74,1,amc matador
137 | 18,6,225,105,3613,16.5,74,1,plymouth satellite sebring
138 | 16,8,302,140,4141,14,74,1,ford gran torino
139 | 13,8,350,150,4699,14.5,74,1,buick century luxus (sw)
140 | 14,8,318,150,4457,13.5,74,1,dodge coronet custom (sw)
141 | 14,8,302,140,4638,16,74,1,ford gran torino (sw)
142 | 14,8,304,150,4257,15.5,74,1,amc matador (sw)
143 | 29,4,98,83,2219,16.5,74,2,audi fox
144 | 26,4,79,67,1963,15.5,74,2,volkswagen dasher
145 | 26,4,97,78,2300,14.5,74,2,opel manta
146 | 31,4,76,52,1649,16.5,74,3,toyota corona
147 | 32,4,83,61,2003,19,74,3,datsun 710
148 | 28,4,90,75,2125,14.5,74,1,dodge colt
149 | 24,4,90,75,2108,15.5,74,2,fiat 128
150 | 26,4,116,75,2246,14,74,2,fiat 124 tc
151 | 24,4,120,97,2489,15,74,3,honda civic
152 | 26,4,108,93,2391,15.5,74,3,subaru
153 | 31,4,79,67,2000,16,74,2,fiat x1.9
154 | 19,6,225,95,3264,16,75,1,plymouth valiant custom
155 | 18,6,250,105,3459,16,75,1,chevrolet nova
156 | 15,6,250,72,3432,21,75,1,mercury monarch
157 | 15,6,250,72,3158,19.5,75,1,ford maverick
158 | 16,8,400,170,4668,11.5,75,1,pontiac catalina
159 | 15,8,350,145,4440,14,75,1,chevrolet bel air
160 | 16,8,318,150,4498,14.5,75,1,plymouth grand fury
161 | 14,8,351,148,4657,13.5,75,1,ford ltd
162 | 17,6,231,110,3907,21,75,1,buick century
163 | 16,6,250,105,3897,18.5,75,1,chevroelt chevelle malibu
164 | 15,6,258,110,3730,19,75,1,amc matador
165 | 18,6,225,95,3785,19,75,1,plymouth fury
166 | 21,6,231,110,3039,15,75,1,buick skyhawk
167 | 20,8,262,110,3221,13.5,75,1,chevrolet monza 2+2
168 | 13,8,302,129,3169,12,75,1,ford mustang ii
169 | 29,4,97,75,2171,16,75,3,toyota corolla
170 | 23,4,140,83,2639,17,75,1,ford pinto
171 | 20,6,232,100,2914,16,75,1,amc gremlin
172 | 23,4,140,78,2592,18.5,75,1,pontiac astro
173 | 24,4,134,96,2702,13.5,75,3,toyota corona
174 | 25,4,90,71,2223,16.5,75,2,volkswagen dasher
175 | 24,4,119,97,2545,17,75,3,datsun 710
176 | 18,6,171,97,2984,14.5,75,1,ford pinto
177 | 29,4,90,70,1937,14,75,2,volkswagen rabbit
178 | 19,6,232,90,3211,17,75,1,amc pacer
179 | 23,4,115,95,2694,15,75,2,audi 100ls
180 | 23,4,120,88,2957,17,75,2,peugeot 504
181 | 22,4,121,98,2945,14.5,75,2,volvo 244dl
182 | 25,4,121,115,2671,13.5,75,2,saab 99le
183 | 33,4,91,53,1795,17.5,75,3,honda civic cvcc
184 | 28,4,107,86,2464,15.5,76,2,fiat 131
185 | 25,4,116,81,2220,16.9,76,2,opel 1900
186 | 25,4,140,92,2572,14.9,76,1,capri ii
187 | 26,4,98,79,2255,17.7,76,1,dodge colt
188 | 27,4,101,83,2202,15.3,76,2,renault 12tl
189 | 17.5,8,305,140,4215,13,76,1,chevrolet chevelle malibu classic
190 | 16,8,318,150,4190,13,76,1,dodge coronet brougham
191 | 15.5,8,304,120,3962,13.9,76,1,amc matador
192 | 14.5,8,351,152,4215,12.8,76,1,ford gran torino
193 | 22,6,225,100,3233,15.4,76,1,plymouth valiant
194 | 22,6,250,105,3353,14.5,76,1,chevrolet nova
195 | 24,6,200,81,3012,17.6,76,1,ford maverick
196 | 22.5,6,232,90,3085,17.6,76,1,amc hornet
197 | 29,4,85,52,2035,22.2,76,1,chevrolet chevette
198 | 24.5,4,98,60,2164,22.1,76,1,chevrolet woody
199 | 29,4,90,70,1937,14.2,76,2,vw rabbit
200 | 33,4,91,53,1795,17.4,76,3,honda civic
201 | 20,6,225,100,3651,17.7,76,1,dodge aspen se
202 | 18,6,250,78,3574,21,76,1,ford granada ghia
203 | 18.5,6,250,110,3645,16.2,76,1,pontiac ventura sj
204 | 17.5,6,258,95,3193,17.8,76,1,amc pacer d/l
205 | 29.5,4,97,71,1825,12.2,76,2,volkswagen rabbit
206 | 32,4,85,70,1990,17,76,3,datsun b-210
207 | 28,4,97,75,2155,16.4,76,3,toyota corolla
208 | 26.5,4,140,72,2565,13.6,76,1,ford pinto
209 | 20,4,130,102,3150,15.7,76,2,volvo 245
210 | 13,8,318,150,3940,13.2,76,1,plymouth volare premier v8
211 | 19,4,120,88,3270,21.9,76,2,peugeot 504
212 | 19,6,156,108,2930,15.5,76,3,toyota mark ii
213 | 16.5,6,168,120,3820,16.7,76,2,mercedes-benz 280s
214 | 16.5,8,350,180,4380,12.1,76,1,cadillac seville
215 | 13,8,350,145,4055,12,76,1,chevy c10
216 | 13,8,302,130,3870,15,76,1,ford f108
217 | 13,8,318,150,3755,14,76,1,dodge d100
218 | 31.5,4,98,68,2045,18.5,77,3,honda accord cvcc
219 | 30,4,111,80,2155,14.8,77,1,buick opel isuzu deluxe
220 | 36,4,79,58,1825,18.6,77,2,renault 5 gtl
221 | 25.5,4,122,96,2300,15.5,77,1,plymouth arrow gs
222 | 33.5,4,85,70,1945,16.8,77,3,datsun f-10 hatchback
223 | 17.5,8,305,145,3880,12.5,77,1,chevrolet caprice classic
224 | 17,8,260,110,4060,19,77,1,oldsmobile cutlass supreme
225 | 15.5,8,318,145,4140,13.7,77,1,dodge monaco brougham
226 | 15,8,302,130,4295,14.9,77,1,mercury cougar brougham
227 | 17.5,6,250,110,3520,16.4,77,1,chevrolet concours
228 | 20.5,6,231,105,3425,16.9,77,1,buick skylark
229 | 19,6,225,100,3630,17.7,77,1,plymouth volare custom
230 | 18.5,6,250,98,3525,19,77,1,ford granada
231 | 16,8,400,180,4220,11.1,77,1,pontiac grand prix lj
232 | 15.5,8,350,170,4165,11.4,77,1,chevrolet monte carlo landau
233 | 15.5,8,400,190,4325,12.2,77,1,chrysler cordoba
234 | 16,8,351,149,4335,14.5,77,1,ford thunderbird
235 | 29,4,97,78,1940,14.5,77,2,volkswagen rabbit custom
236 | 24.5,4,151,88,2740,16,77,1,pontiac sunbird coupe
237 | 26,4,97,75,2265,18.2,77,3,toyota corolla liftback
238 | 25.5,4,140,89,2755,15.8,77,1,ford mustang ii 2+2
239 | 30.5,4,98,63,2051,17,77,1,chevrolet chevette
240 | 33.5,4,98,83,2075,15.9,77,1,dodge colt m/m
241 | 30,4,97,67,1985,16.4,77,3,subaru dl
242 | 30.5,4,97,78,2190,14.1,77,2,volkswagen dasher
243 | 22,6,146,97,2815,14.5,77,3,datsun 810
244 | 21.5,4,121,110,2600,12.8,77,2,bmw 320i
245 | 21.5,3,80,110,2720,13.5,77,3,mazda rx-4
246 | 43.1,4,90,48,1985,21.5,78,2,volkswagen rabbit custom diesel
247 | 36.1,4,98,66,1800,14.4,78,1,ford fiesta
248 | 32.8,4,78,52,1985,19.4,78,3,mazda glc deluxe
249 | 39.4,4,85,70,2070,18.6,78,3,datsun b210 gx
250 | 36.1,4,91,60,1800,16.4,78,3,honda civic cvcc
251 | 19.9,8,260,110,3365,15.5,78,1,oldsmobile cutlass salon brougham
252 | 19.4,8,318,140,3735,13.2,78,1,dodge diplomat
253 | 20.2,8,302,139,3570,12.8,78,1,mercury monarch ghia
254 | 19.2,6,231,105,3535,19.2,78,1,pontiac phoenix lj
255 | 20.5,6,200,95,3155,18.2,78,1,chevrolet malibu
256 | 20.2,6,200,85,2965,15.8,78,1,ford fairmont (auto)
257 | 25.1,4,140,88,2720,15.4,78,1,ford fairmont (man)
258 | 20.5,6,225,100,3430,17.2,78,1,plymouth volare
259 | 19.4,6,232,90,3210,17.2,78,1,amc concord
260 | 20.6,6,231,105,3380,15.8,78,1,buick century special
261 | 20.8,6,200,85,3070,16.7,78,1,mercury zephyr
262 | 18.6,6,225,110,3620,18.7,78,1,dodge aspen
263 | 18.1,6,258,120,3410,15.1,78,1,amc concord d/l
264 | 19.2,8,305,145,3425,13.2,78,1,chevrolet monte carlo landau
265 | 17.7,6,231,165,3445,13.4,78,1,buick regal sport coupe (turbo)
266 | 18.1,8,302,139,3205,11.2,78,1,ford futura
267 | 17.5,8,318,140,4080,13.7,78,1,dodge magnum xe
268 | 30,4,98,68,2155,16.5,78,1,chevrolet chevette
269 | 27.5,4,134,95,2560,14.2,78,3,toyota corona
270 | 27.2,4,119,97,2300,14.7,78,3,datsun 510
271 | 30.9,4,105,75,2230,14.5,78,1,dodge omni
272 | 21.1,4,134,95,2515,14.8,78,3,toyota celica gt liftback
273 | 23.2,4,156,105,2745,16.7,78,1,plymouth sapporo
274 | 23.8,4,151,85,2855,17.6,78,1,oldsmobile starfire sx
275 | 23.9,4,119,97,2405,14.9,78,3,datsun 200-sx
276 | 20.3,5,131,103,2830,15.9,78,2,audi 5000
277 | 17,6,163,125,3140,13.6,78,2,volvo 264gl
278 | 21.6,4,121,115,2795,15.7,78,2,saab 99gle
279 | 16.2,6,163,133,3410,15.8,78,2,peugeot 604sl
280 | 31.5,4,89,71,1990,14.9,78,2,volkswagen scirocco
281 | 29.5,4,98,68,2135,16.6,78,3,honda accord lx
282 | 21.5,6,231,115,3245,15.4,79,1,pontiac lemans v6
283 | 19.8,6,200,85,2990,18.2,79,1,mercury zephyr 6
284 | 22.3,4,140,88,2890,17.3,79,1,ford fairmont 4
285 | 20.2,6,232,90,3265,18.2,79,1,amc concord dl 6
286 | 20.6,6,225,110,3360,16.6,79,1,dodge aspen 6
287 | 17,8,305,130,3840,15.4,79,1,chevrolet caprice classic
288 | 17.6,8,302,129,3725,13.4,79,1,ford ltd landau
289 | 16.5,8,351,138,3955,13.2,79,1,mercury grand marquis
290 | 18.2,8,318,135,3830,15.2,79,1,dodge st. regis
291 | 16.9,8,350,155,4360,14.9,79,1,buick estate wagon (sw)
292 | 15.5,8,351,142,4054,14.3,79,1,ford country squire (sw)
293 | 19.2,8,267,125,3605,15,79,1,chevrolet malibu classic (sw)
294 | 18.5,8,360,150,3940,13,79,1,chrysler lebaron town @ country (sw)
295 | 31.9,4,89,71,1925,14,79,2,vw rabbit custom
296 | 34.1,4,86,65,1975,15.2,79,3,maxda glc deluxe
297 | 35.7,4,98,80,1915,14.4,79,1,dodge colt hatchback custom
298 | 27.4,4,121,80,2670,15,79,1,amc spirit dl
299 | 25.4,5,183,77,3530,20.1,79,2,mercedes benz 300d
300 | 23,8,350,125,3900,17.4,79,1,cadillac eldorado
301 | 27.2,4,141,71,3190,24.8,79,2,peugeot 504
302 | 23.9,8,260,90,3420,22.2,79,1,oldsmobile cutlass salon brougham
303 | 34.2,4,105,70,2200,13.2,79,1,plymouth horizon
304 | 34.5,4,105,70,2150,14.9,79,1,plymouth horizon tc3
305 | 31.8,4,85,65,2020,19.2,79,3,datsun 210
306 | 37.3,4,91,69,2130,14.7,79,2,fiat strada custom
307 | 28.4,4,151,90,2670,16,79,1,buick skylark limited
308 | 28.8,6,173,115,2595,11.3,79,1,chevrolet citation
309 | 26.8,6,173,115,2700,12.9,79,1,oldsmobile omega brougham
310 | 33.5,4,151,90,2556,13.2,79,1,pontiac phoenix
311 | 41.5,4,98,76,2144,14.7,80,2,vw rabbit
312 | 38.1,4,89,60,1968,18.8,80,3,toyota corolla tercel
313 | 32.1,4,98,70,2120,15.5,80,1,chevrolet chevette
314 | 37.2,4,86,65,2019,16.4,80,3,datsun 310
315 | 28,4,151,90,2678,16.5,80,1,chevrolet citation
316 | 26.4,4,140,88,2870,18.1,80,1,ford fairmont
317 | 24.3,4,151,90,3003,20.1,80,1,amc concord
318 | 19.1,6,225,90,3381,18.7,80,1,dodge aspen
319 | 34.3,4,97,78,2188,15.8,80,2,audi 4000
320 | 29.8,4,134,90,2711,15.5,80,3,toyota corona liftback
321 | 31.3,4,120,75,2542,17.5,80,3,mazda 626
322 | 37,4,119,92,2434,15,80,3,datsun 510 hatchback
323 | 32.2,4,108,75,2265,15.2,80,3,toyota corolla
324 | 46.6,4,86,65,2110,17.9,80,3,mazda glc
325 | 27.9,4,156,105,2800,14.4,80,1,dodge colt
326 | 40.8,4,85,65,2110,19.2,80,3,datsun 210
327 | 44.3,4,90,48,2085,21.7,80,2,vw rabbit c (diesel)
328 | 43.4,4,90,48,2335,23.7,80,2,vw dasher (diesel)
329 | 36.4,5,121,67,2950,19.9,80,2,audi 5000s (diesel)
330 | 30,4,146,67,3250,21.8,80,2,mercedes-benz 240d
331 | 44.6,4,91,67,1850,13.8,80,3,honda civic 1500 gl
332 | 40.9,4,85,?,1835,17.3,80,2,renault lecar deluxe
333 | 33.8,4,97,67,2145,18,80,3,subaru dl
334 | 29.8,4,89,62,1845,15.3,80,2,vokswagen rabbit
335 | 32.7,6,168,132,2910,11.4,80,3,datsun 280-zx
336 | 23.7,3,70,100,2420,12.5,80,3,mazda rx-7 gs
337 | 35,4,122,88,2500,15.1,80,2,triumph tr7 coupe
338 | 23.6,4,140,?,2905,14.3,80,1,ford mustang cobra
339 | 32.4,4,107,72,2290,17,80,3,honda accord
340 | 27.2,4,135,84,2490,15.7,81,1,plymouth reliant
341 | 26.6,4,151,84,2635,16.4,81,1,buick skylark
342 | 25.8,4,156,92,2620,14.4,81,1,dodge aries wagon (sw)
343 | 23.5,6,173,110,2725,12.6,81,1,chevrolet citation
344 | 30,4,135,84,2385,12.9,81,1,plymouth reliant
345 | 39.1,4,79,58,1755,16.9,81,3,toyota starlet
346 | 39,4,86,64,1875,16.4,81,1,plymouth champ
347 | 35.1,4,81,60,1760,16.1,81,3,honda civic 1300
348 | 32.3,4,97,67,2065,17.8,81,3,subaru
349 | 37,4,85,65,1975,19.4,81,3,datsun 210 mpg
350 | 37.7,4,89,62,2050,17.3,81,3,toyota tercel
351 | 34.1,4,91,68,1985,16,81,3,mazda glc 4
352 | 34.7,4,105,63,2215,14.9,81,1,plymouth horizon 4
353 | 34.4,4,98,65,2045,16.2,81,1,ford escort 4w
354 | 29.9,4,98,65,2380,20.7,81,1,ford escort 2h
355 | 33,4,105,74,2190,14.2,81,2,volkswagen jetta
356 | 34.5,4,100,?,2320,15.8,81,2,renault 18i
357 | 33.7,4,107,75,2210,14.4,81,3,honda prelude
358 | 32.4,4,108,75,2350,16.8,81,3,toyota corolla
359 | 32.9,4,119,100,2615,14.8,81,3,datsun 200sx
360 | 31.6,4,120,74,2635,18.3,81,3,mazda 626
361 | 28.1,4,141,80,3230,20.4,81,2,peugeot 505s turbo diesel
362 | 30.7,6,145,76,3160,19.6,81,2,volvo diesel
363 | 25.4,6,168,116,2900,12.6,81,3,toyota cressida
364 | 24.2,6,146,120,2930,13.8,81,3,datsun 810 maxima
365 | 22.4,6,231,110,3415,15.8,81,1,buick century
366 | 26.6,8,350,105,3725,19,81,1,oldsmobile cutlass ls
367 | 20.2,6,200,88,3060,17.1,81,1,ford granada gl
368 | 17.6,6,225,85,3465,16.6,81,1,chrysler lebaron salon
369 | 28,4,112,88,2605,19.6,82,1,chevrolet cavalier
370 | 27,4,112,88,2640,18.6,82,1,chevrolet cavalier wagon
371 | 34,4,112,88,2395,18,82,1,chevrolet cavalier 2-door
372 | 31,4,112,85,2575,16.2,82,1,pontiac j2000 se hatchback
373 | 29,4,135,84,2525,16,82,1,dodge aries se
374 | 27,4,151,90,2735,18,82,1,pontiac phoenix
375 | 24,4,140,92,2865,16.4,82,1,ford fairmont futura
376 | 23,4,151,?,3035,20.5,82,1,amc concord dl
377 | 36,4,105,74,1980,15.3,82,2,volkswagen rabbit l
378 | 37,4,91,68,2025,18.2,82,3,mazda glc custom l
379 | 31,4,91,68,1970,17.6,82,3,mazda glc custom
380 | 38,4,105,63,2125,14.7,82,1,plymouth horizon miser
381 | 36,4,98,70,2125,17.3,82,1,mercury lynx l
382 | 36,4,120,88,2160,14.5,82,3,nissan stanza xe
383 | 36,4,107,75,2205,14.5,82,3,honda accord
384 | 34,4,108,70,2245,16.9,82,3,toyota corolla
385 | 38,4,91,67,1965,15,82,3,honda civic
386 | 32,4,91,67,1965,15.7,82,3,honda civic (auto)
387 | 38,4,91,67,1995,16.2,82,3,datsun 310 gx
388 | 25,6,181,110,2945,16.4,82,1,buick century limited
389 | 38,6,262,85,3015,17,82,1,oldsmobile cutlass ciera (diesel)
390 | 26,4,156,92,2585,14.5,82,1,chrysler lebaron medallion
391 | 22,6,232,112,2835,14.7,82,1,ford granada l
392 | 32,4,144,96,2665,13.9,82,3,toyota celica gt
393 | 36,4,135,84,2370,13,82,1,dodge charger 2.2
394 | 27,4,151,90,2950,17.3,82,1,chevrolet camaro
395 | 27,4,140,86,2790,15.6,82,1,ford mustang gl
396 | 44,4,97,52,2130,24.6,82,2,vw pickup
397 | 32,4,135,84,2295,11.6,82,1,dodge rampage
398 | 28,4,120,79,2625,18.6,82,1,ford ranger
399 | 31,4,119,82,2720,19.4,82,1,chevy s-10
400 |
--------------------------------------------------------------------------------
/Chapter06/Chapter_6.r:
--------------------------------------------------------------------------------
1 | #Reading the dataset
2 | library(readr)
3 |
4 | bank <-read.csv("bank.csv", stringsAsFactors = FALSE)
5 | bank
6 |
7 | View(bank)
8 |
9 | #Cleaning and tidying up the dataset
10 |
11 | library(tidyr)
12 |
13 |
14 | library(dplyr)
15 | class(bank)
16 |
17 | dim(bank)
18 | colnames(bank)
19 | str(bank)
20 | library(plyr)
21 | hist(bank$balance)
22 | boxplot(bank$balance)
23 |
24 | class(bank$balance)
25 |
26 | bank$balance<-as.character(bank$balance)
27 | class(bank$balance)
28 |
29 | library(tidyr)
30 | bank1<-unite(data = bank, col= balance, loan)
31 | bank1
32 |
33 | #Understanding the structure of dataset
34 | summary(bank)
35 | bank$age<-as.numeric(bank$age)
36 | bank$job<-as.character(bank$job)
37 | bank$marital<-as.character(bank$marital)
38 | bank$education<-as.character(bank$education)
39 | bank$default<-as.character(bank$default)
40 | bank$balance<-as.numeric(bank$balance)
41 | bank$housing<-as.character(bank$loan)
42 | bank$contact<- as.character(bank$contact)
43 | bank$day<-as.numeric(bank$day)
44 | bank$month<-as.character(bank$month)
45 | bank$duration<-as.numeric(bank$duration)
46 | bank$campaign<-as.numeric(bank$campaign)
47 |
48 |
49 | #Hypothesis Test
50 |
51 | t.test(bank$balance, bank$age)
52 | t.test(bank$balance, mu = 5, alternative = 'greater')
53 | cor(bank$balance, bank$age, method = 'spearman')
54 | cor(bank$balance, bank$age, method = 'kendall')
55 |
56 | #Tietjan-Moore Test
57 |
58 | TietjenMoore <- function(dataSeries,k)
59 | + {
60 | + n = length(dataSeries)
61 | + ## Compute the absolute residuals.
62 | + r = abs(dataSeries - mean(dataSeries))
63 | + ## Sort data according to size of residual.
64 | + df = data.frame(dataSeries,r)
65 | + dfs = df[order(df$r),]
66 | + ## Create a subset of the data without the largest k values.
67 | + klarge = c((n-k+1):n)
68 | + subdataSeries = dfs$dataSeries[-klarge]
69 | + ## Compute the sums of squares.
70 | + ksub = (subdataSeries - mean(subdataSeries))**2
71 | + all = (df$dataSeries - mean(df$dataSeries))**2
72 | + ## Compute the test statistic.
73 | + sum(ksub)/sum(all)
74 | + }
75 |
76 |
77 | FindOutliersTietjenMooreTest <- function(dataSeries,k,alpha=0.05){
78 | + ek <- TietjenMoore(dataSeries,k)
79 | + ## Compute critical value based on simulation.
80 | + test = c(1:10000)
81 | + for (i in 1:10000){
82 | + dataSeriesdataSeries = rnorm(length(dataSeries))
83 | + test[i] = TietjenMoore(dataSeriesdataSeries,k)}
84 | + Talpha=quantile(test,alpha)
85 | + list(T=ek,Talpha=Talpha)
86 | + }
87 | #Demonstration of test
88 |
89 | x <- c(-1.40, -0.44, -0.30, -0.24, -0.22, -0.13, -0.05, 0.06, 0.10, 0.18,
90 | + 0.20, 0.39, 0.48, 0.63, 1.01)
91 | FindOutliersTietjenMooreTest(x, 2)
92 |
93 | FindOutliersTietjenMooreTest(bank$balance, 2)
94 |
95 | #Parsimonious Model
96 |
97 | install.packages('devtools')
98 | install.packages('MoEClust')
99 | library(MoEClust)
100 |
101 | View(bank)
102 | age <- bank[,1]
103 | age
104 |
105 | balance<-bank[,6]
106 | balance
107 |
108 | m1 <- MoE_clust(balance, G=0:2, verbose=FALSE)
109 | m2 <- MoE_clust(balance, G=2, verbose=FALSE)
110 | m3 <- MoE_clust(balance, G=1:2, verbose=FALSE)
111 | comp
112 |
113 | plot(comp$optimal, what="gpairs", jitter=FALSE)
114 | (mod <- as.Mclust(comp$optimal))
115 |
116 | plot(mod, what="classification")
117 | plot(mod, what="uncertainty")
118 |
119 | #Probability Plots
120 |
121 | p1 <- ggplot(data = bank, aes(bank$balance)) + stat_function(fun = dnorm, n = 101, args = list(mean = 0, sd = 1)) + ylab("") + scale_y_continuous(breaks = NULL)
122 | p2 <- ggplot(data = bank, aes(bank$balance)) +stat_function(fun = pnorm, n = 101, args = list(mean = 0, sd = 1)) + ylab("") + scale_y_continuous(breaks = NULL)
123 | p4 <- ggplot(data = bank, aes(bank$balance)) +
124 | + stat_function(fun = rnorm, n = 101, args = list(mean = 0, sd = 1)) + ylab("") +scale_y_continuous(breaks = NULL)
125 |
126 | #Shapiro Wik Test
127 | shapiro.test(bank$balance[1:10])
128 |
129 |
130 | shapiro.test(bank$balance[1:4000])
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
--------------------------------------------------------------------------------
/Chapter06/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter06/README.md
--------------------------------------------------------------------------------
/Chapter06/bank-additional-names.txt:
--------------------------------------------------------------------------------
1 | Citation Request:
2 | This dataset is publicly available for research. The details are described in [Moro et al., 2014].
3 | Please include this citation if you plan to use this database:
4 |
5 | [Moro et al., 2014] S. Moro, P. Cortez and P. Rita. A Data-Driven Approach to Predict the Success of Bank Telemarketing. Decision Support Systems, In press, http://dx.doi.org/10.1016/j.dss.2014.03.001
6 |
7 | Available at: [pdf] http://dx.doi.org/10.1016/j.dss.2014.03.001
8 | [bib] http://www3.dsi.uminho.pt/pcortez/bib/2014-dss.txt
9 |
10 | 1. Title: Bank Marketing (with social/economic context)
11 |
12 | 2. Sources
13 | Created by: Sérgio Moro (ISCTE-IUL), Paulo Cortez (Univ. Minho) and Paulo Rita (ISCTE-IUL) @ 2014
14 |
15 | 3. Past Usage:
16 |
17 | The full dataset (bank-additional-full.csv) was described and analyzed in:
18 |
19 | S. Moro, P. Cortez and P. Rita. A Data-Driven Approach to Predict the Success of Bank Telemarketing. Decision Support Systems (2014), doi:10.1016/j.dss.2014.03.001.
20 |
21 | 4. Relevant Information:
22 |
23 | This dataset is based on "Bank Marketing" UCI dataset (please check the description at: http://archive.ics.uci.edu/ml/datasets/Bank+Marketing).
24 | The data is enriched by the addition of five new social and economic features/attributes (national wide indicators from a ~10M population country), published by the Banco de Portugal and publicly available at: https://www.bportugal.pt/estatisticasweb.
25 | This dataset is almost identical to the one used in [Moro et al., 2014] (it does not include all attributes due to privacy concerns).
26 | Using the rminer package and R tool (http://cran.r-project.org/web/packages/rminer/), we found that the addition of the five new social and economic attributes (made available here) lead to substantial improvement in the prediction of a success, even when the duration of the call is not included. Note: the file can be read in R using: d=read.table("bank-additional-full.csv",header=TRUE,sep=";")
27 |
28 | The zip file includes two datasets:
29 | 1) bank-additional-full.csv with all examples, ordered by date (from May 2008 to November 2010).
30 | 2) bank-additional.csv with 10% of the examples (4119), randomly selected from bank-additional-full.csv.
31 | The smallest dataset is provided to test more computationally demanding machine learning algorithms (e.g., SVM).
32 |
33 | The binary classification goal is to predict if the client will subscribe a bank term deposit (variable y).
34 |
35 | 5. Number of Instances: 41188 for bank-additional-full.csv
36 |
37 | 6. Number of Attributes: 20 + output attribute.
38 |
39 | 7. Attribute information:
40 |
41 | For more information, read [Moro et al., 2014].
42 |
43 | Input variables:
44 | # bank client data:
45 | 1 - age (numeric)
46 | 2 - job : type of job (categorical: "admin.","blue-collar","entrepreneur","housemaid","management","retired","self-employed","services","student","technician","unemployed","unknown")
47 | 3 - marital : marital status (categorical: "divorced","married","single","unknown"; note: "divorced" means divorced or widowed)
48 | 4 - education (categorical: "basic.4y","basic.6y","basic.9y","high.school","illiterate","professional.course","university.degree","unknown")
49 | 5 - default: has credit in default? (categorical: "no","yes","unknown")
50 | 6 - housing: has housing loan? (categorical: "no","yes","unknown")
51 | 7 - loan: has personal loan? (categorical: "no","yes","unknown")
52 | # related with the last contact of the current campaign:
53 | 8 - contact: contact communication type (categorical: "cellular","telephone")
54 | 9 - month: last contact month of year (categorical: "jan", "feb", "mar", ..., "nov", "dec")
55 | 10 - day_of_week: last contact day of the week (categorical: "mon","tue","wed","thu","fri")
56 | 11 - duration: last contact duration, in seconds (numeric). Important note: this attribute highly affects the output target (e.g., if duration=0 then y="no"). Yet, the duration is not known before a call is performed. Also, after the end of the call y is obviously known. Thus, this input should only be included for benchmark purposes and should be discarded if the intention is to have a realistic predictive model.
57 | # other attributes:
58 | 12 - campaign: number of contacts performed during this campaign and for this client (numeric, includes last contact)
59 | 13 - pdays: number of days that passed by after the client was last contacted from a previous campaign (numeric; 999 means client was not previously contacted)
60 | 14 - previous: number of contacts performed before this campaign and for this client (numeric)
61 | 15 - poutcome: outcome of the previous marketing campaign (categorical: "failure","nonexistent","success")
62 | # social and economic context attributes
63 | 16 - emp.var.rate: employment variation rate - quarterly indicator (numeric)
64 | 17 - cons.price.idx: consumer price index - monthly indicator (numeric)
65 | 18 - cons.conf.idx: consumer confidence index - monthly indicator (numeric)
66 | 19 - euribor3m: euribor 3 month rate - daily indicator (numeric)
67 | 20 - nr.employed: number of employees - quarterly indicator (numeric)
68 |
69 | Output variable (desired target):
70 | 21 - y - has the client subscribed a term deposit? (binary: "yes","no")
71 |
72 | 8. Missing Attribute Values: There are several missing values in some categorical attributes, all coded with the "unknown" label. These missing values can be treated as a possible class label or using deletion or imputation techniques.
73 |
--------------------------------------------------------------------------------
/Chapter07/AirQualityUCI.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter07/AirQualityUCI.xlsx
--------------------------------------------------------------------------------
/Chapter07/Chapter_7.r:
--------------------------------------------------------------------------------
1 | #Reading the dataset
2 |
3 | library(readr)
4 | library(readxl)
5 | AirQualityUCI <- read_xlsx("AirQualityUCI.xlsx")
6 | View(AirQualityUCI)
7 |
8 | str(AirQualityUCI)
9 |
10 | #Cleaning the dataset
11 |
12 | library(dplyr)
13 | library(tidyr)
14 |
15 | summary(AirQualityUCI)
16 | str(AirQualityUCI)
17 | head(AirQualityUCI)
18 |
19 |
20 | tail(AirQualityUCI)
21 |
22 | library("lubridate")
23 |
24 |
25 |
26 | AirQualityUCI$Time<-parse_date_time(AirQualityUCI$Time, orders="ymd hms"
27 |
28 | #Understanding the data structure
29 |
30 | class(AirQualityUCI)
31 | dim(AirQualityUCI)
32 | colnames(AirQualityUCI)
33 | str(AirQualityUCI)
34 | library(dplyr)
35 | glimpse(AirQualityUCI)
36 |
37 | plot(AirQualityUCI$AH, AirQualityUCI$RH, main = "Humidity Analysis", xlab = "Absolute Humidity", ylab = "Relative Humidity")
38 |
39 | #Hypothesis Tests
40 | t.test(AirQualityUCI$RH, AirQualityUCI$AH)
41 | t.test(AirQualityUCI$RH, mu = 5, alternative = 'greater')
42 |
43 |
44 | t.test(AirQualityUCI$AH, mu = 5, alternative = 'greater')
45 |
46 | #Grubbs Test and checking outliers
47 |
48 | outlierKD <- function(dt, var) {
49 | + var_name <- eval(substitute(var),eval(dt))
50 | + na1 <- sum(is.na(var_name))
51 | + m1 <- mean(var_name, na.rm = T)
52 | + par(mfrow=c(2, 2), oma=c(0,0,3,0))
53 | + boxplot(var_name, main="With outliers")
54 | + hist(var_name, main="With outliers", xlab=NA, ylab=NA)
55 | + outlier <- boxplot.stats(var_name)$out
56 | + mo <- mean(outlier)
57 | + var_name <- ifelse(var_name %in% outlier, NA, var_name)
58 | + boxplot(var_name, main="Without outliers")
59 | + hist(var_name, main="Without outliers", xlab=NA, ylab=NA)
60 | + title("Outlier Check", outer=TRUE)
61 | + na2 <- sum(is.na(var_name))
62 | + cat("Outliers identified:", na2 - na1, "n")
63 | + cat("Propotion (%) of outliers:", round((na2 - na1) / sum(!is.na(var_name))*100, 1), "n")
64 | + cat("Mean of the outliers:", round(mo, 2), "n")
65 | + m2 <- mean(var_name, na.rm = T)
66 | + cat("Mean without removing outliers:", round(m1, 2), "n")
67 | + cat("Mean if we remove outliers:", round(m2, 2), "n")
68 | + response <- readline(prompt="Do you want to remove outliers and to replace with NA? [yes/no]: ")
69 | + if(response == "y" | response == "yes"){
70 | + dt[as.character(substitute(var))] <- invisible(var_name)
71 | + assign(as.character(as.list(match.call())$dt), dt, envir = .GlobalEnv)
72 | + cat("Outliers successfully removed", "n")
73 | + return(invisible(dt))
74 | + } else{
75 | + cat("Nothing changed", "n")
76 | + return(invisible(var_name))
77 | + }
78 | + }
79 | outlierKD(AirQualityUCI,AH)
80 |
81 |
82 | install.packages("outliers")
83 |
84 | library(outliers)
85 | library(ggplot2)
86 |
87 | grubbs.flag <- function(x) {
88 | + outliers <- NULL
89 | + test <- x
90 | + grubbs.result <- grubbs.test(test)
91 | + pv <- grubbs.result$p.value
92 | + while(pv < 0.05) {
93 | + outliers <- c(outliers,as.numeric(strsplit(grubbs.result$alternative," ")[[1]][3]))
94 | + test <- x[!x %in% outliers]
95 | + grubbs.result <- grubbs.test(test)
96 | + pv <- grubbs.result$p.value
97 | + }
98 | + return(data.frame(X=x,Outlier=(x %in% outliers)))
99 | + }
100 |
101 | grubbs.flag(AirQualityUCI$AH)
102 |
103 | ggplot(grubbs.flag(AirQualityUCI$AH),aes(x=AirQualityUCI$AH,color=Outlier,fill=Outlier))+
104 | + geom_histogram(binwidth=diff(range(AirQualityUCI$AH))/30)+
105 | + theme_bw()
106 |
107 | #Parsimonious Model
108 |
109 | install.packages('devtools')
110 | install.packages('MoEClust')
111 |
112 | library(MoEClust)
113 | View(AirQualityUCI)
114 | Date
115 |
116 |
117 | RH <-AirQualityUCI[,14]
118 |
119 |
120 | AH <-AirQualityUCI[,15]
121 | plot(comp$optimal, what="gpairs", jitter=FALSE)
122 | (mod <- as.Mclust(comp$optimal))
123 |
124 | plot(mod, what="classification")
125 | plot(mod, what="uncertainty")
126 |
127 | #Bartlett's Test
128 | View(AirQualityUCI)
129 |
130 | bartlett.test(RH~Date, AirQualityUCI)
131 | bartlett.test(AH~Date, AirQualityUCI)
132 |
133 | #Data Visualization
134 |
135 | acf(AirQualityUCI)
136 | require(graphics)
137 | spectrum(AirQualityUCI, method = c("pgram", "ar"))
138 | spectrum(AirQualityUCI)
139 |
140 | #Phase Plots
141 |
142 | install.packages("seewave")
143 |
144 | library(seewave)
145 |
146 | phaseplot(AirQualityUCI, , dim = 2)
147 |
148 |
149 |
150 |
151 |
152 |
153 |
--------------------------------------------------------------------------------
/Chapter07/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter07/README.md
--------------------------------------------------------------------------------
/Chapter08/Chapter_8.r:
--------------------------------------------------------------------------------
1 | #Reading the dataset
2 | library(pls)
3 | data(longley)
4 |
5 | View(longley)
6 |
7 | str(longley)
8 |
9 | library(dplyr)
10 | library(tidyr)
11 |
12 | summary(longley)
13 |
14 |
15 | head(longley)
16 |
17 | tail(longley)
18 |
19 |
20 |
21 | View(longley)
22 | names(longley)[1]<-"GNP Deflator"
23 | names(longley)[4]<-"Armed Forces"
24 |
25 | class(longley)
26 |
27 |
28 | dim(longley)
29 |
30 |
31 | colnames(longley)
32 |
33 |
34 | str(longley)
35 |
36 | glimpse(longley)
37 | Observations: 16
38 |
39 | Variables: 7
40 |
41 |
42 |
43 | plot(longley$GNP, longley$Unemployed, main = "Rate of Unemployment with GNP", xlab = "GNP", ylab = "Unemployed")
44 |
45 |
46 | t.test(longley$GNP, longley$Unemployed)
47 |
48 | t.test(longley$GNP, mu = 5, alternative = 'two.sided')
49 |
50 |
51 | t.test(longley$Unemployed, mu = 5, alternative = 'two.sided')
52 |
53 |
54 | #Parsimonious model
55 |
56 | install.packages('devtools')
57 |
58 |
59 | GNP<-longley[,2]
60 | Unemployed<-longley[,3]
61 | Population<-longley[,5]
62 | dim(longley)
63 |
64 |
65 |
66 | m1 <- MoE_clust(GNP, G=0:2, verbose=FALSE)
67 | m2 <- MoE_clust(GNP, G=2, verbose=FALSE)
68 | m3 <- MoE_clust(GNP, G=2:16, verbose=FALSE)
69 |
70 |
71 | comp <- MoE_compare(m1, m2, m3)
72 |
73 | comp
74 |
75 | (mod <- as.Mclust(comp$optimal))
76 |
77 | plot(mod, what="classification")
78 |
79 | #leveneTest examination
80 | library(car)
81 |
82 | leveneTest(longley$GNP, longley$Unemployed)
83 |
84 |
85 | #Graphical Visualization
86 | library('ggplot2')
87 |
88 |
89 |
90 | library(readr)
91 |
92 |
93 | options(repr.plot.width = 6, repr.plot.height = 6)
94 |
95 | class(longley)
96 |
97 |
98 | View(longley)
99 | head(longley)
100 |
101 |
102 | summary(longley)
103 |
104 |
105 |
106 | ggplot(data=longley,aes(x=longley$GNP, y=longley$Unemployed)) + geom_point() + theme_minimal()
107 | ggplot(data=longley,aes(x=longley$`GNP Deflator`, y=longley$Unemployed)) + geom_point() + theme_minimal()
108 |
109 |
110 | pairs(longley[,1:4], pch = 19)
111 | pairs(longley[,5:7], pch = 19)
112 |
113 | base<-lm(Employed ~., longley)
114 | summary(base)
115 |
116 |
117 | pcrFit<-pcr(Employed ~ ., data = longley, valdiation = "cv")
118 | summary(pcrFit)
--------------------------------------------------------------------------------
/Chapter08/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter08/README.md
--------------------------------------------------------------------------------
/Chapter08/longley.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter08/longley.xlsx
--------------------------------------------------------------------------------
/Chapter09/Chapter_9.r:
--------------------------------------------------------------------------------
1 | library(readr)
2 | Autompg <- read.csv("auto-mpg.csv")
3 |
4 | View(Autompg)
5 |
6 | library(dplyr)
7 | library(tidyr)
8 |
9 | summary(Autompg)
10 |
11 | head(Autompg)
12 |
13 |
14 | tail(Autompg)
15 |
16 | names(Autompg)[9]<-"CarName"
17 | View(Autompg)
18 |
19 | Autompg$cylinders = Autompg$cylinders %>%
20 | + factor(labels = sort(unique(Autompg$cylinders)))
21 | Autompg$horsepower = as.numeric(levels(Autompg$horsepower))[Autompg$horsepower]
22 |
23 | View(Autompg)
24 |
25 | class(Autompg)
26 |
27 | dim(Autompg)
28 |
29 | colnames(Autompg)
30 |
31 | str(Autompg)
32 |
33 | glimpse(Autompg)
34 |
35 | plot(Autompg$displacement, Autompg$acceleration, main = "Rate of acceleration", xlab = "Displacement", ylab = "Acceleration")
36 |
37 | t.test(Autompg$displacement, Autompg$weight)
38 |
39 | t.test(Autompg$displacement, mu = 5, alternative = 'greater')
40 |
41 | t.test(Autompg$displacement, mu = 5, alternative = 'greater')
42 |
43 | outlierKD <- function(dt, var) {
44 | + var_name <- eval(substitute(var),eval(dt))
45 | + na1 <- sum(is.na(var_name))
46 | + m1 <- mean(var_name, na.rm = T)
47 | + par(mfrow=c(2, 2), oma=c(0,0,3,0))
48 | + boxplot(var_name, main="With outliers")
49 | + hist(var_name, main="With outliers", xlab=NA, ylab=NA)
50 | + outlier <- boxplot.stats(var_name)$out
51 | + mo <- mean(outlier)
52 | + var_name <- ifelse(var_name %in% outlier, NA, var_name)
53 | + boxplot(var_name, main="Without outliers")
54 | + hist(var_name, main="Without outliers", xlab=NA, ylab=NA)
55 | + title("Outlier Check", outer=TRUE)
56 | + na2 <- sum(is.na(var_name))
57 | + cat("Outliers identified:", na2 - na1, "n")
58 | + cat("Propotion (%) of outliers:", round((na2 - na1) / sum(!is.na(var_name))*100, 1), "n")
59 | + cat("Mean of the outliers:", round(mo, 2), "n")
60 | + m2 <- mean(var_name, na.rm = T)
61 | + cat("Mean without removing outliers:", round(m1, 2), "n")
62 | + cat("Mean if we remove outliers:", round(m2, 2), "n")
63 | + response <- readline(prompt="Do you want to remove outliers and to replace with NA? [yes/no]: ")
64 | + if(response == "y" | response == "yes"){
65 | + dt[as.character(substitute(var))] <- invisible(var_name)
66 | + assign(as.character(as.list(match.call())$dt), dt, envir = .GlobalEnv)
67 | + cat("Outliers successfully removed", "n")
68 | + return(invisible(dt))
69 | + } else{
70 | + cat("Nothing changed", "n")
71 | + return(invisible(var_name))
72 | + }}
73 |
74 | outlierKD(Autompg,displacement)
75 |
76 | install.packages("outliers")
77 |
78 | library(outliers)
79 |
80 | grubbs.flag <- function(x) {
81 | + outliers <- NULL
82 | + test <- x
83 | + grubbs.result <- grubbs.test(test)
84 | + pv <- grubbs.result$p.value
85 | + while(pv < 0.05) {
86 | + outliers <- c(outliers,as.numeric(strsplit(grubbs.result$alternative," ")[[1]][3]))
87 | + test <- x[!x %in% outliers]
88 | + grubbs.result <- grubbs.test(test)
89 | + pv <- grubbs.result$p.value
90 | + }
91 | + return(data.frame(X=x,Outlier=(x %in% outliers)))
92 | + }
93 |
94 |
95 | grubbs.flag(AirQualityUCI$AH)
96 | grubbs.flag(Autompg$displacement)
97 |
98 | ggplot(grubbs.flag(Autompg$displacement),aes(x=Autompg$displacement,color=Outlier,fill=Outlier))+
99 | + geom_histogram(binwidth=diff(range(Autompg$displacement))/30)+ theme_bw()
100 |
101 |
102 | library(MoEClust)
103 |
104 |
105 |
106 | View(Autompg)
107 | mpg <- Autompg[,1]
108 | displacement <- Autompg[,3]
109 | Acceleration <- Autompg[,6]
110 | dim(Autompg)
111 |
112 |
113 | m1 <- MoE_clust(displacement, G=0:2, verbose=FALSE)
114 |
115 |
116 |
117 | m2 <- MoE_clust(displacement, G=2:16, verbose=FALSE)
118 |
119 |
120 | comp <- MoE_compare(m1, m2)
121 |
122 | (mod <- as.Mclust(comp$optimal))
123 |
124 | plot(mod, what="classification")
125 | plot(mod, what="uncertainty")
126 |
127 | #Multi-factor Variance Analysis
128 |
129 | d <- aggregate(mpg ~ displacement, data = Autompg, FUN = mean)
130 | print(abs(d[[2]][1]-d[[2]][2]))
131 |
132 | fit0 <- lm(mpg ~ displacement, data = Autompg)
133 |
134 | lm(formula = mpg ~ displacement, data = Autompg)
135 |
136 | fit0 <- lm(mpg ~ displacement, data = Autompg)
137 | fit1 <- lm(mpg ~ ., data = Autompg)
138 | fit2 <- lm(mpg ~ Acceleration + weight, Autompg)
139 | View(Autompg)
140 | fit3 <- lm(mpg ~ displacement + horsepower + Acceleration + weight, Autompg)
141 | fit0
142 |
143 | anova(fit0, fit1, fit2, fit3)
144 |
145 | #Graphical exploration of dataset
146 | plot(Autompg$weight , Autompg$mpg, xlab = 'Weight of Cars', ylab = 'Miles per Gallon', main = 'Scatter Plot for MTCars Weight Vs MPG')
147 |
148 | library(ggplot2)
149 | ggplot(data=Autompg,aes(x=weight, y=mpg)) + geom_point() + theme_minimal()
150 |
151 | library(gplots)
152 |
153 |
154 |
155 | plotmeans(model.year ~ origin, data = Autompg, frame = FALSE)
156 |
157 | rate_of_activity = Autompg$displacement
158 |
159 | sd(rate_of_activity)
160 | ggplot(Autompg, aes(x=mpg, y=displacement)) +
161 | + geom_bar(stat="identity", color="black", position=position_dodge())
162 |
163 | p <- ggplot(Autompg, aes(x = weight, y = displacement))
164 | p + geom_point() + stat_density2d()
165 | p + stat_density2d(aes(colour = ..level..))
166 | p + stat_density2d(aes(fill = ..density..), geom = "raster", contour = FALSE)
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
--------------------------------------------------------------------------------
/Chapter09/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter09/README.md
--------------------------------------------------------------------------------
/Chapter09/auto-mpg.csv:
--------------------------------------------------------------------------------
1 | mpg,cylinders,displacement,horsepower,weight,acceleration,model year,origin,car name
2 | 18,8,307,130,3504,12,70,1,chevrolet chevelle malibu
3 | 15,8,350,165,3693,11.5,70,1,buick skylark 320
4 | 18,8,318,150,3436,11,70,1,plymouth satellite
5 | 16,8,304,150,3433,12,70,1,amc rebel sst
6 | 17,8,302,140,3449,10.5,70,1,ford torino
7 | 15,8,429,198,4341,10,70,1,ford galaxie 500
8 | 14,8,454,220,4354,9,70,1,chevrolet impala
9 | 14,8,440,215,4312,8.5,70,1,plymouth fury iii
10 | 14,8,455,225,4425,10,70,1,pontiac catalina
11 | 15,8,390,190,3850,8.5,70,1,amc ambassador dpl
12 | 15,8,383,170,3563,10,70,1,dodge challenger se
13 | 14,8,340,160,3609,8,70,1,plymouth 'cuda 340
14 | 15,8,400,150,3761,9.5,70,1,chevrolet monte carlo
15 | 14,8,455,225,3086,10,70,1,buick estate wagon (sw)
16 | 24,4,113,95,2372,15,70,3,toyota corona mark ii
17 | 22,6,198,95,2833,15.5,70,1,plymouth duster
18 | 18,6,199,97,2774,15.5,70,1,amc hornet
19 | 21,6,200,85,2587,16,70,1,ford maverick
20 | 27,4,97,88,2130,14.5,70,3,datsun pl510
21 | 26,4,97,46,1835,20.5,70,2,volkswagen 1131 deluxe sedan
22 | 25,4,110,87,2672,17.5,70,2,peugeot 504
23 | 24,4,107,90,2430,14.5,70,2,audi 100 ls
24 | 25,4,104,95,2375,17.5,70,2,saab 99e
25 | 26,4,121,113,2234,12.5,70,2,bmw 2002
26 | 21,6,199,90,2648,15,70,1,amc gremlin
27 | 10,8,360,215,4615,14,70,1,ford f250
28 | 10,8,307,200,4376,15,70,1,chevy c20
29 | 11,8,318,210,4382,13.5,70,1,dodge d200
30 | 9,8,304,193,4732,18.5,70,1,hi 1200d
31 | 27,4,97,88,2130,14.5,71,3,datsun pl510
32 | 28,4,140,90,2264,15.5,71,1,chevrolet vega 2300
33 | 25,4,113,95,2228,14,71,3,toyota corona
34 | 25,4,98,?,2046,19,71,1,ford pinto
35 | 19,6,232,100,2634,13,71,1,amc gremlin
36 | 16,6,225,105,3439,15.5,71,1,plymouth satellite custom
37 | 17,6,250,100,3329,15.5,71,1,chevrolet chevelle malibu
38 | 19,6,250,88,3302,15.5,71,1,ford torino 500
39 | 18,6,232,100,3288,15.5,71,1,amc matador
40 | 14,8,350,165,4209,12,71,1,chevrolet impala
41 | 14,8,400,175,4464,11.5,71,1,pontiac catalina brougham
42 | 14,8,351,153,4154,13.5,71,1,ford galaxie 500
43 | 14,8,318,150,4096,13,71,1,plymouth fury iii
44 | 12,8,383,180,4955,11.5,71,1,dodge monaco (sw)
45 | 13,8,400,170,4746,12,71,1,ford country squire (sw)
46 | 13,8,400,175,5140,12,71,1,pontiac safari (sw)
47 | 18,6,258,110,2962,13.5,71,1,amc hornet sportabout (sw)
48 | 22,4,140,72,2408,19,71,1,chevrolet vega (sw)
49 | 19,6,250,100,3282,15,71,1,pontiac firebird
50 | 18,6,250,88,3139,14.5,71,1,ford mustang
51 | 23,4,122,86,2220,14,71,1,mercury capri 2000
52 | 28,4,116,90,2123,14,71,2,opel 1900
53 | 30,4,79,70,2074,19.5,71,2,peugeot 304
54 | 30,4,88,76,2065,14.5,71,2,fiat 124b
55 | 31,4,71,65,1773,19,71,3,toyota corolla 1200
56 | 35,4,72,69,1613,18,71,3,datsun 1200
57 | 27,4,97,60,1834,19,71,2,volkswagen model 111
58 | 26,4,91,70,1955,20.5,71,1,plymouth cricket
59 | 24,4,113,95,2278,15.5,72,3,toyota corona hardtop
60 | 25,4,97.5,80,2126,17,72,1,dodge colt hardtop
61 | 23,4,97,54,2254,23.5,72,2,volkswagen type 3
62 | 20,4,140,90,2408,19.5,72,1,chevrolet vega
63 | 21,4,122,86,2226,16.5,72,1,ford pinto runabout
64 | 13,8,350,165,4274,12,72,1,chevrolet impala
65 | 14,8,400,175,4385,12,72,1,pontiac catalina
66 | 15,8,318,150,4135,13.5,72,1,plymouth fury iii
67 | 14,8,351,153,4129,13,72,1,ford galaxie 500
68 | 17,8,304,150,3672,11.5,72,1,amc ambassador sst
69 | 11,8,429,208,4633,11,72,1,mercury marquis
70 | 13,8,350,155,4502,13.5,72,1,buick lesabre custom
71 | 12,8,350,160,4456,13.5,72,1,oldsmobile delta 88 royale
72 | 13,8,400,190,4422,12.5,72,1,chrysler newport royal
73 | 19,3,70,97,2330,13.5,72,3,mazda rx2 coupe
74 | 15,8,304,150,3892,12.5,72,1,amc matador (sw)
75 | 13,8,307,130,4098,14,72,1,chevrolet chevelle concours (sw)
76 | 13,8,302,140,4294,16,72,1,ford gran torino (sw)
77 | 14,8,318,150,4077,14,72,1,plymouth satellite custom (sw)
78 | 18,4,121,112,2933,14.5,72,2,volvo 145e (sw)
79 | 22,4,121,76,2511,18,72,2,volkswagen 411 (sw)
80 | 21,4,120,87,2979,19.5,72,2,peugeot 504 (sw)
81 | 26,4,96,69,2189,18,72,2,renault 12 (sw)
82 | 22,4,122,86,2395,16,72,1,ford pinto (sw)
83 | 28,4,97,92,2288,17,72,3,datsun 510 (sw)
84 | 23,4,120,97,2506,14.5,72,3,toyouta corona mark ii (sw)
85 | 28,4,98,80,2164,15,72,1,dodge colt (sw)
86 | 27,4,97,88,2100,16.5,72,3,toyota corolla 1600 (sw)
87 | 13,8,350,175,4100,13,73,1,buick century 350
88 | 14,8,304,150,3672,11.5,73,1,amc matador
89 | 13,8,350,145,3988,13,73,1,chevrolet malibu
90 | 14,8,302,137,4042,14.5,73,1,ford gran torino
91 | 15,8,318,150,3777,12.5,73,1,dodge coronet custom
92 | 12,8,429,198,4952,11.5,73,1,mercury marquis brougham
93 | 13,8,400,150,4464,12,73,1,chevrolet caprice classic
94 | 13,8,351,158,4363,13,73,1,ford ltd
95 | 14,8,318,150,4237,14.5,73,1,plymouth fury gran sedan
96 | 13,8,440,215,4735,11,73,1,chrysler new yorker brougham
97 | 12,8,455,225,4951,11,73,1,buick electra 225 custom
98 | 13,8,360,175,3821,11,73,1,amc ambassador brougham
99 | 18,6,225,105,3121,16.5,73,1,plymouth valiant
100 | 16,6,250,100,3278,18,73,1,chevrolet nova custom
101 | 18,6,232,100,2945,16,73,1,amc hornet
102 | 18,6,250,88,3021,16.5,73,1,ford maverick
103 | 23,6,198,95,2904,16,73,1,plymouth duster
104 | 26,4,97,46,1950,21,73,2,volkswagen super beetle
105 | 11,8,400,150,4997,14,73,1,chevrolet impala
106 | 12,8,400,167,4906,12.5,73,1,ford country
107 | 13,8,360,170,4654,13,73,1,plymouth custom suburb
108 | 12,8,350,180,4499,12.5,73,1,oldsmobile vista cruiser
109 | 18,6,232,100,2789,15,73,1,amc gremlin
110 | 20,4,97,88,2279,19,73,3,toyota carina
111 | 21,4,140,72,2401,19.5,73,1,chevrolet vega
112 | 22,4,108,94,2379,16.5,73,3,datsun 610
113 | 18,3,70,90,2124,13.5,73,3,maxda rx3
114 | 19,4,122,85,2310,18.5,73,1,ford pinto
115 | 21,6,155,107,2472,14,73,1,mercury capri v6
116 | 26,4,98,90,2265,15.5,73,2,fiat 124 sport coupe
117 | 15,8,350,145,4082,13,73,1,chevrolet monte carlo s
118 | 16,8,400,230,4278,9.5,73,1,pontiac grand prix
119 | 29,4,68,49,1867,19.5,73,2,fiat 128
120 | 24,4,116,75,2158,15.5,73,2,opel manta
121 | 20,4,114,91,2582,14,73,2,audi 100ls
122 | 19,4,121,112,2868,15.5,73,2,volvo 144ea
123 | 15,8,318,150,3399,11,73,1,dodge dart custom
124 | 24,4,121,110,2660,14,73,2,saab 99le
125 | 20,6,156,122,2807,13.5,73,3,toyota mark ii
126 | 11,8,350,180,3664,11,73,1,oldsmobile omega
127 | 20,6,198,95,3102,16.5,74,1,plymouth duster
128 | 21,6,200,?,2875,17,74,1,ford maverick
129 | 19,6,232,100,2901,16,74,1,amc hornet
130 | 15,6,250,100,3336,17,74,1,chevrolet nova
131 | 31,4,79,67,1950,19,74,3,datsun b210
132 | 26,4,122,80,2451,16.5,74,1,ford pinto
133 | 32,4,71,65,1836,21,74,3,toyota corolla 1200
134 | 25,4,140,75,2542,17,74,1,chevrolet vega
135 | 16,6,250,100,3781,17,74,1,chevrolet chevelle malibu classic
136 | 16,6,258,110,3632,18,74,1,amc matador
137 | 18,6,225,105,3613,16.5,74,1,plymouth satellite sebring
138 | 16,8,302,140,4141,14,74,1,ford gran torino
139 | 13,8,350,150,4699,14.5,74,1,buick century luxus (sw)
140 | 14,8,318,150,4457,13.5,74,1,dodge coronet custom (sw)
141 | 14,8,302,140,4638,16,74,1,ford gran torino (sw)
142 | 14,8,304,150,4257,15.5,74,1,amc matador (sw)
143 | 29,4,98,83,2219,16.5,74,2,audi fox
144 | 26,4,79,67,1963,15.5,74,2,volkswagen dasher
145 | 26,4,97,78,2300,14.5,74,2,opel manta
146 | 31,4,76,52,1649,16.5,74,3,toyota corona
147 | 32,4,83,61,2003,19,74,3,datsun 710
148 | 28,4,90,75,2125,14.5,74,1,dodge colt
149 | 24,4,90,75,2108,15.5,74,2,fiat 128
150 | 26,4,116,75,2246,14,74,2,fiat 124 tc
151 | 24,4,120,97,2489,15,74,3,honda civic
152 | 26,4,108,93,2391,15.5,74,3,subaru
153 | 31,4,79,67,2000,16,74,2,fiat x1.9
154 | 19,6,225,95,3264,16,75,1,plymouth valiant custom
155 | 18,6,250,105,3459,16,75,1,chevrolet nova
156 | 15,6,250,72,3432,21,75,1,mercury monarch
157 | 15,6,250,72,3158,19.5,75,1,ford maverick
158 | 16,8,400,170,4668,11.5,75,1,pontiac catalina
159 | 15,8,350,145,4440,14,75,1,chevrolet bel air
160 | 16,8,318,150,4498,14.5,75,1,plymouth grand fury
161 | 14,8,351,148,4657,13.5,75,1,ford ltd
162 | 17,6,231,110,3907,21,75,1,buick century
163 | 16,6,250,105,3897,18.5,75,1,chevroelt chevelle malibu
164 | 15,6,258,110,3730,19,75,1,amc matador
165 | 18,6,225,95,3785,19,75,1,plymouth fury
166 | 21,6,231,110,3039,15,75,1,buick skyhawk
167 | 20,8,262,110,3221,13.5,75,1,chevrolet monza 2+2
168 | 13,8,302,129,3169,12,75,1,ford mustang ii
169 | 29,4,97,75,2171,16,75,3,toyota corolla
170 | 23,4,140,83,2639,17,75,1,ford pinto
171 | 20,6,232,100,2914,16,75,1,amc gremlin
172 | 23,4,140,78,2592,18.5,75,1,pontiac astro
173 | 24,4,134,96,2702,13.5,75,3,toyota corona
174 | 25,4,90,71,2223,16.5,75,2,volkswagen dasher
175 | 24,4,119,97,2545,17,75,3,datsun 710
176 | 18,6,171,97,2984,14.5,75,1,ford pinto
177 | 29,4,90,70,1937,14,75,2,volkswagen rabbit
178 | 19,6,232,90,3211,17,75,1,amc pacer
179 | 23,4,115,95,2694,15,75,2,audi 100ls
180 | 23,4,120,88,2957,17,75,2,peugeot 504
181 | 22,4,121,98,2945,14.5,75,2,volvo 244dl
182 | 25,4,121,115,2671,13.5,75,2,saab 99le
183 | 33,4,91,53,1795,17.5,75,3,honda civic cvcc
184 | 28,4,107,86,2464,15.5,76,2,fiat 131
185 | 25,4,116,81,2220,16.9,76,2,opel 1900
186 | 25,4,140,92,2572,14.9,76,1,capri ii
187 | 26,4,98,79,2255,17.7,76,1,dodge colt
188 | 27,4,101,83,2202,15.3,76,2,renault 12tl
189 | 17.5,8,305,140,4215,13,76,1,chevrolet chevelle malibu classic
190 | 16,8,318,150,4190,13,76,1,dodge coronet brougham
191 | 15.5,8,304,120,3962,13.9,76,1,amc matador
192 | 14.5,8,351,152,4215,12.8,76,1,ford gran torino
193 | 22,6,225,100,3233,15.4,76,1,plymouth valiant
194 | 22,6,250,105,3353,14.5,76,1,chevrolet nova
195 | 24,6,200,81,3012,17.6,76,1,ford maverick
196 | 22.5,6,232,90,3085,17.6,76,1,amc hornet
197 | 29,4,85,52,2035,22.2,76,1,chevrolet chevette
198 | 24.5,4,98,60,2164,22.1,76,1,chevrolet woody
199 | 29,4,90,70,1937,14.2,76,2,vw rabbit
200 | 33,4,91,53,1795,17.4,76,3,honda civic
201 | 20,6,225,100,3651,17.7,76,1,dodge aspen se
202 | 18,6,250,78,3574,21,76,1,ford granada ghia
203 | 18.5,6,250,110,3645,16.2,76,1,pontiac ventura sj
204 | 17.5,6,258,95,3193,17.8,76,1,amc pacer d/l
205 | 29.5,4,97,71,1825,12.2,76,2,volkswagen rabbit
206 | 32,4,85,70,1990,17,76,3,datsun b-210
207 | 28,4,97,75,2155,16.4,76,3,toyota corolla
208 | 26.5,4,140,72,2565,13.6,76,1,ford pinto
209 | 20,4,130,102,3150,15.7,76,2,volvo 245
210 | 13,8,318,150,3940,13.2,76,1,plymouth volare premier v8
211 | 19,4,120,88,3270,21.9,76,2,peugeot 504
212 | 19,6,156,108,2930,15.5,76,3,toyota mark ii
213 | 16.5,6,168,120,3820,16.7,76,2,mercedes-benz 280s
214 | 16.5,8,350,180,4380,12.1,76,1,cadillac seville
215 | 13,8,350,145,4055,12,76,1,chevy c10
216 | 13,8,302,130,3870,15,76,1,ford f108
217 | 13,8,318,150,3755,14,76,1,dodge d100
218 | 31.5,4,98,68,2045,18.5,77,3,honda accord cvcc
219 | 30,4,111,80,2155,14.8,77,1,buick opel isuzu deluxe
220 | 36,4,79,58,1825,18.6,77,2,renault 5 gtl
221 | 25.5,4,122,96,2300,15.5,77,1,plymouth arrow gs
222 | 33.5,4,85,70,1945,16.8,77,3,datsun f-10 hatchback
223 | 17.5,8,305,145,3880,12.5,77,1,chevrolet caprice classic
224 | 17,8,260,110,4060,19,77,1,oldsmobile cutlass supreme
225 | 15.5,8,318,145,4140,13.7,77,1,dodge monaco brougham
226 | 15,8,302,130,4295,14.9,77,1,mercury cougar brougham
227 | 17.5,6,250,110,3520,16.4,77,1,chevrolet concours
228 | 20.5,6,231,105,3425,16.9,77,1,buick skylark
229 | 19,6,225,100,3630,17.7,77,1,plymouth volare custom
230 | 18.5,6,250,98,3525,19,77,1,ford granada
231 | 16,8,400,180,4220,11.1,77,1,pontiac grand prix lj
232 | 15.5,8,350,170,4165,11.4,77,1,chevrolet monte carlo landau
233 | 15.5,8,400,190,4325,12.2,77,1,chrysler cordoba
234 | 16,8,351,149,4335,14.5,77,1,ford thunderbird
235 | 29,4,97,78,1940,14.5,77,2,volkswagen rabbit custom
236 | 24.5,4,151,88,2740,16,77,1,pontiac sunbird coupe
237 | 26,4,97,75,2265,18.2,77,3,toyota corolla liftback
238 | 25.5,4,140,89,2755,15.8,77,1,ford mustang ii 2+2
239 | 30.5,4,98,63,2051,17,77,1,chevrolet chevette
240 | 33.5,4,98,83,2075,15.9,77,1,dodge colt m/m
241 | 30,4,97,67,1985,16.4,77,3,subaru dl
242 | 30.5,4,97,78,2190,14.1,77,2,volkswagen dasher
243 | 22,6,146,97,2815,14.5,77,3,datsun 810
244 | 21.5,4,121,110,2600,12.8,77,2,bmw 320i
245 | 21.5,3,80,110,2720,13.5,77,3,mazda rx-4
246 | 43.1,4,90,48,1985,21.5,78,2,volkswagen rabbit custom diesel
247 | 36.1,4,98,66,1800,14.4,78,1,ford fiesta
248 | 32.8,4,78,52,1985,19.4,78,3,mazda glc deluxe
249 | 39.4,4,85,70,2070,18.6,78,3,datsun b210 gx
250 | 36.1,4,91,60,1800,16.4,78,3,honda civic cvcc
251 | 19.9,8,260,110,3365,15.5,78,1,oldsmobile cutlass salon brougham
252 | 19.4,8,318,140,3735,13.2,78,1,dodge diplomat
253 | 20.2,8,302,139,3570,12.8,78,1,mercury monarch ghia
254 | 19.2,6,231,105,3535,19.2,78,1,pontiac phoenix lj
255 | 20.5,6,200,95,3155,18.2,78,1,chevrolet malibu
256 | 20.2,6,200,85,2965,15.8,78,1,ford fairmont (auto)
257 | 25.1,4,140,88,2720,15.4,78,1,ford fairmont (man)
258 | 20.5,6,225,100,3430,17.2,78,1,plymouth volare
259 | 19.4,6,232,90,3210,17.2,78,1,amc concord
260 | 20.6,6,231,105,3380,15.8,78,1,buick century special
261 | 20.8,6,200,85,3070,16.7,78,1,mercury zephyr
262 | 18.6,6,225,110,3620,18.7,78,1,dodge aspen
263 | 18.1,6,258,120,3410,15.1,78,1,amc concord d/l
264 | 19.2,8,305,145,3425,13.2,78,1,chevrolet monte carlo landau
265 | 17.7,6,231,165,3445,13.4,78,1,buick regal sport coupe (turbo)
266 | 18.1,8,302,139,3205,11.2,78,1,ford futura
267 | 17.5,8,318,140,4080,13.7,78,1,dodge magnum xe
268 | 30,4,98,68,2155,16.5,78,1,chevrolet chevette
269 | 27.5,4,134,95,2560,14.2,78,3,toyota corona
270 | 27.2,4,119,97,2300,14.7,78,3,datsun 510
271 | 30.9,4,105,75,2230,14.5,78,1,dodge omni
272 | 21.1,4,134,95,2515,14.8,78,3,toyota celica gt liftback
273 | 23.2,4,156,105,2745,16.7,78,1,plymouth sapporo
274 | 23.8,4,151,85,2855,17.6,78,1,oldsmobile starfire sx
275 | 23.9,4,119,97,2405,14.9,78,3,datsun 200-sx
276 | 20.3,5,131,103,2830,15.9,78,2,audi 5000
277 | 17,6,163,125,3140,13.6,78,2,volvo 264gl
278 | 21.6,4,121,115,2795,15.7,78,2,saab 99gle
279 | 16.2,6,163,133,3410,15.8,78,2,peugeot 604sl
280 | 31.5,4,89,71,1990,14.9,78,2,volkswagen scirocco
281 | 29.5,4,98,68,2135,16.6,78,3,honda accord lx
282 | 21.5,6,231,115,3245,15.4,79,1,pontiac lemans v6
283 | 19.8,6,200,85,2990,18.2,79,1,mercury zephyr 6
284 | 22.3,4,140,88,2890,17.3,79,1,ford fairmont 4
285 | 20.2,6,232,90,3265,18.2,79,1,amc concord dl 6
286 | 20.6,6,225,110,3360,16.6,79,1,dodge aspen 6
287 | 17,8,305,130,3840,15.4,79,1,chevrolet caprice classic
288 | 17.6,8,302,129,3725,13.4,79,1,ford ltd landau
289 | 16.5,8,351,138,3955,13.2,79,1,mercury grand marquis
290 | 18.2,8,318,135,3830,15.2,79,1,dodge st. regis
291 | 16.9,8,350,155,4360,14.9,79,1,buick estate wagon (sw)
292 | 15.5,8,351,142,4054,14.3,79,1,ford country squire (sw)
293 | 19.2,8,267,125,3605,15,79,1,chevrolet malibu classic (sw)
294 | 18.5,8,360,150,3940,13,79,1,chrysler lebaron town @ country (sw)
295 | 31.9,4,89,71,1925,14,79,2,vw rabbit custom
296 | 34.1,4,86,65,1975,15.2,79,3,maxda glc deluxe
297 | 35.7,4,98,80,1915,14.4,79,1,dodge colt hatchback custom
298 | 27.4,4,121,80,2670,15,79,1,amc spirit dl
299 | 25.4,5,183,77,3530,20.1,79,2,mercedes benz 300d
300 | 23,8,350,125,3900,17.4,79,1,cadillac eldorado
301 | 27.2,4,141,71,3190,24.8,79,2,peugeot 504
302 | 23.9,8,260,90,3420,22.2,79,1,oldsmobile cutlass salon brougham
303 | 34.2,4,105,70,2200,13.2,79,1,plymouth horizon
304 | 34.5,4,105,70,2150,14.9,79,1,plymouth horizon tc3
305 | 31.8,4,85,65,2020,19.2,79,3,datsun 210
306 | 37.3,4,91,69,2130,14.7,79,2,fiat strada custom
307 | 28.4,4,151,90,2670,16,79,1,buick skylark limited
308 | 28.8,6,173,115,2595,11.3,79,1,chevrolet citation
309 | 26.8,6,173,115,2700,12.9,79,1,oldsmobile omega brougham
310 | 33.5,4,151,90,2556,13.2,79,1,pontiac phoenix
311 | 41.5,4,98,76,2144,14.7,80,2,vw rabbit
312 | 38.1,4,89,60,1968,18.8,80,3,toyota corolla tercel
313 | 32.1,4,98,70,2120,15.5,80,1,chevrolet chevette
314 | 37.2,4,86,65,2019,16.4,80,3,datsun 310
315 | 28,4,151,90,2678,16.5,80,1,chevrolet citation
316 | 26.4,4,140,88,2870,18.1,80,1,ford fairmont
317 | 24.3,4,151,90,3003,20.1,80,1,amc concord
318 | 19.1,6,225,90,3381,18.7,80,1,dodge aspen
319 | 34.3,4,97,78,2188,15.8,80,2,audi 4000
320 | 29.8,4,134,90,2711,15.5,80,3,toyota corona liftback
321 | 31.3,4,120,75,2542,17.5,80,3,mazda 626
322 | 37,4,119,92,2434,15,80,3,datsun 510 hatchback
323 | 32.2,4,108,75,2265,15.2,80,3,toyota corolla
324 | 46.6,4,86,65,2110,17.9,80,3,mazda glc
325 | 27.9,4,156,105,2800,14.4,80,1,dodge colt
326 | 40.8,4,85,65,2110,19.2,80,3,datsun 210
327 | 44.3,4,90,48,2085,21.7,80,2,vw rabbit c (diesel)
328 | 43.4,4,90,48,2335,23.7,80,2,vw dasher (diesel)
329 | 36.4,5,121,67,2950,19.9,80,2,audi 5000s (diesel)
330 | 30,4,146,67,3250,21.8,80,2,mercedes-benz 240d
331 | 44.6,4,91,67,1850,13.8,80,3,honda civic 1500 gl
332 | 40.9,4,85,?,1835,17.3,80,2,renault lecar deluxe
333 | 33.8,4,97,67,2145,18,80,3,subaru dl
334 | 29.8,4,89,62,1845,15.3,80,2,vokswagen rabbit
335 | 32.7,6,168,132,2910,11.4,80,3,datsun 280-zx
336 | 23.7,3,70,100,2420,12.5,80,3,mazda rx-7 gs
337 | 35,4,122,88,2500,15.1,80,2,triumph tr7 coupe
338 | 23.6,4,140,?,2905,14.3,80,1,ford mustang cobra
339 | 32.4,4,107,72,2290,17,80,3,honda accord
340 | 27.2,4,135,84,2490,15.7,81,1,plymouth reliant
341 | 26.6,4,151,84,2635,16.4,81,1,buick skylark
342 | 25.8,4,156,92,2620,14.4,81,1,dodge aries wagon (sw)
343 | 23.5,6,173,110,2725,12.6,81,1,chevrolet citation
344 | 30,4,135,84,2385,12.9,81,1,plymouth reliant
345 | 39.1,4,79,58,1755,16.9,81,3,toyota starlet
346 | 39,4,86,64,1875,16.4,81,1,plymouth champ
347 | 35.1,4,81,60,1760,16.1,81,3,honda civic 1300
348 | 32.3,4,97,67,2065,17.8,81,3,subaru
349 | 37,4,85,65,1975,19.4,81,3,datsun 210 mpg
350 | 37.7,4,89,62,2050,17.3,81,3,toyota tercel
351 | 34.1,4,91,68,1985,16,81,3,mazda glc 4
352 | 34.7,4,105,63,2215,14.9,81,1,plymouth horizon 4
353 | 34.4,4,98,65,2045,16.2,81,1,ford escort 4w
354 | 29.9,4,98,65,2380,20.7,81,1,ford escort 2h
355 | 33,4,105,74,2190,14.2,81,2,volkswagen jetta
356 | 34.5,4,100,?,2320,15.8,81,2,renault 18i
357 | 33.7,4,107,75,2210,14.4,81,3,honda prelude
358 | 32.4,4,108,75,2350,16.8,81,3,toyota corolla
359 | 32.9,4,119,100,2615,14.8,81,3,datsun 200sx
360 | 31.6,4,120,74,2635,18.3,81,3,mazda 626
361 | 28.1,4,141,80,3230,20.4,81,2,peugeot 505s turbo diesel
362 | 30.7,6,145,76,3160,19.6,81,2,volvo diesel
363 | 25.4,6,168,116,2900,12.6,81,3,toyota cressida
364 | 24.2,6,146,120,2930,13.8,81,3,datsun 810 maxima
365 | 22.4,6,231,110,3415,15.8,81,1,buick century
366 | 26.6,8,350,105,3725,19,81,1,oldsmobile cutlass ls
367 | 20.2,6,200,88,3060,17.1,81,1,ford granada gl
368 | 17.6,6,225,85,3465,16.6,81,1,chrysler lebaron salon
369 | 28,4,112,88,2605,19.6,82,1,chevrolet cavalier
370 | 27,4,112,88,2640,18.6,82,1,chevrolet cavalier wagon
371 | 34,4,112,88,2395,18,82,1,chevrolet cavalier 2-door
372 | 31,4,112,85,2575,16.2,82,1,pontiac j2000 se hatchback
373 | 29,4,135,84,2525,16,82,1,dodge aries se
374 | 27,4,151,90,2735,18,82,1,pontiac phoenix
375 | 24,4,140,92,2865,16.4,82,1,ford fairmont futura
376 | 23,4,151,?,3035,20.5,82,1,amc concord dl
377 | 36,4,105,74,1980,15.3,82,2,volkswagen rabbit l
378 | 37,4,91,68,2025,18.2,82,3,mazda glc custom l
379 | 31,4,91,68,1970,17.6,82,3,mazda glc custom
380 | 38,4,105,63,2125,14.7,82,1,plymouth horizon miser
381 | 36,4,98,70,2125,17.3,82,1,mercury lynx l
382 | 36,4,120,88,2160,14.5,82,3,nissan stanza xe
383 | 36,4,107,75,2205,14.5,82,3,honda accord
384 | 34,4,108,70,2245,16.9,82,3,toyota corolla
385 | 38,4,91,67,1965,15,82,3,honda civic
386 | 32,4,91,67,1965,15.7,82,3,honda civic (auto)
387 | 38,4,91,67,1995,16.2,82,3,datsun 310 gx
388 | 25,6,181,110,2945,16.4,82,1,buick century limited
389 | 38,6,262,85,3015,17,82,1,oldsmobile cutlass ciera (diesel)
390 | 26,4,156,92,2585,14.5,82,1,chrysler lebaron medallion
391 | 22,6,232,112,2835,14.7,82,1,ford granada l
392 | 32,4,144,96,2665,13.9,82,3,toyota celica gt
393 | 36,4,135,84,2370,13,82,1,dodge charger 2.2
394 | 27,4,151,90,2950,17.3,82,1,chevrolet camaro
395 | 27,4,140,86,2790,15.6,82,1,ford mustang gl
396 | 44,4,97,52,2130,24.6,82,2,vw pickup
397 | 32,4,135,84,2295,11.6,82,1,dodge rampage
398 | 28,4,120,79,2625,18.6,82,1,ford ranger
399 | 31,4,119,82,2720,19.4,82,1,chevy s-10
400 |
--------------------------------------------------------------------------------
/Chapter09/auto-mpg.data:
--------------------------------------------------------------------------------
1 | 18.0 8 307.0 130.0 3504. 12.0 70 1 "chevrolet chevelle malibu"
2 | 15.0 8 350.0 165.0 3693. 11.5 70 1 "buick skylark 320"
3 | 18.0 8 318.0 150.0 3436. 11.0 70 1 "plymouth satellite"
4 | 16.0 8 304.0 150.0 3433. 12.0 70 1 "amc rebel sst"
5 | 17.0 8 302.0 140.0 3449. 10.5 70 1 "ford torino"
6 | 15.0 8 429.0 198.0 4341. 10.0 70 1 "ford galaxie 500"
7 | 14.0 8 454.0 220.0 4354. 9.0 70 1 "chevrolet impala"
8 | 14.0 8 440.0 215.0 4312. 8.5 70 1 "plymouth fury iii"
9 | 14.0 8 455.0 225.0 4425. 10.0 70 1 "pontiac catalina"
10 | 15.0 8 390.0 190.0 3850. 8.5 70 1 "amc ambassador dpl"
11 | 15.0 8 383.0 170.0 3563. 10.0 70 1 "dodge challenger se"
12 | 14.0 8 340.0 160.0 3609. 8.0 70 1 "plymouth 'cuda 340"
13 | 15.0 8 400.0 150.0 3761. 9.5 70 1 "chevrolet monte carlo"
14 | 14.0 8 455.0 225.0 3086. 10.0 70 1 "buick estate wagon (sw)"
15 | 24.0 4 113.0 95.00 2372. 15.0 70 3 "toyota corona mark ii"
16 | 22.0 6 198.0 95.00 2833. 15.5 70 1 "plymouth duster"
17 | 18.0 6 199.0 97.00 2774. 15.5 70 1 "amc hornet"
18 | 21.0 6 200.0 85.00 2587. 16.0 70 1 "ford maverick"
19 | 27.0 4 97.00 88.00 2130. 14.5 70 3 "datsun pl510"
20 | 26.0 4 97.00 46.00 1835. 20.5 70 2 "volkswagen 1131 deluxe sedan"
21 | 25.0 4 110.0 87.00 2672. 17.5 70 2 "peugeot 504"
22 | 24.0 4 107.0 90.00 2430. 14.5 70 2 "audi 100 ls"
23 | 25.0 4 104.0 95.00 2375. 17.5 70 2 "saab 99e"
24 | 26.0 4 121.0 113.0 2234. 12.5 70 2 "bmw 2002"
25 | 21.0 6 199.0 90.00 2648. 15.0 70 1 "amc gremlin"
26 | 10.0 8 360.0 215.0 4615. 14.0 70 1 "ford f250"
27 | 10.0 8 307.0 200.0 4376. 15.0 70 1 "chevy c20"
28 | 11.0 8 318.0 210.0 4382. 13.5 70 1 "dodge d200"
29 | 9.0 8 304.0 193.0 4732. 18.5 70 1 "hi 1200d"
30 | 27.0 4 97.00 88.00 2130. 14.5 71 3 "datsun pl510"
31 | 28.0 4 140.0 90.00 2264. 15.5 71 1 "chevrolet vega 2300"
32 | 25.0 4 113.0 95.00 2228. 14.0 71 3 "toyota corona"
33 | 25.0 4 98.00 ? 2046. 19.0 71 1 "ford pinto"
34 | 19.0 6 232.0 100.0 2634. 13.0 71 1 "amc gremlin"
35 | 16.0 6 225.0 105.0 3439. 15.5 71 1 "plymouth satellite custom"
36 | 17.0 6 250.0 100.0 3329. 15.5 71 1 "chevrolet chevelle malibu"
37 | 19.0 6 250.0 88.00 3302. 15.5 71 1 "ford torino 500"
38 | 18.0 6 232.0 100.0 3288. 15.5 71 1 "amc matador"
39 | 14.0 8 350.0 165.0 4209. 12.0 71 1 "chevrolet impala"
40 | 14.0 8 400.0 175.0 4464. 11.5 71 1 "pontiac catalina brougham"
41 | 14.0 8 351.0 153.0 4154. 13.5 71 1 "ford galaxie 500"
42 | 14.0 8 318.0 150.0 4096. 13.0 71 1 "plymouth fury iii"
43 | 12.0 8 383.0 180.0 4955. 11.5 71 1 "dodge monaco (sw)"
44 | 13.0 8 400.0 170.0 4746. 12.0 71 1 "ford country squire (sw)"
45 | 13.0 8 400.0 175.0 5140. 12.0 71 1 "pontiac safari (sw)"
46 | 18.0 6 258.0 110.0 2962. 13.5 71 1 "amc hornet sportabout (sw)"
47 | 22.0 4 140.0 72.00 2408. 19.0 71 1 "chevrolet vega (sw)"
48 | 19.0 6 250.0 100.0 3282. 15.0 71 1 "pontiac firebird"
49 | 18.0 6 250.0 88.00 3139. 14.5 71 1 "ford mustang"
50 | 23.0 4 122.0 86.00 2220. 14.0 71 1 "mercury capri 2000"
51 | 28.0 4 116.0 90.00 2123. 14.0 71 2 "opel 1900"
52 | 30.0 4 79.00 70.00 2074. 19.5 71 2 "peugeot 304"
53 | 30.0 4 88.00 76.00 2065. 14.5 71 2 "fiat 124b"
54 | 31.0 4 71.00 65.00 1773. 19.0 71 3 "toyota corolla 1200"
55 | 35.0 4 72.00 69.00 1613. 18.0 71 3 "datsun 1200"
56 | 27.0 4 97.00 60.00 1834. 19.0 71 2 "volkswagen model 111"
57 | 26.0 4 91.00 70.00 1955. 20.5 71 1 "plymouth cricket"
58 | 24.0 4 113.0 95.00 2278. 15.5 72 3 "toyota corona hardtop"
59 | 25.0 4 97.50 80.00 2126. 17.0 72 1 "dodge colt hardtop"
60 | 23.0 4 97.00 54.00 2254. 23.5 72 2 "volkswagen type 3"
61 | 20.0 4 140.0 90.00 2408. 19.5 72 1 "chevrolet vega"
62 | 21.0 4 122.0 86.00 2226. 16.5 72 1 "ford pinto runabout"
63 | 13.0 8 350.0 165.0 4274. 12.0 72 1 "chevrolet impala"
64 | 14.0 8 400.0 175.0 4385. 12.0 72 1 "pontiac catalina"
65 | 15.0 8 318.0 150.0 4135. 13.5 72 1 "plymouth fury iii"
66 | 14.0 8 351.0 153.0 4129. 13.0 72 1 "ford galaxie 500"
67 | 17.0 8 304.0 150.0 3672. 11.5 72 1 "amc ambassador sst"
68 | 11.0 8 429.0 208.0 4633. 11.0 72 1 "mercury marquis"
69 | 13.0 8 350.0 155.0 4502. 13.5 72 1 "buick lesabre custom"
70 | 12.0 8 350.0 160.0 4456. 13.5 72 1 "oldsmobile delta 88 royale"
71 | 13.0 8 400.0 190.0 4422. 12.5 72 1 "chrysler newport royal"
72 | 19.0 3 70.00 97.00 2330. 13.5 72 3 "mazda rx2 coupe"
73 | 15.0 8 304.0 150.0 3892. 12.5 72 1 "amc matador (sw)"
74 | 13.0 8 307.0 130.0 4098. 14.0 72 1 "chevrolet chevelle concours (sw)"
75 | 13.0 8 302.0 140.0 4294. 16.0 72 1 "ford gran torino (sw)"
76 | 14.0 8 318.0 150.0 4077. 14.0 72 1 "plymouth satellite custom (sw)"
77 | 18.0 4 121.0 112.0 2933. 14.5 72 2 "volvo 145e (sw)"
78 | 22.0 4 121.0 76.00 2511. 18.0 72 2 "volkswagen 411 (sw)"
79 | 21.0 4 120.0 87.00 2979. 19.5 72 2 "peugeot 504 (sw)"
80 | 26.0 4 96.00 69.00 2189. 18.0 72 2 "renault 12 (sw)"
81 | 22.0 4 122.0 86.00 2395. 16.0 72 1 "ford pinto (sw)"
82 | 28.0 4 97.00 92.00 2288. 17.0 72 3 "datsun 510 (sw)"
83 | 23.0 4 120.0 97.00 2506. 14.5 72 3 "toyouta corona mark ii (sw)"
84 | 28.0 4 98.00 80.00 2164. 15.0 72 1 "dodge colt (sw)"
85 | 27.0 4 97.00 88.00 2100. 16.5 72 3 "toyota corolla 1600 (sw)"
86 | 13.0 8 350.0 175.0 4100. 13.0 73 1 "buick century 350"
87 | 14.0 8 304.0 150.0 3672. 11.5 73 1 "amc matador"
88 | 13.0 8 350.0 145.0 3988. 13.0 73 1 "chevrolet malibu"
89 | 14.0 8 302.0 137.0 4042. 14.5 73 1 "ford gran torino"
90 | 15.0 8 318.0 150.0 3777. 12.5 73 1 "dodge coronet custom"
91 | 12.0 8 429.0 198.0 4952. 11.5 73 1 "mercury marquis brougham"
92 | 13.0 8 400.0 150.0 4464. 12.0 73 1 "chevrolet caprice classic"
93 | 13.0 8 351.0 158.0 4363. 13.0 73 1 "ford ltd"
94 | 14.0 8 318.0 150.0 4237. 14.5 73 1 "plymouth fury gran sedan"
95 | 13.0 8 440.0 215.0 4735. 11.0 73 1 "chrysler new yorker brougham"
96 | 12.0 8 455.0 225.0 4951. 11.0 73 1 "buick electra 225 custom"
97 | 13.0 8 360.0 175.0 3821. 11.0 73 1 "amc ambassador brougham"
98 | 18.0 6 225.0 105.0 3121. 16.5 73 1 "plymouth valiant"
99 | 16.0 6 250.0 100.0 3278. 18.0 73 1 "chevrolet nova custom"
100 | 18.0 6 232.0 100.0 2945. 16.0 73 1 "amc hornet"
101 | 18.0 6 250.0 88.00 3021. 16.5 73 1 "ford maverick"
102 | 23.0 6 198.0 95.00 2904. 16.0 73 1 "plymouth duster"
103 | 26.0 4 97.00 46.00 1950. 21.0 73 2 "volkswagen super beetle"
104 | 11.0 8 400.0 150.0 4997. 14.0 73 1 "chevrolet impala"
105 | 12.0 8 400.0 167.0 4906. 12.5 73 1 "ford country"
106 | 13.0 8 360.0 170.0 4654. 13.0 73 1 "plymouth custom suburb"
107 | 12.0 8 350.0 180.0 4499. 12.5 73 1 "oldsmobile vista cruiser"
108 | 18.0 6 232.0 100.0 2789. 15.0 73 1 "amc gremlin"
109 | 20.0 4 97.00 88.00 2279. 19.0 73 3 "toyota carina"
110 | 21.0 4 140.0 72.00 2401. 19.5 73 1 "chevrolet vega"
111 | 22.0 4 108.0 94.00 2379. 16.5 73 3 "datsun 610"
112 | 18.0 3 70.00 90.00 2124. 13.5 73 3 "maxda rx3"
113 | 19.0 4 122.0 85.00 2310. 18.5 73 1 "ford pinto"
114 | 21.0 6 155.0 107.0 2472. 14.0 73 1 "mercury capri v6"
115 | 26.0 4 98.00 90.00 2265. 15.5 73 2 "fiat 124 sport coupe"
116 | 15.0 8 350.0 145.0 4082. 13.0 73 1 "chevrolet monte carlo s"
117 | 16.0 8 400.0 230.0 4278. 9.50 73 1 "pontiac grand prix"
118 | 29.0 4 68.00 49.00 1867. 19.5 73 2 "fiat 128"
119 | 24.0 4 116.0 75.00 2158. 15.5 73 2 "opel manta"
120 | 20.0 4 114.0 91.00 2582. 14.0 73 2 "audi 100ls"
121 | 19.0 4 121.0 112.0 2868. 15.5 73 2 "volvo 144ea"
122 | 15.0 8 318.0 150.0 3399. 11.0 73 1 "dodge dart custom"
123 | 24.0 4 121.0 110.0 2660. 14.0 73 2 "saab 99le"
124 | 20.0 6 156.0 122.0 2807. 13.5 73 3 "toyota mark ii"
125 | 11.0 8 350.0 180.0 3664. 11.0 73 1 "oldsmobile omega"
126 | 20.0 6 198.0 95.00 3102. 16.5 74 1 "plymouth duster"
127 | 21.0 6 200.0 ? 2875. 17.0 74 1 "ford maverick"
128 | 19.0 6 232.0 100.0 2901. 16.0 74 1 "amc hornet"
129 | 15.0 6 250.0 100.0 3336. 17.0 74 1 "chevrolet nova"
130 | 31.0 4 79.00 67.00 1950. 19.0 74 3 "datsun b210"
131 | 26.0 4 122.0 80.00 2451. 16.5 74 1 "ford pinto"
132 | 32.0 4 71.00 65.00 1836. 21.0 74 3 "toyota corolla 1200"
133 | 25.0 4 140.0 75.00 2542. 17.0 74 1 "chevrolet vega"
134 | 16.0 6 250.0 100.0 3781. 17.0 74 1 "chevrolet chevelle malibu classic"
135 | 16.0 6 258.0 110.0 3632. 18.0 74 1 "amc matador"
136 | 18.0 6 225.0 105.0 3613. 16.5 74 1 "plymouth satellite sebring"
137 | 16.0 8 302.0 140.0 4141. 14.0 74 1 "ford gran torino"
138 | 13.0 8 350.0 150.0 4699. 14.5 74 1 "buick century luxus (sw)"
139 | 14.0 8 318.0 150.0 4457. 13.5 74 1 "dodge coronet custom (sw)"
140 | 14.0 8 302.0 140.0 4638. 16.0 74 1 "ford gran torino (sw)"
141 | 14.0 8 304.0 150.0 4257. 15.5 74 1 "amc matador (sw)"
142 | 29.0 4 98.00 83.00 2219. 16.5 74 2 "audi fox"
143 | 26.0 4 79.00 67.00 1963. 15.5 74 2 "volkswagen dasher"
144 | 26.0 4 97.00 78.00 2300. 14.5 74 2 "opel manta"
145 | 31.0 4 76.00 52.00 1649. 16.5 74 3 "toyota corona"
146 | 32.0 4 83.00 61.00 2003. 19.0 74 3 "datsun 710"
147 | 28.0 4 90.00 75.00 2125. 14.5 74 1 "dodge colt"
148 | 24.0 4 90.00 75.00 2108. 15.5 74 2 "fiat 128"
149 | 26.0 4 116.0 75.00 2246. 14.0 74 2 "fiat 124 tc"
150 | 24.0 4 120.0 97.00 2489. 15.0 74 3 "honda civic"
151 | 26.0 4 108.0 93.00 2391. 15.5 74 3 "subaru"
152 | 31.0 4 79.00 67.00 2000. 16.0 74 2 "fiat x1.9"
153 | 19.0 6 225.0 95.00 3264. 16.0 75 1 "plymouth valiant custom"
154 | 18.0 6 250.0 105.0 3459. 16.0 75 1 "chevrolet nova"
155 | 15.0 6 250.0 72.00 3432. 21.0 75 1 "mercury monarch"
156 | 15.0 6 250.0 72.00 3158. 19.5 75 1 "ford maverick"
157 | 16.0 8 400.0 170.0 4668. 11.5 75 1 "pontiac catalina"
158 | 15.0 8 350.0 145.0 4440. 14.0 75 1 "chevrolet bel air"
159 | 16.0 8 318.0 150.0 4498. 14.5 75 1 "plymouth grand fury"
160 | 14.0 8 351.0 148.0 4657. 13.5 75 1 "ford ltd"
161 | 17.0 6 231.0 110.0 3907. 21.0 75 1 "buick century"
162 | 16.0 6 250.0 105.0 3897. 18.5 75 1 "chevroelt chevelle malibu"
163 | 15.0 6 258.0 110.0 3730. 19.0 75 1 "amc matador"
164 | 18.0 6 225.0 95.00 3785. 19.0 75 1 "plymouth fury"
165 | 21.0 6 231.0 110.0 3039. 15.0 75 1 "buick skyhawk"
166 | 20.0 8 262.0 110.0 3221. 13.5 75 1 "chevrolet monza 2+2"
167 | 13.0 8 302.0 129.0 3169. 12.0 75 1 "ford mustang ii"
168 | 29.0 4 97.00 75.00 2171. 16.0 75 3 "toyota corolla"
169 | 23.0 4 140.0 83.00 2639. 17.0 75 1 "ford pinto"
170 | 20.0 6 232.0 100.0 2914. 16.0 75 1 "amc gremlin"
171 | 23.0 4 140.0 78.00 2592. 18.5 75 1 "pontiac astro"
172 | 24.0 4 134.0 96.00 2702. 13.5 75 3 "toyota corona"
173 | 25.0 4 90.00 71.00 2223. 16.5 75 2 "volkswagen dasher"
174 | 24.0 4 119.0 97.00 2545. 17.0 75 3 "datsun 710"
175 | 18.0 6 171.0 97.00 2984. 14.5 75 1 "ford pinto"
176 | 29.0 4 90.00 70.00 1937. 14.0 75 2 "volkswagen rabbit"
177 | 19.0 6 232.0 90.00 3211. 17.0 75 1 "amc pacer"
178 | 23.0 4 115.0 95.00 2694. 15.0 75 2 "audi 100ls"
179 | 23.0 4 120.0 88.00 2957. 17.0 75 2 "peugeot 504"
180 | 22.0 4 121.0 98.00 2945. 14.5 75 2 "volvo 244dl"
181 | 25.0 4 121.0 115.0 2671. 13.5 75 2 "saab 99le"
182 | 33.0 4 91.00 53.00 1795. 17.5 75 3 "honda civic cvcc"
183 | 28.0 4 107.0 86.00 2464. 15.5 76 2 "fiat 131"
184 | 25.0 4 116.0 81.00 2220. 16.9 76 2 "opel 1900"
185 | 25.0 4 140.0 92.00 2572. 14.9 76 1 "capri ii"
186 | 26.0 4 98.00 79.00 2255. 17.7 76 1 "dodge colt"
187 | 27.0 4 101.0 83.00 2202. 15.3 76 2 "renault 12tl"
188 | 17.5 8 305.0 140.0 4215. 13.0 76 1 "chevrolet chevelle malibu classic"
189 | 16.0 8 318.0 150.0 4190. 13.0 76 1 "dodge coronet brougham"
190 | 15.5 8 304.0 120.0 3962. 13.9 76 1 "amc matador"
191 | 14.5 8 351.0 152.0 4215. 12.8 76 1 "ford gran torino"
192 | 22.0 6 225.0 100.0 3233. 15.4 76 1 "plymouth valiant"
193 | 22.0 6 250.0 105.0 3353. 14.5 76 1 "chevrolet nova"
194 | 24.0 6 200.0 81.00 3012. 17.6 76 1 "ford maverick"
195 | 22.5 6 232.0 90.00 3085. 17.6 76 1 "amc hornet"
196 | 29.0 4 85.00 52.00 2035. 22.2 76 1 "chevrolet chevette"
197 | 24.5 4 98.00 60.00 2164. 22.1 76 1 "chevrolet woody"
198 | 29.0 4 90.00 70.00 1937. 14.2 76 2 "vw rabbit"
199 | 33.0 4 91.00 53.00 1795. 17.4 76 3 "honda civic"
200 | 20.0 6 225.0 100.0 3651. 17.7 76 1 "dodge aspen se"
201 | 18.0 6 250.0 78.00 3574. 21.0 76 1 "ford granada ghia"
202 | 18.5 6 250.0 110.0 3645. 16.2 76 1 "pontiac ventura sj"
203 | 17.5 6 258.0 95.00 3193. 17.8 76 1 "amc pacer d/l"
204 | 29.5 4 97.00 71.00 1825. 12.2 76 2 "volkswagen rabbit"
205 | 32.0 4 85.00 70.00 1990. 17.0 76 3 "datsun b-210"
206 | 28.0 4 97.00 75.00 2155. 16.4 76 3 "toyota corolla"
207 | 26.5 4 140.0 72.00 2565. 13.6 76 1 "ford pinto"
208 | 20.0 4 130.0 102.0 3150. 15.7 76 2 "volvo 245"
209 | 13.0 8 318.0 150.0 3940. 13.2 76 1 "plymouth volare premier v8"
210 | 19.0 4 120.0 88.00 3270. 21.9 76 2 "peugeot 504"
211 | 19.0 6 156.0 108.0 2930. 15.5 76 3 "toyota mark ii"
212 | 16.5 6 168.0 120.0 3820. 16.7 76 2 "mercedes-benz 280s"
213 | 16.5 8 350.0 180.0 4380. 12.1 76 1 "cadillac seville"
214 | 13.0 8 350.0 145.0 4055. 12.0 76 1 "chevy c10"
215 | 13.0 8 302.0 130.0 3870. 15.0 76 1 "ford f108"
216 | 13.0 8 318.0 150.0 3755. 14.0 76 1 "dodge d100"
217 | 31.5 4 98.00 68.00 2045. 18.5 77 3 "honda accord cvcc"
218 | 30.0 4 111.0 80.00 2155. 14.8 77 1 "buick opel isuzu deluxe"
219 | 36.0 4 79.00 58.00 1825. 18.6 77 2 "renault 5 gtl"
220 | 25.5 4 122.0 96.00 2300. 15.5 77 1 "plymouth arrow gs"
221 | 33.5 4 85.00 70.00 1945. 16.8 77 3 "datsun f-10 hatchback"
222 | 17.5 8 305.0 145.0 3880. 12.5 77 1 "chevrolet caprice classic"
223 | 17.0 8 260.0 110.0 4060. 19.0 77 1 "oldsmobile cutlass supreme"
224 | 15.5 8 318.0 145.0 4140. 13.7 77 1 "dodge monaco brougham"
225 | 15.0 8 302.0 130.0 4295. 14.9 77 1 "mercury cougar brougham"
226 | 17.5 6 250.0 110.0 3520. 16.4 77 1 "chevrolet concours"
227 | 20.5 6 231.0 105.0 3425. 16.9 77 1 "buick skylark"
228 | 19.0 6 225.0 100.0 3630. 17.7 77 1 "plymouth volare custom"
229 | 18.5 6 250.0 98.00 3525. 19.0 77 1 "ford granada"
230 | 16.0 8 400.0 180.0 4220. 11.1 77 1 "pontiac grand prix lj"
231 | 15.5 8 350.0 170.0 4165. 11.4 77 1 "chevrolet monte carlo landau"
232 | 15.5 8 400.0 190.0 4325. 12.2 77 1 "chrysler cordoba"
233 | 16.0 8 351.0 149.0 4335. 14.5 77 1 "ford thunderbird"
234 | 29.0 4 97.00 78.00 1940. 14.5 77 2 "volkswagen rabbit custom"
235 | 24.5 4 151.0 88.00 2740. 16.0 77 1 "pontiac sunbird coupe"
236 | 26.0 4 97.00 75.00 2265. 18.2 77 3 "toyota corolla liftback"
237 | 25.5 4 140.0 89.00 2755. 15.8 77 1 "ford mustang ii 2+2"
238 | 30.5 4 98.00 63.00 2051. 17.0 77 1 "chevrolet chevette"
239 | 33.5 4 98.00 83.00 2075. 15.9 77 1 "dodge colt m/m"
240 | 30.0 4 97.00 67.00 1985. 16.4 77 3 "subaru dl"
241 | 30.5 4 97.00 78.00 2190. 14.1 77 2 "volkswagen dasher"
242 | 22.0 6 146.0 97.00 2815. 14.5 77 3 "datsun 810"
243 | 21.5 4 121.0 110.0 2600. 12.8 77 2 "bmw 320i"
244 | 21.5 3 80.00 110.0 2720. 13.5 77 3 "mazda rx-4"
245 | 43.1 4 90.00 48.00 1985. 21.5 78 2 "volkswagen rabbit custom diesel"
246 | 36.1 4 98.00 66.00 1800. 14.4 78 1 "ford fiesta"
247 | 32.8 4 78.00 52.00 1985. 19.4 78 3 "mazda glc deluxe"
248 | 39.4 4 85.00 70.00 2070. 18.6 78 3 "datsun b210 gx"
249 | 36.1 4 91.00 60.00 1800. 16.4 78 3 "honda civic cvcc"
250 | 19.9 8 260.0 110.0 3365. 15.5 78 1 "oldsmobile cutlass salon brougham"
251 | 19.4 8 318.0 140.0 3735. 13.2 78 1 "dodge diplomat"
252 | 20.2 8 302.0 139.0 3570. 12.8 78 1 "mercury monarch ghia"
253 | 19.2 6 231.0 105.0 3535. 19.2 78 1 "pontiac phoenix lj"
254 | 20.5 6 200.0 95.00 3155. 18.2 78 1 "chevrolet malibu"
255 | 20.2 6 200.0 85.00 2965. 15.8 78 1 "ford fairmont (auto)"
256 | 25.1 4 140.0 88.00 2720. 15.4 78 1 "ford fairmont (man)"
257 | 20.5 6 225.0 100.0 3430. 17.2 78 1 "plymouth volare"
258 | 19.4 6 232.0 90.00 3210. 17.2 78 1 "amc concord"
259 | 20.6 6 231.0 105.0 3380. 15.8 78 1 "buick century special"
260 | 20.8 6 200.0 85.00 3070. 16.7 78 1 "mercury zephyr"
261 | 18.6 6 225.0 110.0 3620. 18.7 78 1 "dodge aspen"
262 | 18.1 6 258.0 120.0 3410. 15.1 78 1 "amc concord d/l"
263 | 19.2 8 305.0 145.0 3425. 13.2 78 1 "chevrolet monte carlo landau"
264 | 17.7 6 231.0 165.0 3445. 13.4 78 1 "buick regal sport coupe (turbo)"
265 | 18.1 8 302.0 139.0 3205. 11.2 78 1 "ford futura"
266 | 17.5 8 318.0 140.0 4080. 13.7 78 1 "dodge magnum xe"
267 | 30.0 4 98.00 68.00 2155. 16.5 78 1 "chevrolet chevette"
268 | 27.5 4 134.0 95.00 2560. 14.2 78 3 "toyota corona"
269 | 27.2 4 119.0 97.00 2300. 14.7 78 3 "datsun 510"
270 | 30.9 4 105.0 75.00 2230. 14.5 78 1 "dodge omni"
271 | 21.1 4 134.0 95.00 2515. 14.8 78 3 "toyota celica gt liftback"
272 | 23.2 4 156.0 105.0 2745. 16.7 78 1 "plymouth sapporo"
273 | 23.8 4 151.0 85.00 2855. 17.6 78 1 "oldsmobile starfire sx"
274 | 23.9 4 119.0 97.00 2405. 14.9 78 3 "datsun 200-sx"
275 | 20.3 5 131.0 103.0 2830. 15.9 78 2 "audi 5000"
276 | 17.0 6 163.0 125.0 3140. 13.6 78 2 "volvo 264gl"
277 | 21.6 4 121.0 115.0 2795. 15.7 78 2 "saab 99gle"
278 | 16.2 6 163.0 133.0 3410. 15.8 78 2 "peugeot 604sl"
279 | 31.5 4 89.00 71.00 1990. 14.9 78 2 "volkswagen scirocco"
280 | 29.5 4 98.00 68.00 2135. 16.6 78 3 "honda accord lx"
281 | 21.5 6 231.0 115.0 3245. 15.4 79 1 "pontiac lemans v6"
282 | 19.8 6 200.0 85.00 2990. 18.2 79 1 "mercury zephyr 6"
283 | 22.3 4 140.0 88.00 2890. 17.3 79 1 "ford fairmont 4"
284 | 20.2 6 232.0 90.00 3265. 18.2 79 1 "amc concord dl 6"
285 | 20.6 6 225.0 110.0 3360. 16.6 79 1 "dodge aspen 6"
286 | 17.0 8 305.0 130.0 3840. 15.4 79 1 "chevrolet caprice classic"
287 | 17.6 8 302.0 129.0 3725. 13.4 79 1 "ford ltd landau"
288 | 16.5 8 351.0 138.0 3955. 13.2 79 1 "mercury grand marquis"
289 | 18.2 8 318.0 135.0 3830. 15.2 79 1 "dodge st. regis"
290 | 16.9 8 350.0 155.0 4360. 14.9 79 1 "buick estate wagon (sw)"
291 | 15.5 8 351.0 142.0 4054. 14.3 79 1 "ford country squire (sw)"
292 | 19.2 8 267.0 125.0 3605. 15.0 79 1 "chevrolet malibu classic (sw)"
293 | 18.5 8 360.0 150.0 3940. 13.0 79 1 "chrysler lebaron town @ country (sw)"
294 | 31.9 4 89.00 71.00 1925. 14.0 79 2 "vw rabbit custom"
295 | 34.1 4 86.00 65.00 1975. 15.2 79 3 "maxda glc deluxe"
296 | 35.7 4 98.00 80.00 1915. 14.4 79 1 "dodge colt hatchback custom"
297 | 27.4 4 121.0 80.00 2670. 15.0 79 1 "amc spirit dl"
298 | 25.4 5 183.0 77.00 3530. 20.1 79 2 "mercedes benz 300d"
299 | 23.0 8 350.0 125.0 3900. 17.4 79 1 "cadillac eldorado"
300 | 27.2 4 141.0 71.00 3190. 24.8 79 2 "peugeot 504"
301 | 23.9 8 260.0 90.00 3420. 22.2 79 1 "oldsmobile cutlass salon brougham"
302 | 34.2 4 105.0 70.00 2200. 13.2 79 1 "plymouth horizon"
303 | 34.5 4 105.0 70.00 2150. 14.9 79 1 "plymouth horizon tc3"
304 | 31.8 4 85.00 65.00 2020. 19.2 79 3 "datsun 210"
305 | 37.3 4 91.00 69.00 2130. 14.7 79 2 "fiat strada custom"
306 | 28.4 4 151.0 90.00 2670. 16.0 79 1 "buick skylark limited"
307 | 28.8 6 173.0 115.0 2595. 11.3 79 1 "chevrolet citation"
308 | 26.8 6 173.0 115.0 2700. 12.9 79 1 "oldsmobile omega brougham"
309 | 33.5 4 151.0 90.00 2556. 13.2 79 1 "pontiac phoenix"
310 | 41.5 4 98.00 76.00 2144. 14.7 80 2 "vw rabbit"
311 | 38.1 4 89.00 60.00 1968. 18.8 80 3 "toyota corolla tercel"
312 | 32.1 4 98.00 70.00 2120. 15.5 80 1 "chevrolet chevette"
313 | 37.2 4 86.00 65.00 2019. 16.4 80 3 "datsun 310"
314 | 28.0 4 151.0 90.00 2678. 16.5 80 1 "chevrolet citation"
315 | 26.4 4 140.0 88.00 2870. 18.1 80 1 "ford fairmont"
316 | 24.3 4 151.0 90.00 3003. 20.1 80 1 "amc concord"
317 | 19.1 6 225.0 90.00 3381. 18.7 80 1 "dodge aspen"
318 | 34.3 4 97.00 78.00 2188. 15.8 80 2 "audi 4000"
319 | 29.8 4 134.0 90.00 2711. 15.5 80 3 "toyota corona liftback"
320 | 31.3 4 120.0 75.00 2542. 17.5 80 3 "mazda 626"
321 | 37.0 4 119.0 92.00 2434. 15.0 80 3 "datsun 510 hatchback"
322 | 32.2 4 108.0 75.00 2265. 15.2 80 3 "toyota corolla"
323 | 46.6 4 86.00 65.00 2110. 17.9 80 3 "mazda glc"
324 | 27.9 4 156.0 105.0 2800. 14.4 80 1 "dodge colt"
325 | 40.8 4 85.00 65.00 2110. 19.2 80 3 "datsun 210"
326 | 44.3 4 90.00 48.00 2085. 21.7 80 2 "vw rabbit c (diesel)"
327 | 43.4 4 90.00 48.00 2335. 23.7 80 2 "vw dasher (diesel)"
328 | 36.4 5 121.0 67.00 2950. 19.9 80 2 "audi 5000s (diesel)"
329 | 30.0 4 146.0 67.00 3250. 21.8 80 2 "mercedes-benz 240d"
330 | 44.6 4 91.00 67.00 1850. 13.8 80 3 "honda civic 1500 gl"
331 | 40.9 4 85.00 ? 1835. 17.3 80 2 "renault lecar deluxe"
332 | 33.8 4 97.00 67.00 2145. 18.0 80 3 "subaru dl"
333 | 29.8 4 89.00 62.00 1845. 15.3 80 2 "vokswagen rabbit"
334 | 32.7 6 168.0 132.0 2910. 11.4 80 3 "datsun 280-zx"
335 | 23.7 3 70.00 100.0 2420. 12.5 80 3 "mazda rx-7 gs"
336 | 35.0 4 122.0 88.00 2500. 15.1 80 2 "triumph tr7 coupe"
337 | 23.6 4 140.0 ? 2905. 14.3 80 1 "ford mustang cobra"
338 | 32.4 4 107.0 72.00 2290. 17.0 80 3 "honda accord"
339 | 27.2 4 135.0 84.00 2490. 15.7 81 1 "plymouth reliant"
340 | 26.6 4 151.0 84.00 2635. 16.4 81 1 "buick skylark"
341 | 25.8 4 156.0 92.00 2620. 14.4 81 1 "dodge aries wagon (sw)"
342 | 23.5 6 173.0 110.0 2725. 12.6 81 1 "chevrolet citation"
343 | 30.0 4 135.0 84.00 2385. 12.9 81 1 "plymouth reliant"
344 | 39.1 4 79.00 58.00 1755. 16.9 81 3 "toyota starlet"
345 | 39.0 4 86.00 64.00 1875. 16.4 81 1 "plymouth champ"
346 | 35.1 4 81.00 60.00 1760. 16.1 81 3 "honda civic 1300"
347 | 32.3 4 97.00 67.00 2065. 17.8 81 3 "subaru"
348 | 37.0 4 85.00 65.00 1975. 19.4 81 3 "datsun 210 mpg"
349 | 37.7 4 89.00 62.00 2050. 17.3 81 3 "toyota tercel"
350 | 34.1 4 91.00 68.00 1985. 16.0 81 3 "mazda glc 4"
351 | 34.7 4 105.0 63.00 2215. 14.9 81 1 "plymouth horizon 4"
352 | 34.4 4 98.00 65.00 2045. 16.2 81 1 "ford escort 4w"
353 | 29.9 4 98.00 65.00 2380. 20.7 81 1 "ford escort 2h"
354 | 33.0 4 105.0 74.00 2190. 14.2 81 2 "volkswagen jetta"
355 | 34.5 4 100.0 ? 2320. 15.8 81 2 "renault 18i"
356 | 33.7 4 107.0 75.00 2210. 14.4 81 3 "honda prelude"
357 | 32.4 4 108.0 75.00 2350. 16.8 81 3 "toyota corolla"
358 | 32.9 4 119.0 100.0 2615. 14.8 81 3 "datsun 200sx"
359 | 31.6 4 120.0 74.00 2635. 18.3 81 3 "mazda 626"
360 | 28.1 4 141.0 80.00 3230. 20.4 81 2 "peugeot 505s turbo diesel"
361 | 30.7 6 145.0 76.00 3160. 19.6 81 2 "volvo diesel"
362 | 25.4 6 168.0 116.0 2900. 12.6 81 3 "toyota cressida"
363 | 24.2 6 146.0 120.0 2930. 13.8 81 3 "datsun 810 maxima"
364 | 22.4 6 231.0 110.0 3415. 15.8 81 1 "buick century"
365 | 26.6 8 350.0 105.0 3725. 19.0 81 1 "oldsmobile cutlass ls"
366 | 20.2 6 200.0 88.00 3060. 17.1 81 1 "ford granada gl"
367 | 17.6 6 225.0 85.00 3465. 16.6 81 1 "chrysler lebaron salon"
368 | 28.0 4 112.0 88.00 2605. 19.6 82 1 "chevrolet cavalier"
369 | 27.0 4 112.0 88.00 2640. 18.6 82 1 "chevrolet cavalier wagon"
370 | 34.0 4 112.0 88.00 2395. 18.0 82 1 "chevrolet cavalier 2-door"
371 | 31.0 4 112.0 85.00 2575. 16.2 82 1 "pontiac j2000 se hatchback"
372 | 29.0 4 135.0 84.00 2525. 16.0 82 1 "dodge aries se"
373 | 27.0 4 151.0 90.00 2735. 18.0 82 1 "pontiac phoenix"
374 | 24.0 4 140.0 92.00 2865. 16.4 82 1 "ford fairmont futura"
375 | 23.0 4 151.0 ? 3035. 20.5 82 1 "amc concord dl"
376 | 36.0 4 105.0 74.00 1980. 15.3 82 2 "volkswagen rabbit l"
377 | 37.0 4 91.00 68.00 2025. 18.2 82 3 "mazda glc custom l"
378 | 31.0 4 91.00 68.00 1970. 17.6 82 3 "mazda glc custom"
379 | 38.0 4 105.0 63.00 2125. 14.7 82 1 "plymouth horizon miser"
380 | 36.0 4 98.00 70.00 2125. 17.3 82 1 "mercury lynx l"
381 | 36.0 4 120.0 88.00 2160. 14.5 82 3 "nissan stanza xe"
382 | 36.0 4 107.0 75.00 2205. 14.5 82 3 "honda accord"
383 | 34.0 4 108.0 70.00 2245 16.9 82 3 "toyota corolla"
384 | 38.0 4 91.00 67.00 1965. 15.0 82 3 "honda civic"
385 | 32.0 4 91.00 67.00 1965. 15.7 82 3 "honda civic (auto)"
386 | 38.0 4 91.00 67.00 1995. 16.2 82 3 "datsun 310 gx"
387 | 25.0 6 181.0 110.0 2945. 16.4 82 1 "buick century limited"
388 | 38.0 6 262.0 85.00 3015. 17.0 82 1 "oldsmobile cutlass ciera (diesel)"
389 | 26.0 4 156.0 92.00 2585. 14.5 82 1 "chrysler lebaron medallion"
390 | 22.0 6 232.0 112.0 2835 14.7 82 1 "ford granada l"
391 | 32.0 4 144.0 96.00 2665. 13.9 82 3 "toyota celica gt"
392 | 36.0 4 135.0 84.00 2370. 13.0 82 1 "dodge charger 2.2"
393 | 27.0 4 151.0 90.00 2950. 17.3 82 1 "chevrolet camaro"
394 | 27.0 4 140.0 86.00 2790. 15.6 82 1 "ford mustang gl"
395 | 44.0 4 97.00 52.00 2130. 24.6 82 2 "vw pickup"
396 | 32.0 4 135.0 84.00 2295. 11.6 82 1 "dodge rampage"
397 | 28.0 4 120.0 79.00 2625. 18.6 82 1 "ford ranger"
398 | 31.0 4 119.0 82.00 2720. 19.4 82 1 "chevy s-10"
399 |
--------------------------------------------------------------------------------
/Chapter09/auto-mpg.data-original:
--------------------------------------------------------------------------------
1 | 18.0 8. 307.0 130.0 3504. 12.0 70. 1. "chevrolet chevelle malibu"
2 | 15.0 8. 350.0 165.0 3693. 11.5 70. 1. "buick skylark 320"
3 | 18.0 8. 318.0 150.0 3436. 11.0 70. 1. "plymouth satellite"
4 | 16.0 8. 304.0 150.0 3433. 12.0 70. 1. "amc rebel sst"
5 | 17.0 8. 302.0 140.0 3449. 10.5 70. 1. "ford torino"
6 | 15.0 8. 429.0 198.0 4341. 10.0 70. 1. "ford galaxie 500"
7 | 14.0 8. 454.0 220.0 4354. 9.0 70. 1. "chevrolet impala"
8 | 14.0 8. 440.0 215.0 4312. 8.5 70. 1. "plymouth fury iii"
9 | 14.0 8. 455.0 225.0 4425. 10.0 70. 1. "pontiac catalina"
10 | 15.0 8. 390.0 190.0 3850. 8.5 70. 1. "amc ambassador dpl"
11 | NA 4. 133.0 115.0 3090. 17.5 70. 2. "citroen ds-21 pallas"
12 | NA 8. 350.0 165.0 4142. 11.5 70. 1. "chevrolet chevelle concours (sw)"
13 | NA 8. 351.0 153.0 4034. 11.0 70. 1. "ford torino (sw)"
14 | NA 8. 383.0 175.0 4166. 10.5 70. 1. "plymouth satellite (sw)"
15 | NA 8. 360.0 175.0 3850. 11.0 70. 1. "amc rebel sst (sw)"
16 | 15.0 8. 383.0 170.0 3563. 10.0 70. 1. "dodge challenger se"
17 | 14.0 8. 340.0 160.0 3609. 8.0 70. 1. "plymouth 'cuda 340"
18 | NA 8. 302.0 140.0 3353. 8.0 70. 1. "ford mustang boss 302"
19 | 15.0 8. 400.0 150.0 3761. 9.5 70. 1. "chevrolet monte carlo"
20 | 14.0 8. 455.0 225.0 3086. 10.0 70. 1. "buick estate wagon (sw)"
21 | 24.0 4. 113.0 95.00 2372. 15.0 70. 3. "toyota corona mark ii"
22 | 22.0 6. 198.0 95.00 2833. 15.5 70. 1. "plymouth duster"
23 | 18.0 6. 199.0 97.00 2774. 15.5 70. 1. "amc hornet"
24 | 21.0 6. 200.0 85.00 2587. 16.0 70. 1. "ford maverick"
25 | 27.0 4. 97.00 88.00 2130. 14.5 70. 3. "datsun pl510"
26 | 26.0 4. 97.00 46.00 1835. 20.5 70. 2. "volkswagen 1131 deluxe sedan"
27 | 25.0 4. 110.0 87.00 2672. 17.5 70. 2. "peugeot 504"
28 | 24.0 4. 107.0 90.00 2430. 14.5 70. 2. "audi 100 ls"
29 | 25.0 4. 104.0 95.00 2375. 17.5 70. 2. "saab 99e"
30 | 26.0 4. 121.0 113.0 2234. 12.5 70. 2. "bmw 2002"
31 | 21.0 6. 199.0 90.00 2648. 15.0 70. 1. "amc gremlin"
32 | 10.0 8. 360.0 215.0 4615. 14.0 70. 1. "ford f250"
33 | 10.0 8. 307.0 200.0 4376. 15.0 70. 1. "chevy c20"
34 | 11.0 8. 318.0 210.0 4382. 13.5 70. 1. "dodge d200"
35 | 9.0 8. 304.0 193.0 4732. 18.5 70. 1. "hi 1200d"
36 | 27.0 4. 97.00 88.00 2130. 14.5 71. 3. "datsun pl510"
37 | 28.0 4. 140.0 90.00 2264. 15.5 71. 1. "chevrolet vega 2300"
38 | 25.0 4. 113.0 95.00 2228. 14.0 71. 3. "toyota corona"
39 | 25.0 4. 98.00 NA 2046. 19.0 71. 1. "ford pinto"
40 | NA 4. 97.00 48.00 1978. 20.0 71. 2. "volkswagen super beetle 117"
41 | 19.0 6. 232.0 100.0 2634. 13.0 71. 1. "amc gremlin"
42 | 16.0 6. 225.0 105.0 3439. 15.5 71. 1. "plymouth satellite custom"
43 | 17.0 6. 250.0 100.0 3329. 15.5 71. 1. "chevrolet chevelle malibu"
44 | 19.0 6. 250.0 88.00 3302. 15.5 71. 1. "ford torino 500"
45 | 18.0 6. 232.0 100.0 3288. 15.5 71. 1. "amc matador"
46 | 14.0 8. 350.0 165.0 4209. 12.0 71. 1. "chevrolet impala"
47 | 14.0 8. 400.0 175.0 4464. 11.5 71. 1. "pontiac catalina brougham"
48 | 14.0 8. 351.0 153.0 4154. 13.5 71. 1. "ford galaxie 500"
49 | 14.0 8. 318.0 150.0 4096. 13.0 71. 1. "plymouth fury iii"
50 | 12.0 8. 383.0 180.0 4955. 11.5 71. 1. "dodge monaco (sw)"
51 | 13.0 8. 400.0 170.0 4746. 12.0 71. 1. "ford country squire (sw)"
52 | 13.0 8. 400.0 175.0 5140. 12.0 71. 1. "pontiac safari (sw)"
53 | 18.0 6. 258.0 110.0 2962. 13.5 71. 1. "amc hornet sportabout (sw)"
54 | 22.0 4. 140.0 72.00 2408. 19.0 71. 1. "chevrolet vega (sw)"
55 | 19.0 6. 250.0 100.0 3282. 15.0 71. 1. "pontiac firebird"
56 | 18.0 6. 250.0 88.00 3139. 14.5 71. 1. "ford mustang"
57 | 23.0 4. 122.0 86.00 2220. 14.0 71. 1. "mercury capri 2000"
58 | 28.0 4. 116.0 90.00 2123. 14.0 71. 2. "opel 1900"
59 | 30.0 4. 79.00 70.00 2074. 19.5 71. 2. "peugeot 304"
60 | 30.0 4. 88.00 76.00 2065. 14.5 71. 2. "fiat 124b"
61 | 31.0 4. 71.00 65.00 1773. 19.0 71. 3. "toyota corolla 1200"
62 | 35.0 4. 72.00 69.00 1613. 18.0 71. 3. "datsun 1200"
63 | 27.0 4. 97.00 60.00 1834. 19.0 71. 2. "volkswagen model 111"
64 | 26.0 4. 91.00 70.00 1955. 20.5 71. 1. "plymouth cricket"
65 | 24.0 4. 113.0 95.00 2278. 15.5 72. 3. "toyota corona hardtop"
66 | 25.0 4. 97.50 80.00 2126. 17.0 72. 1. "dodge colt hardtop"
67 | 23.0 4. 97.00 54.00 2254. 23.5 72. 2. "volkswagen type 3"
68 | 20.0 4. 140.0 90.00 2408. 19.5 72. 1. "chevrolet vega"
69 | 21.0 4. 122.0 86.00 2226. 16.5 72. 1. "ford pinto runabout"
70 | 13.0 8. 350.0 165.0 4274. 12.0 72. 1. "chevrolet impala"
71 | 14.0 8. 400.0 175.0 4385. 12.0 72. 1. "pontiac catalina"
72 | 15.0 8. 318.0 150.0 4135. 13.5 72. 1. "plymouth fury iii"
73 | 14.0 8. 351.0 153.0 4129. 13.0 72. 1. "ford galaxie 500"
74 | 17.0 8. 304.0 150.0 3672. 11.5 72. 1. "amc ambassador sst"
75 | 11.0 8. 429.0 208.0 4633. 11.0 72. 1. "mercury marquis"
76 | 13.0 8. 350.0 155.0 4502. 13.5 72. 1. "buick lesabre custom"
77 | 12.0 8. 350.0 160.0 4456. 13.5 72. 1. "oldsmobile delta 88 royale"
78 | 13.0 8. 400.0 190.0 4422. 12.5 72. 1. "chrysler newport royal"
79 | 19.0 3. 70.00 97.00 2330. 13.5 72. 3. "mazda rx2 coupe"
80 | 15.0 8. 304.0 150.0 3892. 12.5 72. 1. "amc matador (sw)"
81 | 13.0 8. 307.0 130.0 4098. 14.0 72. 1. "chevrolet chevelle concours (sw)"
82 | 13.0 8. 302.0 140.0 4294. 16.0 72. 1. "ford gran torino (sw)"
83 | 14.0 8. 318.0 150.0 4077. 14.0 72. 1. "plymouth satellite custom (sw)"
84 | 18.0 4. 121.0 112.0 2933. 14.5 72. 2. "volvo 145e (sw)"
85 | 22.0 4. 121.0 76.00 2511. 18.0 72. 2. "volkswagen 411 (sw)"
86 | 21.0 4. 120.0 87.00 2979. 19.5 72. 2. "peugeot 504 (sw)"
87 | 26.0 4. 96.00 69.00 2189. 18.0 72. 2. "renault 12 (sw)"
88 | 22.0 4. 122.0 86.00 2395. 16.0 72. 1. "ford pinto (sw)"
89 | 28.0 4. 97.00 92.00 2288. 17.0 72. 3. "datsun 510 (sw)"
90 | 23.0 4. 120.0 97.00 2506. 14.5 72. 3. "toyouta corona mark ii (sw)"
91 | 28.0 4. 98.00 80.00 2164. 15.0 72. 1. "dodge colt (sw)"
92 | 27.0 4. 97.00 88.00 2100. 16.5 72. 3. "toyota corolla 1600 (sw)"
93 | 13.0 8. 350.0 175.0 4100. 13.0 73. 1. "buick century 350"
94 | 14.0 8. 304.0 150.0 3672. 11.5 73. 1. "amc matador"
95 | 13.0 8. 350.0 145.0 3988. 13.0 73. 1. "chevrolet malibu"
96 | 14.0 8. 302.0 137.0 4042. 14.5 73. 1. "ford gran torino"
97 | 15.0 8. 318.0 150.0 3777. 12.5 73. 1. "dodge coronet custom"
98 | 12.0 8. 429.0 198.0 4952. 11.5 73. 1. "mercury marquis brougham"
99 | 13.0 8. 400.0 150.0 4464. 12.0 73. 1. "chevrolet caprice classic"
100 | 13.0 8. 351.0 158.0 4363. 13.0 73. 1. "ford ltd"
101 | 14.0 8. 318.0 150.0 4237. 14.5 73. 1. "plymouth fury gran sedan"
102 | 13.0 8. 440.0 215.0 4735. 11.0 73. 1. "chrysler new yorker brougham"
103 | 12.0 8. 455.0 225.0 4951. 11.0 73. 1. "buick electra 225 custom"
104 | 13.0 8. 360.0 175.0 3821. 11.0 73. 1. "amc ambassador brougham"
105 | 18.0 6. 225.0 105.0 3121. 16.5 73. 1. "plymouth valiant"
106 | 16.0 6. 250.0 100.0 3278. 18.0 73. 1. "chevrolet nova custom"
107 | 18.0 6. 232.0 100.0 2945. 16.0 73. 1. "amc hornet"
108 | 18.0 6. 250.0 88.00 3021. 16.5 73. 1. "ford maverick"
109 | 23.0 6. 198.0 95.00 2904. 16.0 73. 1. "plymouth duster"
110 | 26.0 4. 97.00 46.00 1950. 21.0 73. 2. "volkswagen super beetle"
111 | 11.0 8. 400.0 150.0 4997. 14.0 73. 1. "chevrolet impala"
112 | 12.0 8. 400.0 167.0 4906. 12.5 73. 1. "ford country"
113 | 13.0 8. 360.0 170.0 4654. 13.0 73. 1. "plymouth custom suburb"
114 | 12.0 8. 350.0 180.0 4499. 12.5 73. 1. "oldsmobile vista cruiser"
115 | 18.0 6. 232.0 100.0 2789. 15.0 73. 1. "amc gremlin"
116 | 20.0 4. 97.00 88.00 2279. 19.0 73. 3. "toyota carina"
117 | 21.0 4. 140.0 72.00 2401. 19.5 73. 1. "chevrolet vega"
118 | 22.0 4. 108.0 94.00 2379. 16.5 73. 3. "datsun 610"
119 | 18.0 3. 70.00 90.00 2124. 13.5 73. 3. "maxda rx3"
120 | 19.0 4. 122.0 85.00 2310. 18.5 73. 1. "ford pinto"
121 | 21.0 6. 155.0 107.0 2472. 14.0 73. 1. "mercury capri v6"
122 | 26.0 4. 98.00 90.00 2265. 15.5 73. 2. "fiat 124 sport coupe"
123 | 15.0 8. 350.0 145.0 4082. 13.0 73. 1. "chevrolet monte carlo s"
124 | 16.0 8. 400.0 230.0 4278. 9.50 73. 1. "pontiac grand prix"
125 | 29.0 4. 68.00 49.00 1867. 19.5 73. 2. "fiat 128"
126 | 24.0 4. 116.0 75.00 2158. 15.5 73. 2. "opel manta"
127 | 20.0 4. 114.0 91.00 2582. 14.0 73. 2. "audi 100ls"
128 | 19.0 4. 121.0 112.0 2868. 15.5 73. 2. "volvo 144ea"
129 | 15.0 8. 318.0 150.0 3399. 11.0 73. 1. "dodge dart custom"
130 | 24.0 4. 121.0 110.0 2660. 14.0 73. 2. "saab 99le"
131 | 20.0 6. 156.0 122.0 2807. 13.5 73. 3. "toyota mark ii"
132 | 11.0 8. 350.0 180.0 3664. 11.0 73. 1. "oldsmobile omega"
133 | 20.0 6. 198.0 95.00 3102. 16.5 74. 1. "plymouth duster"
134 | 21.0 6. 200.0 NA 2875. 17.0 74. 1. "ford maverick"
135 | 19.0 6. 232.0 100.0 2901. 16.0 74. 1. "amc hornet"
136 | 15.0 6. 250.0 100.0 3336. 17.0 74. 1. "chevrolet nova"
137 | 31.0 4. 79.00 67.00 1950. 19.0 74. 3. "datsun b210"
138 | 26.0 4. 122.0 80.00 2451. 16.5 74. 1. "ford pinto"
139 | 32.0 4. 71.00 65.00 1836. 21.0 74. 3. "toyota corolla 1200"
140 | 25.0 4. 140.0 75.00 2542. 17.0 74. 1. "chevrolet vega"
141 | 16.0 6. 250.0 100.0 3781. 17.0 74. 1. "chevrolet chevelle malibu classic"
142 | 16.0 6. 258.0 110.0 3632. 18.0 74. 1. "amc matador"
143 | 18.0 6. 225.0 105.0 3613. 16.5 74. 1. "plymouth satellite sebring"
144 | 16.0 8. 302.0 140.0 4141. 14.0 74. 1. "ford gran torino"
145 | 13.0 8. 350.0 150.0 4699. 14.5 74. 1. "buick century luxus (sw)"
146 | 14.0 8. 318.0 150.0 4457. 13.5 74. 1. "dodge coronet custom (sw)"
147 | 14.0 8. 302.0 140.0 4638. 16.0 74. 1. "ford gran torino (sw)"
148 | 14.0 8. 304.0 150.0 4257. 15.5 74. 1. "amc matador (sw)"
149 | 29.0 4. 98.00 83.00 2219. 16.5 74. 2. "audi fox"
150 | 26.0 4. 79.00 67.00 1963. 15.5 74. 2. "volkswagen dasher"
151 | 26.0 4. 97.00 78.00 2300. 14.5 74. 2. "opel manta"
152 | 31.0 4. 76.00 52.00 1649. 16.5 74. 3. "toyota corona"
153 | 32.0 4. 83.00 61.00 2003. 19.0 74. 3. "datsun 710"
154 | 28.0 4. 90.00 75.00 2125. 14.5 74. 1. "dodge colt"
155 | 24.0 4. 90.00 75.00 2108. 15.5 74. 2. "fiat 128"
156 | 26.0 4. 116.0 75.00 2246. 14.0 74. 2. "fiat 124 tc"
157 | 24.0 4. 120.0 97.00 2489. 15.0 74. 3. "honda civic"
158 | 26.0 4. 108.0 93.00 2391. 15.5 74. 3. "subaru"
159 | 31.0 4. 79.00 67.00 2000. 16.0 74. 2. "fiat x1.9"
160 | 19.0 6. 225.0 95.00 3264. 16.0 75. 1. "plymouth valiant custom"
161 | 18.0 6. 250.0 105.0 3459. 16.0 75. 1. "chevrolet nova"
162 | 15.0 6. 250.0 72.00 3432. 21.0 75. 1. "mercury monarch"
163 | 15.0 6. 250.0 72.00 3158. 19.5 75. 1. "ford maverick"
164 | 16.0 8. 400.0 170.0 4668. 11.5 75. 1. "pontiac catalina"
165 | 15.0 8. 350.0 145.0 4440. 14.0 75. 1. "chevrolet bel air"
166 | 16.0 8. 318.0 150.0 4498. 14.5 75. 1. "plymouth grand fury"
167 | 14.0 8. 351.0 148.0 4657. 13.5 75. 1. "ford ltd"
168 | 17.0 6. 231.0 110.0 3907. 21.0 75. 1. "buick century"
169 | 16.0 6. 250.0 105.0 3897. 18.5 75. 1. "chevroelt chevelle malibu"
170 | 15.0 6. 258.0 110.0 3730. 19.0 75. 1. "amc matador"
171 | 18.0 6. 225.0 95.00 3785. 19.0 75. 1. "plymouth fury"
172 | 21.0 6. 231.0 110.0 3039. 15.0 75. 1. "buick skyhawk"
173 | 20.0 8. 262.0 110.0 3221. 13.5 75. 1. "chevrolet monza 2+2"
174 | 13.0 8. 302.0 129.0 3169. 12.0 75. 1. "ford mustang ii"
175 | 29.0 4. 97.00 75.00 2171. 16.0 75. 3. "toyota corolla"
176 | 23.0 4. 140.0 83.00 2639. 17.0 75. 1. "ford pinto"
177 | 20.0 6. 232.0 100.0 2914. 16.0 75. 1. "amc gremlin"
178 | 23.0 4. 140.0 78.00 2592. 18.5 75. 1. "pontiac astro"
179 | 24.0 4. 134.0 96.00 2702. 13.5 75. 3. "toyota corona"
180 | 25.0 4. 90.00 71.00 2223. 16.5 75. 2. "volkswagen dasher"
181 | 24.0 4. 119.0 97.00 2545. 17.0 75. 3. "datsun 710"
182 | 18.0 6. 171.0 97.00 2984. 14.5 75. 1. "ford pinto"
183 | 29.0 4. 90.00 70.00 1937. 14.0 75. 2. "volkswagen rabbit"
184 | 19.0 6. 232.0 90.00 3211. 17.0 75. 1. "amc pacer"
185 | 23.0 4. 115.0 95.00 2694. 15.0 75. 2. "audi 100ls"
186 | 23.0 4. 120.0 88.00 2957. 17.0 75. 2. "peugeot 504"
187 | 22.0 4. 121.0 98.00 2945. 14.5 75. 2. "volvo 244dl"
188 | 25.0 4. 121.0 115.0 2671. 13.5 75. 2. "saab 99le"
189 | 33.0 4. 91.00 53.00 1795. 17.5 75. 3. "honda civic cvcc"
190 | 28.0 4. 107.0 86.00 2464. 15.5 76. 2. "fiat 131"
191 | 25.0 4. 116.0 81.00 2220. 16.9 76. 2. "opel 1900"
192 | 25.0 4. 140.0 92.00 2572. 14.9 76. 1. "capri ii"
193 | 26.0 4. 98.00 79.00 2255. 17.7 76. 1. "dodge colt"
194 | 27.0 4. 101.0 83.00 2202. 15.3 76. 2. "renault 12tl"
195 | 17.5 8. 305.0 140.0 4215. 13.0 76. 1. "chevrolet chevelle malibu classic"
196 | 16.0 8. 318.0 150.0 4190. 13.0 76. 1. "dodge coronet brougham"
197 | 15.5 8. 304.0 120.0 3962. 13.9 76. 1. "amc matador"
198 | 14.5 8. 351.0 152.0 4215. 12.8 76. 1. "ford gran torino"
199 | 22.0 6. 225.0 100.0 3233. 15.4 76. 1. "plymouth valiant"
200 | 22.0 6. 250.0 105.0 3353. 14.5 76. 1. "chevrolet nova"
201 | 24.0 6. 200.0 81.00 3012. 17.6 76. 1. "ford maverick"
202 | 22.5 6. 232.0 90.00 3085. 17.6 76. 1. "amc hornet"
203 | 29.0 4. 85.00 52.00 2035. 22.2 76. 1. "chevrolet chevette"
204 | 24.5 4. 98.00 60.00 2164. 22.1 76. 1. "chevrolet woody"
205 | 29.0 4. 90.00 70.00 1937. 14.2 76. 2. "vw rabbit"
206 | 33.0 4. 91.00 53.00 1795. 17.4 76. 3. "honda civic"
207 | 20.0 6. 225.0 100.0 3651. 17.7 76. 1. "dodge aspen se"
208 | 18.0 6. 250.0 78.00 3574. 21.0 76. 1. "ford granada ghia"
209 | 18.5 6. 250.0 110.0 3645. 16.2 76. 1. "pontiac ventura sj"
210 | 17.5 6. 258.0 95.00 3193. 17.8 76. 1. "amc pacer d/l"
211 | 29.5 4. 97.00 71.00 1825. 12.2 76. 2. "volkswagen rabbit"
212 | 32.0 4. 85.00 70.00 1990. 17.0 76. 3. "datsun b-210"
213 | 28.0 4. 97.00 75.00 2155. 16.4 76. 3. "toyota corolla"
214 | 26.5 4. 140.0 72.00 2565. 13.6 76. 1. "ford pinto"
215 | 20.0 4. 130.0 102.0 3150. 15.7 76. 2. "volvo 245"
216 | 13.0 8. 318.0 150.0 3940. 13.2 76. 1. "plymouth volare premier v8"
217 | 19.0 4. 120.0 88.00 3270. 21.9 76. 2. "peugeot 504"
218 | 19.0 6. 156.0 108.0 2930. 15.5 76. 3. "toyota mark ii"
219 | 16.5 6. 168.0 120.0 3820. 16.7 76. 2. "mercedes-benz 280s"
220 | 16.5 8. 350.0 180.0 4380. 12.1 76. 1. "cadillac seville"
221 | 13.0 8. 350.0 145.0 4055. 12.0 76. 1. "chevy c10"
222 | 13.0 8. 302.0 130.0 3870. 15.0 76. 1. "ford f108"
223 | 13.0 8. 318.0 150.0 3755. 14.0 76. 1. "dodge d100"
224 | 31.5 4. 98.00 68.00 2045. 18.5 77. 3. "honda accord cvcc"
225 | 30.0 4. 111.0 80.00 2155. 14.8 77. 1. "buick opel isuzu deluxe"
226 | 36.0 4. 79.00 58.00 1825. 18.6 77. 2. "renault 5 gtl"
227 | 25.5 4. 122.0 96.00 2300. 15.5 77. 1. "plymouth arrow gs"
228 | 33.5 4. 85.00 70.00 1945. 16.8 77. 3. "datsun f-10 hatchback"
229 | 17.5 8. 305.0 145.0 3880. 12.5 77. 1. "chevrolet caprice classic"
230 | 17.0 8. 260.0 110.0 4060. 19.0 77. 1. "oldsmobile cutlass supreme"
231 | 15.5 8. 318.0 145.0 4140. 13.7 77. 1. "dodge monaco brougham"
232 | 15.0 8. 302.0 130.0 4295. 14.9 77. 1. "mercury cougar brougham"
233 | 17.5 6. 250.0 110.0 3520. 16.4 77. 1. "chevrolet concours"
234 | 20.5 6. 231.0 105.0 3425. 16.9 77. 1. "buick skylark"
235 | 19.0 6. 225.0 100.0 3630. 17.7 77. 1. "plymouth volare custom"
236 | 18.5 6. 250.0 98.00 3525. 19.0 77. 1. "ford granada"
237 | 16.0 8. 400.0 180.0 4220. 11.1 77. 1. "pontiac grand prix lj"
238 | 15.5 8. 350.0 170.0 4165. 11.4 77. 1. "chevrolet monte carlo landau"
239 | 15.5 8. 400.0 190.0 4325. 12.2 77. 1. "chrysler cordoba"
240 | 16.0 8. 351.0 149.0 4335. 14.5 77. 1. "ford thunderbird"
241 | 29.0 4. 97.00 78.00 1940. 14.5 77. 2. "volkswagen rabbit custom"
242 | 24.5 4. 151.0 88.00 2740. 16.0 77. 1. "pontiac sunbird coupe"
243 | 26.0 4. 97.00 75.00 2265. 18.2 77. 3. "toyota corolla liftback"
244 | 25.5 4. 140.0 89.00 2755. 15.8 77. 1. "ford mustang ii 2+2"
245 | 30.5 4. 98.00 63.00 2051. 17.0 77. 1. "chevrolet chevette"
246 | 33.5 4. 98.00 83.00 2075. 15.9 77. 1. "dodge colt m/m"
247 | 30.0 4. 97.00 67.00 1985. 16.4 77. 3. "subaru dl"
248 | 30.5 4. 97.00 78.00 2190. 14.1 77. 2. "volkswagen dasher"
249 | 22.0 6. 146.0 97.00 2815. 14.5 77. 3. "datsun 810"
250 | 21.5 4. 121.0 110.0 2600. 12.8 77. 2. "bmw 320i"
251 | 21.5 3. 80.00 110.0 2720. 13.5 77. 3. "mazda rx-4"
252 | 43.1 4. 90.00 48.00 1985. 21.5 78 2. "volkswagen rabbit custom diesel"
253 | 36.1 4. 98.00 66.00 1800. 14.4 78 1. "ford fiesta"
254 | 32.8 4. 78.00 52.00 1985. 19.4 78. 3. "mazda glc deluxe"
255 | 39.4 4. 85.00 70.00 2070. 18.6 78. 3. "datsun b210 gx"
256 | 36.1 4. 91.00 60.00 1800. 16.4 78. 3. "honda civic cvcc"
257 | 19.9 8. 260.0 110.0 3365. 15.5 78. 1. "oldsmobile cutlass salon brougham"
258 | 19.4 8. 318.0 140.0 3735. 13.2 78. 1. "dodge diplomat"
259 | 20.2 8. 302.0 139.0 3570. 12.8 78. 1. "mercury monarch ghia"
260 | 19.2 6. 231.0 105.0 3535. 19.2 78. 1. "pontiac phoenix lj"
261 | 20.5 6. 200.0 95.00 3155. 18.2 78. 1. "chevrolet malibu"
262 | 20.2 6. 200.0 85.00 2965. 15.8 78. 1. "ford fairmont (auto)"
263 | 25.1 4. 140.0 88.00 2720. 15.4 78. 1. "ford fairmont (man)"
264 | 20.5 6. 225.0 100.0 3430. 17.2 78. 1. "plymouth volare"
265 | 19.4 6. 232.0 90.00 3210. 17.2 78. 1. "amc concord"
266 | 20.6 6. 231.0 105.0 3380. 15.8 78. 1. "buick century special"
267 | 20.8 6. 200.0 85.00 3070. 16.7 78. 1. "mercury zephyr"
268 | 18.6 6. 225.0 110.0 3620. 18.7 78. 1. "dodge aspen"
269 | 18.1 6. 258.0 120.0 3410. 15.1 78. 1. "amc concord d/l"
270 | 19.2 8. 305.0 145.0 3425. 13.2 78. 1. "chevrolet monte carlo landau"
271 | 17.7 6. 231.0 165.0 3445. 13.4 78. 1. "buick regal sport coupe (turbo)"
272 | 18.1 8. 302.0 139.0 3205. 11.2 78. 1. "ford futura"
273 | 17.5 8. 318.0 140.0 4080. 13.7 78. 1. "dodge magnum xe"
274 | 30.0 4. 98.00 68.00 2155. 16.5 78. 1. "chevrolet chevette"
275 | 27.5 4. 134.0 95.00 2560. 14.2 78. 3. "toyota corona"
276 | 27.2 4. 119.0 97.00 2300. 14.7 78. 3. "datsun 510"
277 | 30.9 4. 105.0 75.00 2230. 14.5 78. 1. "dodge omni"
278 | 21.1 4. 134.0 95.00 2515. 14.8 78. 3. "toyota celica gt liftback"
279 | 23.2 4. 156.0 105.0 2745. 16.7 78. 1. "plymouth sapporo"
280 | 23.8 4. 151.0 85.00 2855. 17.6 78. 1. "oldsmobile starfire sx"
281 | 23.9 4. 119.0 97.00 2405. 14.9 78. 3. "datsun 200-sx"
282 | 20.3 5. 131.0 103.0 2830. 15.9 78. 2. "audi 5000"
283 | 17.0 6. 163.0 125.0 3140. 13.6 78. 2. "volvo 264gl"
284 | 21.6 4. 121.0 115.0 2795. 15.7 78. 2. "saab 99gle"
285 | 16.2 6. 163.0 133.0 3410. 15.8 78. 2. "peugeot 604sl"
286 | 31.5 4. 89.00 71.00 1990. 14.9 78. 2. "volkswagen scirocco"
287 | 29.5 4. 98.00 68.00 2135. 16.6 78. 3. "honda accord lx"
288 | 21.5 6. 231.0 115.0 3245. 15.4 79. 1. "pontiac lemans v6"
289 | 19.8 6. 200.0 85.00 2990. 18.2 79. 1. "mercury zephyr 6"
290 | 22.3 4. 140.0 88.00 2890. 17.3 79. 1. "ford fairmont 4"
291 | 20.2 6. 232.0 90.00 3265. 18.2 79. 1. "amc concord dl 6"
292 | 20.6 6. 225.0 110.0 3360. 16.6 79. 1. "dodge aspen 6"
293 | 17.0 8. 305.0 130.0 3840. 15.4 79. 1. "chevrolet caprice classic"
294 | 17.6 8. 302.0 129.0 3725. 13.4 79. 1. "ford ltd landau"
295 | 16.5 8. 351.0 138.0 3955. 13.2 79. 1. "mercury grand marquis"
296 | 18.2 8. 318.0 135.0 3830. 15.2 79. 1. "dodge st. regis"
297 | 16.9 8. 350.0 155.0 4360. 14.9 79. 1. "buick estate wagon (sw)"
298 | 15.5 8. 351.0 142.0 4054. 14.3 79. 1. "ford country squire (sw)"
299 | 19.2 8. 267.0 125.0 3605. 15.0 79. 1. "chevrolet malibu classic (sw)"
300 | 18.5 8. 360.0 150.0 3940. 13.0 79. 1. "chrysler lebaron town @ country (sw)"
301 | 31.9 4. 89.00 71.00 1925. 14.0 79. 2. "vw rabbit custom"
302 | 34.1 4. 86.00 65.00 1975. 15.2 79. 3. "maxda glc deluxe"
303 | 35.7 4. 98.00 80.00 1915. 14.4 79. 1. "dodge colt hatchback custom"
304 | 27.4 4. 121.0 80.00 2670. 15.0 79. 1. "amc spirit dl"
305 | 25.4 5. 183.0 77.00 3530. 20.1 79. 2. "mercedes benz 300d"
306 | 23.0 8. 350.0 125.0 3900. 17.4 79. 1. "cadillac eldorado"
307 | 27.2 4. 141.0 71.00 3190. 24.8 79. 2. "peugeot 504"
308 | 23.9 8. 260.0 90.00 3420. 22.2 79. 1. "oldsmobile cutlass salon brougham"
309 | 34.2 4. 105.0 70.00 2200. 13.2 79. 1. "plymouth horizon"
310 | 34.5 4. 105.0 70.00 2150. 14.9 79. 1. "plymouth horizon tc3"
311 | 31.8 4. 85.00 65.00 2020. 19.2 79. 3. "datsun 210"
312 | 37.3 4. 91.00 69.00 2130. 14.7 79. 2. "fiat strada custom"
313 | 28.4 4. 151.0 90.00 2670. 16.0 79. 1. "buick skylark limited"
314 | 28.8 6. 173.0 115.0 2595. 11.3 79. 1. "chevrolet citation"
315 | 26.8 6. 173.0 115.0 2700. 12.9 79. 1. "oldsmobile omega brougham"
316 | 33.5 4. 151.0 90.00 2556. 13.2 79. 1. "pontiac phoenix"
317 | 41.5 4. 98.00 76.00 2144. 14.7 80. 2. "vw rabbit"
318 | 38.1 4. 89.00 60.00 1968. 18.8 80. 3. "toyota corolla tercel"
319 | 32.1 4. 98.00 70.00 2120. 15.5 80. 1. "chevrolet chevette"
320 | 37.2 4. 86.00 65.00 2019. 16.4 80. 3. "datsun 310"
321 | 28.0 4. 151.0 90.00 2678. 16.5 80. 1. "chevrolet citation"
322 | 26.4 4. 140.0 88.00 2870. 18.1 80. 1. "ford fairmont"
323 | 24.3 4. 151.0 90.00 3003. 20.1 80. 1. "amc concord"
324 | 19.1 6. 225.0 90.00 3381. 18.7 80. 1. "dodge aspen"
325 | 34.3 4. 97.00 78.00 2188. 15.8 80. 2. "audi 4000"
326 | 29.8 4. 134.0 90.00 2711. 15.5 80. 3. "toyota corona liftback"
327 | 31.3 4. 120.0 75.00 2542. 17.5 80. 3. "mazda 626"
328 | 37.0 4. 119.0 92.00 2434. 15.0 80. 3. "datsun 510 hatchback"
329 | 32.2 4. 108.0 75.00 2265. 15.2 80. 3. "toyota corolla"
330 | 46.6 4. 86.00 65.00 2110. 17.9 80. 3. "mazda glc"
331 | 27.9 4. 156.0 105.0 2800. 14.4 80. 1. "dodge colt"
332 | 40.8 4. 85.00 65.00 2110. 19.2 80. 3. "datsun 210"
333 | 44.3 4. 90.00 48.00 2085. 21.7 80. 2. "vw rabbit c (diesel)"
334 | 43.4 4. 90.00 48.00 2335. 23.7 80. 2. "vw dasher (diesel)"
335 | 36.4 5. 121.0 67.00 2950. 19.9 80. 2. "audi 5000s (diesel)"
336 | 30.0 4. 146.0 67.00 3250. 21.8 80. 2. "mercedes-benz 240d"
337 | 44.6 4. 91.00 67.00 1850. 13.8 80. 3. "honda civic 1500 gl"
338 | 40.9 4. 85.00 NA 1835. 17.3 80. 2. "renault lecar deluxe"
339 | 33.8 4. 97.00 67.00 2145. 18.0 80. 3. "subaru dl"
340 | 29.8 4. 89.00 62.00 1845. 15.3 80. 2. "vokswagen rabbit"
341 | 32.7 6. 168.0 132.0 2910. 11.4 80. 3. "datsun 280-zx"
342 | 23.7 3. 70.00 100.0 2420. 12.5 80. 3. "mazda rx-7 gs"
343 | 35.0 4. 122.0 88.00 2500. 15.1 80. 2. "triumph tr7 coupe"
344 | 23.6 4. 140.0 NA 2905. 14.3 80. 1. "ford mustang cobra"
345 | 32.4 4. 107.0 72.00 2290. 17.0 80. 3. "honda accord"
346 | 27.2 4. 135.0 84.00 2490. 15.7 81. 1. "plymouth reliant"
347 | 26.6 4. 151.0 84.00 2635. 16.4 81. 1. "buick skylark"
348 | 25.8 4. 156.0 92.00 2620. 14.4 81. 1. "dodge aries wagon (sw)"
349 | 23.5 6. 173.0 110.0 2725. 12.6 81. 1. "chevrolet citation"
350 | 30.0 4. 135.0 84.00 2385. 12.9 81. 1. "plymouth reliant"
351 | 39.1 4. 79.00 58.00 1755. 16.9 81. 3. "toyota starlet"
352 | 39.0 4. 86.00 64.00 1875. 16.4 81. 1. "plymouth champ"
353 | 35.1 4. 81.00 60.00 1760. 16.1 81. 3. "honda civic 1300"
354 | 32.3 4. 97.00 67.00 2065. 17.8 81. 3. "subaru"
355 | 37.0 4. 85.00 65.00 1975. 19.4 81. 3. "datsun 210 mpg"
356 | 37.7 4. 89.00 62.00 2050. 17.3 81. 3. "toyota tercel"
357 | 34.1 4. 91.00 68.00 1985. 16.0 81. 3. "mazda glc 4"
358 | 34.7 4. 105.0 63.00 2215. 14.9 81. 1. "plymouth horizon 4"
359 | 34.4 4. 98.00 65.00 2045. 16.2 81. 1. "ford escort 4w"
360 | 29.9 4. 98.00 65.00 2380. 20.7 81. 1. "ford escort 2h"
361 | 33.0 4. 105.0 74.00 2190. 14.2 81. 2. "volkswagen jetta"
362 | 34.5 4. 100.0 NA 2320. 15.8 81. 2. "renault 18i"
363 | 33.7 4. 107.0 75.00 2210. 14.4 81. 3. "honda prelude"
364 | 32.4 4. 108.0 75.00 2350. 16.8 81. 3. "toyota corolla"
365 | 32.9 4. 119.0 100.0 2615. 14.8 81. 3. "datsun 200sx"
366 | 31.6 4. 120.0 74.00 2635. 18.3 81. 3. "mazda 626"
367 | 28.1 4. 141.0 80.00 3230. 20.4 81. 2. "peugeot 505s turbo diesel"
368 | NA 4. 121.0 110.0 2800. 15.4 81. 2. "saab 900s"
369 | 30.7 6. 145.0 76.00 3160. 19.6 81. 2. "volvo diesel"
370 | 25.4 6. 168.0 116.0 2900. 12.6 81. 3. "toyota cressida"
371 | 24.2 6. 146.0 120.0 2930. 13.8 81. 3. "datsun 810 maxima"
372 | 22.4 6. 231.0 110.0 3415. 15.8 81. 1. "buick century"
373 | 26.6 8. 350.0 105.0 3725. 19.0 81. 1. "oldsmobile cutlass ls"
374 | 20.2 6. 200.0 88.00 3060. 17.1 81. 1. "ford granada gl"
375 | 17.6 6. 225.0 85.00 3465. 16.6 81. 1. "chrysler lebaron salon"
376 | 28.0 4. 112.0 88.00 2605. 19.6 82. 1. "chevrolet cavalier"
377 | 27.0 4. 112.0 88.00 2640. 18.6 82. 1. "chevrolet cavalier wagon"
378 | 34.0 4. 112.0 88.00 2395. 18.0 82. 1. "chevrolet cavalier 2-door"
379 | 31.0 4. 112.0 85.00 2575. 16.2 82. 1. "pontiac j2000 se hatchback"
380 | 29.0 4. 135.0 84.00 2525. 16.0 82. 1. "dodge aries se"
381 | 27.0 4. 151.0 90.00 2735. 18.0 82. 1. "pontiac phoenix"
382 | 24.0 4. 140.0 92.00 2865. 16.4 82. 1. "ford fairmont futura"
383 | 23.0 4. 151.0 NA 3035. 20.5 82. 1. "amc concord dl"
384 | 36.0 4. 105.0 74.00 1980. 15.3 82. 2. "volkswagen rabbit l"
385 | 37.0 4. 91.00 68.00 2025. 18.2 82. 3. "mazda glc custom l"
386 | 31.0 4. 91.00 68.00 1970. 17.6 82. 3. "mazda glc custom"
387 | 38.0 4. 105.0 63.00 2125. 14.7 82. 1. "plymouth horizon miser"
388 | 36.0 4. 98.00 70.00 2125. 17.3 82. 1. "mercury lynx l"
389 | 36.0 4. 120.0 88.00 2160. 14.5 82. 3. "nissan stanza xe"
390 | 36.0 4. 107.0 75.00 2205. 14.5 82. 3. "honda accord"
391 | 34.0 4. 108.0 70.00 2245 16.9 82. 3. "toyota corolla"
392 | 38.0 4. 91.00 67.00 1965. 15.0 82. 3. "honda civic"
393 | 32.0 4. 91.00 67.00 1965. 15.7 82. 3. "honda civic (auto)"
394 | 38.0 4. 91.00 67.00 1995. 16.2 82. 3. "datsun 310 gx"
395 | 25.0 6. 181.0 110.0 2945. 16.4 82. 1. "buick century limited"
396 | 38.0 6. 262.0 85.00 3015. 17.0 82. 1. "oldsmobile cutlass ciera (diesel)"
397 | 26.0 4. 156.0 92.00 2585. 14.5 82. 1. "chrysler lebaron medallion"
398 | 22.0 6. 232.0 112.0 2835 14.7 82. 1. "ford granada l"
399 | 32.0 4. 144.0 96.00 2665. 13.9 82. 3. "toyota celica gt"
400 | 36.0 4. 135.0 84.00 2370. 13.0 82. 1. "dodge charger 2.2"
401 | 27.0 4. 151.0 90.00 2950. 17.3 82. 1. "chevrolet camaro"
402 | 27.0 4. 140.0 86.00 2790. 15.6 82. 1. "ford mustang gl"
403 | 44.0 4. 97.00 52.00 2130. 24.6 82. 2. "vw pickup"
404 | 32.0 4. 135.0 84.00 2295. 11.6 82. 1. "dodge rampage"
405 | 28.0 4. 120.0 79.00 2625. 18.6 82. 1. "ford ranger"
406 | 31.0 4. 119.0 82.00 2720. 19.4 82. 1. "chevy s-10"
407 |
--------------------------------------------------------------------------------
/Chapter09/auto-mpg.names:
--------------------------------------------------------------------------------
1 | 1. Title: Auto-Mpg Data
2 |
3 | 2. Sources:
4 | (a) Origin: This dataset was taken from the StatLib library which is
5 | maintained at Carnegie Mellon University. The dataset was
6 | used in the 1983 American Statistical Association Exposition.
7 | (c) Date: July 7, 1993
8 |
9 | 3. Past Usage:
10 | - See 2b (above)
11 | - Quinlan,R. (1993). Combining Instance-Based and Model-Based Learning.
12 | In Proceedings on the Tenth International Conference of Machine
13 | Learning, 236-243, University of Massachusetts, Amherst. Morgan
14 | Kaufmann.
15 |
16 | 4. Relevant Information:
17 |
18 | This dataset is a slightly modified version of the dataset provided in
19 | the StatLib library. In line with the use by Ross Quinlan (1993) in
20 | predicting the attribute "mpg", 8 of the original instances were removed
21 | because they had unknown values for the "mpg" attribute. The original
22 | dataset is available in the file "auto-mpg.data-original".
23 |
24 | "The data concerns city-cycle fuel consumption in miles per gallon,
25 | to be predicted in terms of 3 multivalued discrete and 5 continuous
26 | attributes." (Quinlan, 1993)
27 |
28 | 5. Number of Instances: 398
29 |
30 | 6. Number of Attributes: 9 including the class attribute
31 |
32 | 7. Attribute Information:
33 |
34 | 1. mpg: continuous
35 | 2. cylinders: multi-valued discrete
36 | 3. displacement: continuous
37 | 4. horsepower: continuous
38 | 5. weight: continuous
39 | 6. acceleration: continuous
40 | 7. model year: multi-valued discrete
41 | 8. origin: multi-valued discrete
42 | 9. car name: string (unique for each instance)
43 |
44 | 8. Missing Attribute Values: horsepower has 6 missing values
45 |
46 |
--------------------------------------------------------------------------------
/Chapter10/Chapter_10.r:
--------------------------------------------------------------------------------
1 | # Reading dataset
2 | library(readr)
3 | library(readxl)
4 | GlassDataset <- read_xlsx("Glass.xlsx")
5 |
6 | View(GlassDataset)
7 | str(GlassDataset)
8 |
9 | library(dplyr)
10 | library(tidyr)
11 |
12 | summary(GlassDataset)
13 | head(GlassDataset)
14 | tail(GlassDataset)
15 | str(GlassDataset)
16 |
17 | GlassDataset$Type = GlassDataset$Type %>% factor(labels = sort(unique(GlassDataset$Type)))
18 | View(GlassDataset)
19 |
20 | class(GlassDataset)
21 | dim(GlassDataset)
22 |
23 | colnames(GlassDataset)
24 |
25 | library(dplyr)
26 | glimpse(GlassDataset)
27 |
28 | plot(GlassDataset$Id, GlassDataset$Type, main = "Type of Glass", xlab = "Identification Number", ylab = "Type")
29 |
30 |
31 |
32 | #Hypothesis Test
33 |
34 | t.test(GlassDataset$RI, GlassDataset$Type)
35 |
36 | t.test(GlassDataset$RI, mu = 5, alternative = 'greater')
37 |
38 |
39 | t.test(GlassDataset$Type, mu = 5, alternative = 'greater')
40 |
41 | outlierKD <- function(dt, var) {
42 | + var_name <- eval(substitute(var),eval(dt))
43 | + na1 <- sum(is.na(var_name))
44 | + m1 <- mean(var_name, na.rm = T)
45 | + par(mfrow=c(2, 2), oma=c(0,0,3,0))
46 | + boxplot(var_name, main="With outliers")
47 | + hist(var_name, main="With outliers", xlab=NA, ylab=NA)
48 | + outlier <- boxplot.stats(var_name)$out
49 | + mo <- mean(outlier)
50 | + var_name <- ifelse(var_name %in% outlier, NA, var_name)
51 | + boxplot(var_name, main="Without outliers")
52 | + hist(var_name, main="Without outliers", xlab=NA, ylab=NA)
53 | + title("Outlier Check", outer=TRUE)
54 | + na2 <- sum(is.na(var_name))
55 | + cat("Outliers identified:", na2 - na1, "n")
56 | + cat("Propotion (%) of outliers:", round((na2 - na1) / sum(!is.na(var_name))*100, 1), "n")
57 | + cat("Mean of the outliers:", round(mo, 2), "n")
58 | + m2 <- mean(var_name, na.rm = T)
59 | + cat("Mean without removing outliers:", round(m1, 2), "n")
60 | + cat("Mean if we remove outliers:", round(m2, 2), "n")
61 | + response <- readline(prompt="Do you want to remove outliers and to replace with NA? [yes/no]: ")
62 | + if(response == "y" | response == "yes"){
63 | + dt[as.character(substitute(var))] <- invisible(var_name)
64 | + assign(as.character(as.list(match.call())$dt), dt, envir = .GlobalEnv)
65 | + cat("Outliers successfully removed", "n")
66 | + return(invisible(dt))
67 | + } else{
68 | + cat("Nothing changed", "n")
69 | + return(invisible(var_name))
70 | + }}
71 |
72 | outlierKD(GlassDataset,RI)
73 |
74 | library(outliers)
75 |
76 | library(ggplot2)
77 |
78 | grubbs.flag <- function(x) {
79 | + outliers <- NULL
80 | + test <- x
81 | + grubbs.result <- grubbs.test(test)
82 | + pv <- grubbs.result$p.value
83 | + while(pv < 0.05) {
84 | + outliers <- c(outliers,as.numeric(strsplit(grubbs.result$alternative," ")[[1]][3]))
85 | + test <- x[!x %in% outliers]
86 | + grubbs.result <- grubbs.test(test)
87 | + pv <- grubbs.result$p.value
88 | + }
89 | + return(data.frame(X=x,Outlier=(x %in% outliers)))
90 | + }
91 |
92 | grubbs.flag(GlassDataset$Na)
93 | ggplot(grubbs.flag(GlassDataset$Na),aes(x=GlassDataset$Na,color=Outlier,fill=Outlier))+ geom_histogram(binwidth=diff(range(GlassDataset$Na))/0.3)+ theme_bw()
94 |
95 |
96 | library(MoEClust)
97 |
98 | View(GlassDataset)
99 | Glass_Id<-GlassDataset[,1]
100 | RI<-GlassDataset[,2]
101 | Mg<-GlassDataset[,4]
102 | dim(GlassDataset)
103 |
104 | m1 <- MoE_clust(Mg, G=0:2, verbose=FALSE)
105 |
106 | m2 <- MoE_clust(Mg, G=2:16, verbose=FALSE)
107 |
108 |
109 | No covariates
110 | m3 <- MoE_clust(Mg, G=16:30, verbose=FALSE)
111 | comp <- MoE_compare(m1, m2)
112 | (mod <- as.Mclust(comp$optimal))
113 |
114 | plot(mod, what="classification")
115 | plot(mod, what="uncertainty")
116 |
117 | plot(comp$optimal, what="gpairs", jitter=FALSE)
118 |
119 | plot(GlassDataset$Na , GlassDataset$RI, xlab = 'Sodium Content', ylab = 'Refractive Index', main = 'Scatter plot for sodium content')
120 |
121 | library(ggplot2)
122 | ggplot(data=GlassDataset,aes(x=Id, y=Na)) + geom_point() + theme_minimal()+geom_col()
123 |
124 | ggplot(data=GlassDataset,aes(x=Id, y=Na)) + geom_point() + theme_minimal()
125 |
126 | library(GGally)
127 | ggpairs(GlassDataset)
128 |
129 | library(scatterplot3d)
130 | scatterplot3d(GlassDataset[,1:3])
131 |
132 | install.packages("ggpubr")
133 |
134 | library(ggpubr)
135 | ggscatter(GlassDataset, x = "RI", y = "Na", add = "reg.line", conf.int = TRUE, cor.coef = TRUE, cor.method = "pearson", xlab = "Refractive Index with Sodium Content")
136 |
137 | shapiro.test(GlassDataset$RI)
138 |
139 |
140 | shapiro.test(GlassDataset$Na)
141 |
142 | ggqqplot(GlassDataset$RI, ylab = "RI")
143 | ggqqplot(GlassDataset$Na, ylab = "Na")
144 |
145 | res <- cor.test(GlassDataset$RI, GlassDataset$Na,
146 | + method = "pearson")
147 |
148 |
149 | plot(res$p.value, res$parameter)
150 | res$p.value
151 |
152 | res$estimate
153 |
154 | res2 <- cor.test(GlassDataset$RI, GlassDataset$Na, method="kendall")
155 | res2
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
--------------------------------------------------------------------------------
/Chapter10/Glass.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter10/Glass.xlsx
--------------------------------------------------------------------------------
/Chapter10/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter10/README.md
--------------------------------------------------------------------------------
/Chapter10/glass.csv:
--------------------------------------------------------------------------------
1 | Id,RI,Na,Mg,Al,Si,K,Ca,Ba,Fe,Type
2 | 1,1.52101,13.64,4.49,1.1,71.78,0.06,8.75,0,0,1
3 | 2,1.51761,13.89,3.6,1.36,72.73,0.48,7.83,0,0,1
4 | 3,1.51618,13.53,3.55,1.54,72.99,0.39,7.78,0,0,1
5 | 4,1.51766,13.21,3.69,1.29,72.61,0.57,8.22,0,0,1
6 | 5,1.51742,13.27,3.62,1.24,73.08,0.55,8.07,0,0,1
7 | 6,1.51596,12.79,3.61,1.62,72.97,0.64,8.07,0,0.26,1
8 | 7,1.51743,13.3,3.6,1.14,73.09,0.58,8.17,0,0,1
9 | 8,1.51756,13.15,3.61,1.05,73.24,0.57,8.24,0,0,1
10 | 9,1.51918,14.04,3.58,1.37,72.08,0.56,8.3,0,0,1
11 | 10,1.51755,13,3.6,1.36,72.99,0.57,8.4,0,0.11,1
12 | 11,1.51571,12.72,3.46,1.56,73.2,0.67,8.09,0,0.24,1
13 | 12,1.51763,12.8,3.66,1.27,73.01,0.6,8.56,0,0,1
14 | 13,1.51589,12.88,3.43,1.4,73.28,0.69,8.05,0,0.24,1
15 | 14,1.51748,12.86,3.56,1.27,73.21,0.54,8.38,0,0.17,1
16 | 15,1.51763,12.61,3.59,1.31,73.29,0.58,8.5,0,0,1
17 | 16,1.51761,12.81,3.54,1.23,73.24,0.58,8.39,0,0,1
18 | 17,1.51784,12.68,3.67,1.16,73.11,0.61,8.7,0,0,1
19 | 18,1.52196,14.36,3.85,0.89,71.36,0.15,9.15,0,0,1
20 | 19,1.51911,13.9,3.73,1.18,72.12,0.06,8.89,0,0,1
21 | 20,1.51735,13.02,3.54,1.69,72.73,0.54,8.44,0,0.07,1
22 | 21,1.5175,12.82,3.55,1.49,72.75,0.54,8.52,0,0.19,1
23 | 22,1.51966,14.77,3.75,0.29,72.02,0.03,9,0,0,1
24 | 23,1.51736,12.78,3.62,1.29,72.79,0.59,8.7,0,0,1
25 | 24,1.51751,12.81,3.57,1.35,73.02,0.62,8.59,0,0,1
26 | 25,1.5172,13.38,3.5,1.15,72.85,0.5,8.43,0,0,1
27 | 26,1.51764,12.98,3.54,1.21,73,0.65,8.53,0,0,1
28 | 27,1.51793,13.21,3.48,1.41,72.64,0.59,8.43,0,0,1
29 | 28,1.51721,12.87,3.48,1.33,73.04,0.56,8.43,0,0,1
30 | 29,1.51768,12.56,3.52,1.43,73.15,0.57,8.54,0,0,1
31 | 30,1.51784,13.08,3.49,1.28,72.86,0.6,8.49,0,0,1
32 | 31,1.51768,12.65,3.56,1.3,73.08,0.61,8.69,0,0.14,1
33 | 32,1.51747,12.84,3.5,1.14,73.27,0.56,8.55,0,0,1
34 | 33,1.51775,12.85,3.48,1.23,72.97,0.61,8.56,0.09,0.22,1
35 | 34,1.51753,12.57,3.47,1.38,73.39,0.6,8.55,0,0.06,1
36 | 35,1.51783,12.69,3.54,1.34,72.95,0.57,8.75,0,0,1
37 | 36,1.51567,13.29,3.45,1.21,72.74,0.56,8.57,0,0,1
38 | 37,1.51909,13.89,3.53,1.32,71.81,0.51,8.78,0.11,0,1
39 | 38,1.51797,12.74,3.48,1.35,72.96,0.64,8.68,0,0,1
40 | 39,1.52213,14.21,3.82,0.47,71.77,0.11,9.57,0,0,1
41 | 40,1.52213,14.21,3.82,0.47,71.77,0.11,9.57,0,0,1
42 | 41,1.51793,12.79,3.5,1.12,73.03,0.64,8.77,0,0,1
43 | 42,1.51755,12.71,3.42,1.2,73.2,0.59,8.64,0,0,1
44 | 43,1.51779,13.21,3.39,1.33,72.76,0.59,8.59,0,0,1
45 | 44,1.5221,13.73,3.84,0.72,71.76,0.17,9.74,0,0,1
46 | 45,1.51786,12.73,3.43,1.19,72.95,0.62,8.76,0,0.3,1
47 | 46,1.519,13.49,3.48,1.35,71.95,0.55,9,0,0,1
48 | 47,1.51869,13.19,3.37,1.18,72.72,0.57,8.83,0,0.16,1
49 | 48,1.52667,13.99,3.7,0.71,71.57,0.02,9.82,0,0.1,1
50 | 49,1.52223,13.21,3.77,0.79,71.99,0.13,10.02,0,0,1
51 | 50,1.51898,13.58,3.35,1.23,72.08,0.59,8.91,0,0,1
52 | 51,1.5232,13.72,3.72,0.51,71.75,0.09,10.06,0,0.16,1
53 | 52,1.51926,13.2,3.33,1.28,72.36,0.6,9.14,0,0.11,1
54 | 53,1.51808,13.43,2.87,1.19,72.84,0.55,9.03,0,0,1
55 | 54,1.51837,13.14,2.84,1.28,72.85,0.55,9.07,0,0,1
56 | 55,1.51778,13.21,2.81,1.29,72.98,0.51,9.02,0,0.09,1
57 | 56,1.51769,12.45,2.71,1.29,73.7,0.56,9.06,0,0.24,1
58 | 57,1.51215,12.99,3.47,1.12,72.98,0.62,8.35,0,0.31,1
59 | 58,1.51824,12.87,3.48,1.29,72.95,0.6,8.43,0,0,1
60 | 59,1.51754,13.48,3.74,1.17,72.99,0.59,8.03,0,0,1
61 | 60,1.51754,13.39,3.66,1.19,72.79,0.57,8.27,0,0.11,1
62 | 61,1.51905,13.6,3.62,1.11,72.64,0.14,8.76,0,0,1
63 | 62,1.51977,13.81,3.58,1.32,71.72,0.12,8.67,0.69,0,1
64 | 63,1.52172,13.51,3.86,0.88,71.79,0.23,9.54,0,0.11,1
65 | 64,1.52227,14.17,3.81,0.78,71.35,0,9.69,0,0,1
66 | 65,1.52172,13.48,3.74,0.9,72.01,0.18,9.61,0,0.07,1
67 | 66,1.52099,13.69,3.59,1.12,71.96,0.09,9.4,0,0,1
68 | 67,1.52152,13.05,3.65,0.87,72.22,0.19,9.85,0,0.17,1
69 | 68,1.52152,13.05,3.65,0.87,72.32,0.19,9.85,0,0.17,1
70 | 69,1.52152,13.12,3.58,0.9,72.2,0.23,9.82,0,0.16,1
71 | 70,1.523,13.31,3.58,0.82,71.99,0.12,10.17,0,0.03,1
72 | 71,1.51574,14.86,3.67,1.74,71.87,0.16,7.36,0,0.12,2
73 | 72,1.51848,13.64,3.87,1.27,71.96,0.54,8.32,0,0.32,2
74 | 73,1.51593,13.09,3.59,1.52,73.1,0.67,7.83,0,0,2
75 | 74,1.51631,13.34,3.57,1.57,72.87,0.61,7.89,0,0,2
76 | 75,1.51596,13.02,3.56,1.54,73.11,0.72,7.9,0,0,2
77 | 76,1.5159,13.02,3.58,1.51,73.12,0.69,7.96,0,0,2
78 | 77,1.51645,13.44,3.61,1.54,72.39,0.66,8.03,0,0,2
79 | 78,1.51627,13,3.58,1.54,72.83,0.61,8.04,0,0,2
80 | 79,1.51613,13.92,3.52,1.25,72.88,0.37,7.94,0,0.14,2
81 | ,1.5159,12.82,3.52,1.9,72.86,0.69,7.97,0,0,2
82 | ,1.51592,12.86,3.52,2.12,72.66,0.69,7.97,0,0,2
83 | ,1.51593,13.25,3.45,1.43,73.17,0.61,7.86,0,0,2
84 | ,1.51646,13.41,3.55,1.25,72.81,0.68,8.1,0,0,2
85 | ,1.51594,13.09,3.52,1.55,72.87,0.68,8.05,0,0.09,2
86 | ,1.51409,14.25,3.09,2.08,72.28,1.1,7.08,0,0,2
87 | ,1.51625,13.36,3.58,1.49,72.72,0.45,8.21,0,0,2
88 | ,1.51569,13.24,3.49,1.47,73.25,0.38,8.03,0,0,2
89 | ,1.51645,13.4,3.49,1.52,72.65,0.67,8.08,0,0.1,2
90 | ,1.51618,13.01,3.5,1.48,72.89,0.6,8.12,0,0,2
91 | ,1.5164,12.55,3.48,1.87,73.23,0.63,8.08,0,0.09,2
92 | ,1.51841,12.93,3.74,1.11,72.28,0.64,8.96,0,0.22,2
93 | ,1.51605,12.9,3.44,1.45,73.06,0.44,8.27,0,0,2
94 | ,1.51588,13.12,3.41,1.58,73.26,0.07,8.39,0,0.19,2
95 | ,1.5159,13.24,3.34,1.47,73.1,0.39,8.22,0,0,2
96 | ,1.51629,12.71,3.33,1.49,73.28,0.67,8.24,0,0,2
97 | ,1.5186,13.36,3.43,1.43,72.26,0.51,8.6,0,0,2
98 | ,1.51841,13.02,3.62,1.06,72.34,0.64,9.13,0,0.15,2
99 | ,1.51743,12.2,3.25,1.16,73.55,0.62,8.9,0,0.24,2
100 | ,1.51689,12.67,2.88,1.71,73.21,0.73,8.54,0,0,2
101 | ,1.51811,12.96,2.96,1.43,72.92,0.6,8.79,0.14,0,2
102 | ,1.51655,12.75,2.85,1.44,73.27,0.57,8.79,0.11,0.22,2
103 | ,1.5173,12.35,2.72,1.63,72.87,0.7,9.23,0,0,2
104 | ,1.5182,12.62,2.76,0.83,73.81,0.35,9.42,0,0.2,2
105 | ,1.52725,13.8,3.15,0.66,70.57,0.08,11.64,0,0,2
106 | ,1.5241,13.83,2.9,1.17,71.15,0.08,10.79,0,0,2
107 | ,1.52475,11.45,0,1.88,72.19,0.81,13.24,0,0.34,2
108 | ,1.53125,10.73,0,2.1,69.81,0.58,13.3,3.15,0.28,2
109 | ,1.53393,12.3,0,1,70.16,0.12,16.19,0,0.24,2
110 | ,1.52222,14.43,0,1,72.67,0.1,11.52,0,0.08,2
111 | ,1.51818,13.72,0,0.56,74.45,0,10.99,0,0,2
112 | ,1.52664,11.23,0,0.77,73.21,0,14.68,0,0,2
113 | ,1.52739,11.02,0,0.75,73.08,0,14.96,0,0,2
114 | ,1.52777,12.64,0,0.67,72.02,0.06,14.4,0,0,2
115 | ,1.51892,13.46,3.83,1.26,72.55,0.57,8.21,0,0.14,2
116 | ,1.51847,13.1,3.97,1.19,72.44,0.6,8.43,0,0,2
117 | ,1.51846,13.41,3.89,1.33,72.38,0.51,8.28,0,0,2
118 | ,1.51829,13.24,3.9,1.41,72.33,0.55,8.31,0,0.1,2
119 | ,1.51708,13.72,3.68,1.81,72.06,0.64,7.88,0,0,2
120 | ,1.51673,13.3,3.64,1.53,72.53,0.65,8.03,0,0.29,2
121 | ,1.51652,13.56,3.57,1.47,72.45,0.64,7.96,0,0,2
122 | ,1.51844,13.25,3.76,1.32,72.4,0.58,8.42,0,0,2
123 | ,1.51663,12.93,3.54,1.62,72.96,0.64,8.03,0,0.21,2
124 | ,1.51687,13.23,3.54,1.48,72.84,0.56,8.1,0,0,2
125 | ,1.51707,13.48,3.48,1.71,72.52,0.62,7.99,0,0,2
126 | ,1.52177,13.2,3.68,1.15,72.75,0.54,8.52,0,0,2
127 | ,1.51872,12.93,3.66,1.56,72.51,0.58,8.55,0,0.12,2
128 | ,1.51667,12.94,3.61,1.26,72.75,0.56,8.6,0,0,2
129 | ,1.52081,13.78,2.28,1.43,71.99,0.49,9.85,0,0.17,2
130 | ,1.52068,13.55,2.09,1.67,72.18,0.53,9.57,0.27,0.17,2
131 | ,1.5202,13.98,1.35,1.63,71.76,0.39,10.56,0,0.18,2
132 | ,1.52177,13.75,1.01,1.36,72.19,0.33,11.14,0,0,2
133 | ,1.52614,13.7,0,1.36,71.24,0.19,13.44,0,0.1,2
134 | ,1.51813,13.43,3.98,1.18,72.49,0.58,8.15,0,0,2
135 | ,1.518,13.71,3.93,1.54,71.81,0.54,8.21,0,0.15,2
136 | ,1.51811,13.33,3.85,1.25,72.78,0.52,8.12,0,0,2
137 | ,1.51789,13.19,3.9,1.3,72.33,0.55,8.44,0,0.28,2
138 | ,1.51806,13,3.8,1.08,73.07,0.56,8.38,0,0.12,2
139 | ,1.51711,12.89,3.62,1.57,72.96,0.61,8.11,0,0,2
140 | ,1.51674,12.79,3.52,1.54,73.36,0.66,7.9,0,0,2
141 | ,1.51674,12.87,3.56,1.64,73.14,0.65,7.99,0,0,2
142 | ,1.5169,13.33,3.54,1.61,72.54,0.68,8.11,0,0,2
143 | ,1.51851,13.2,3.63,1.07,72.83,0.57,8.41,0.09,0.17,2
144 | ,1.51662,12.85,3.51,1.44,73.01,0.68,8.23,0.06,0.25,2
145 | ,1.51709,13,3.47,1.79,72.72,0.66,8.18,0,0,2
146 | ,1.5166,12.99,3.18,1.23,72.97,0.58,8.81,0,0.24,2
147 | ,1.51839,12.85,3.67,1.24,72.57,0.62,8.68,0,0.35,2
148 | ,1.51769,13.65,3.66,1.11,72.77,0.11,8.6,0,0,3
149 | ,1.5161,13.33,3.53,1.34,72.67,0.56,8.33,0,0,3
150 | ,1.5167,13.24,3.57,1.38,72.7,0.56,8.44,0,0.1,3
151 | ,1.51643,12.16,3.52,1.35,72.89,0.57,8.53,0,0,3
152 | ,1.51665,13.14,3.45,1.76,72.48,0.6,8.38,0,0.17,3
153 | ,1.52127,14.32,3.9,0.83,71.5,0,9.49,0,0,3
154 | ,1.51779,13.64,3.65,0.65,73,0.06,8.93,0,0,3
155 | ,1.5161,13.42,3.4,1.22,72.69,0.59,8.32,0,0,3
156 | ,1.51694,12.86,3.58,1.31,72.61,0.61,8.79,0,0,3
157 | ,1.51646,13.04,3.4,1.26,73.01,0.52,8.58,0,0,3
158 | ,1.51655,13.41,3.39,1.28,72.64,0.52,8.65,0,0,3
159 | ,1.52121,14.03,3.76,0.58,71.79,0.11,9.65,0,0,3
160 | ,1.51776,13.53,3.41,1.52,72.04,0.58,8.79,0,0,3
161 | ,1.51796,13.5,3.36,1.63,71.94,0.57,8.81,0,0.09,3
162 | ,1.51832,13.33,3.34,1.54,72.14,0.56,8.99,0,0,3
163 | ,1.51934,13.64,3.54,0.75,72.65,0.16,8.89,0.15,0.24,3
164 | ,1.52211,14.19,3.78,0.91,71.36,0.23,9.14,0,0.37,3
165 | ,1.51514,14.01,2.68,3.5,69.89,1.68,5.87,2.2,0,5
166 | ,1.51915,12.73,1.85,1.86,72.69,0.6,10.09,0,0,5
167 | ,1.52171,11.56,1.88,1.56,72.86,0.47,11.41,0,0,5
168 | ,1.52151,11.03,1.71,1.56,73.44,0.58,11.62,0,0,5
169 | ,1.51969,12.64,0,1.65,73.75,0.38,11.53,0,0,5
170 | ,1.51666,12.86,0,1.83,73.88,0.97,10.17,0,0,5
171 | ,1.51994,13.27,0,1.76,73.03,0.47,11.32,0,0,5
172 | ,1.52369,13.44,0,1.58,72.22,0.32,12.24,0,0,5
173 | ,1.51316,13.02,0,3.04,70.48,6.21,6.96,0,0,5
174 | ,1.51321,13,0,3.02,70.7,6.21,6.93,0,0,5
175 | ,1.52043,13.38,0,1.4,72.25,0.33,12.5,0,0,5
176 | ,1.52058,12.85,1.61,2.17,72.18,0.76,9.7,0.24,0.51,5
177 | ,1.52119,12.97,0.33,1.51,73.39,0.13,11.27,0,0.28,5
178 | ,1.51905,14,2.39,1.56,72.37,0,9.57,0,0,6
179 | ,1.51937,13.79,2.41,1.19,72.76,0,9.77,0,0,6
180 | ,1.51829,14.46,2.24,1.62,72.38,0,9.26,0,0,6
181 | ,1.51852,14.09,2.19,1.66,72.67,0,9.32,0,0,6
182 | ,1.51299,14.4,1.74,1.54,74.55,0,7.59,0,0,6
183 | ,1.51888,14.99,0.78,1.74,72.5,0,9.95,0,0,6
184 | ,1.51916,14.15,0,2.09,72.74,0,10.88,0,0,6
185 | ,1.51969,14.56,0,0.56,73.48,0,11.22,0,0,6
186 | ,1.51115,17.38,0,0.34,75.41,0,6.65,0,0,6
187 | ,1.51131,13.69,3.2,1.81,72.81,1.76,5.43,1.19,0,7
188 | ,1.51838,14.32,3.26,2.22,71.25,1.46,5.79,1.63,0,7
189 | ,1.52315,13.44,3.34,1.23,72.38,0.6,8.83,0,0,7
190 | ,1.52247,14.86,2.2,2.06,70.26,0.76,9.76,0,0,7
191 | ,1.52365,15.79,1.83,1.31,70.43,0.31,8.61,1.68,0,7
192 | ,1.51613,13.88,1.78,1.79,73.1,0,8.67,0.76,0,7
193 | ,1.51602,14.85,0,2.38,73.28,0,8.76,0.64,0.09,7
194 | ,1.51623,14.2,0,2.79,73.46,0.04,9.04,0.4,0.09,7
195 | ,1.51719,14.75,0,2,73.02,0,8.53,1.59,0.08,7
196 | ,1.51683,14.56,0,1.98,73.29,0,8.52,1.57,0.07,7
197 | ,1.51545,14.14,0,2.68,73.39,0.08,9.07,0.61,0.05,7
198 | ,1.51556,13.87,0,2.54,73.23,0.14,9.41,0.81,0.01,7
199 | ,1.51727,14.7,0,2.34,73.28,0,8.95,0.66,0,7
200 | ,1.51531,14.38,0,2.66,73.1,0.04,9.08,0.64,0,7
201 | ,1.51609,15.01,0,2.51,73.05,0.05,8.83,0.53,0,7
202 | ,1.51508,15.15,0,2.25,73.5,0,8.34,0.63,0,7
203 | ,1.51653,11.95,0,1.19,75.18,2.7,8.93,0,0,7
204 | ,1.51514,14.85,0,2.42,73.72,0,8.39,0.56,0,7
205 | ,1.51658,14.8,0,1.99,73.11,0,8.28,1.71,0,7
206 | ,1.51617,14.95,0,2.27,73.3,0,8.71,0.67,0,7
207 | ,1.51732,14.95,0,1.8,72.99,0,8.61,1.55,0,7
208 | ,1.51645,14.94,0,1.87,73.11,0,8.67,1.38,0,7
209 | ,1.51831,14.39,0,1.82,72.86,1.41,6.47,2.88,0,7
210 | ,1.5164,14.37,0,2.74,72.85,0,9.45,0.54,0,7
211 | ,1.51623,14.14,0,2.88,72.61,0.08,9.18,1.06,0,7
212 | ,1.51685,14.92,0,1.99,73.06,0,8.4,1.59,0,7
213 | ,1.52065,14.36,0,2.02,73.42,0,8.44,1.64,0,7
214 | ,1.51651,14.38,0,1.94,73.61,0,8.48,1.57,0,7
215 | ,1.51711,14.23,0,2.08,73.36,0,8.62,1.67,0,7
216 |
--------------------------------------------------------------------------------
/Chapter10/glass.data:
--------------------------------------------------------------------------------
1 | 1,1.52101,13.64,4.49,1.10,71.78,0.06,8.75,0.00,0.00,1
2 | 2,1.51761,13.89,3.60,1.36,72.73,0.48,7.83,0.00,0.00,1
3 | 3,1.51618,13.53,3.55,1.54,72.99,0.39,7.78,0.00,0.00,1
4 | 4,1.51766,13.21,3.69,1.29,72.61,0.57,8.22,0.00,0.00,1
5 | 5,1.51742,13.27,3.62,1.24,73.08,0.55,8.07,0.00,0.00,1
6 | 6,1.51596,12.79,3.61,1.62,72.97,0.64,8.07,0.00,0.26,1
7 | 7,1.51743,13.30,3.60,1.14,73.09,0.58,8.17,0.00,0.00,1
8 | 8,1.51756,13.15,3.61,1.05,73.24,0.57,8.24,0.00,0.00,1
9 | 9,1.51918,14.04,3.58,1.37,72.08,0.56,8.30,0.00,0.00,1
10 | 10,1.51755,13.00,3.60,1.36,72.99,0.57,8.40,0.00,0.11,1
11 | 11,1.51571,12.72,3.46,1.56,73.20,0.67,8.09,0.00,0.24,1
12 | 12,1.51763,12.80,3.66,1.27,73.01,0.60,8.56,0.00,0.00,1
13 | 13,1.51589,12.88,3.43,1.40,73.28,0.69,8.05,0.00,0.24,1
14 | 14,1.51748,12.86,3.56,1.27,73.21,0.54,8.38,0.00,0.17,1
15 | 15,1.51763,12.61,3.59,1.31,73.29,0.58,8.50,0.00,0.00,1
16 | 16,1.51761,12.81,3.54,1.23,73.24,0.58,8.39,0.00,0.00,1
17 | 17,1.51784,12.68,3.67,1.16,73.11,0.61,8.70,0.00,0.00,1
18 | 18,1.52196,14.36,3.85,0.89,71.36,0.15,9.15,0.00,0.00,1
19 | 19,1.51911,13.90,3.73,1.18,72.12,0.06,8.89,0.00,0.00,1
20 | 20,1.51735,13.02,3.54,1.69,72.73,0.54,8.44,0.00,0.07,1
21 | 21,1.51750,12.82,3.55,1.49,72.75,0.54,8.52,0.00,0.19,1
22 | 22,1.51966,14.77,3.75,0.29,72.02,0.03,9.00,0.00,0.00,1
23 | 23,1.51736,12.78,3.62,1.29,72.79,0.59,8.70,0.00,0.00,1
24 | 24,1.51751,12.81,3.57,1.35,73.02,0.62,8.59,0.00,0.00,1
25 | 25,1.51720,13.38,3.50,1.15,72.85,0.50,8.43,0.00,0.00,1
26 | 26,1.51764,12.98,3.54,1.21,73.00,0.65,8.53,0.00,0.00,1
27 | 27,1.51793,13.21,3.48,1.41,72.64,0.59,8.43,0.00,0.00,1
28 | 28,1.51721,12.87,3.48,1.33,73.04,0.56,8.43,0.00,0.00,1
29 | 29,1.51768,12.56,3.52,1.43,73.15,0.57,8.54,0.00,0.00,1
30 | 30,1.51784,13.08,3.49,1.28,72.86,0.60,8.49,0.00,0.00,1
31 | 31,1.51768,12.65,3.56,1.30,73.08,0.61,8.69,0.00,0.14,1
32 | 32,1.51747,12.84,3.50,1.14,73.27,0.56,8.55,0.00,0.00,1
33 | 33,1.51775,12.85,3.48,1.23,72.97,0.61,8.56,0.09,0.22,1
34 | 34,1.51753,12.57,3.47,1.38,73.39,0.60,8.55,0.00,0.06,1
35 | 35,1.51783,12.69,3.54,1.34,72.95,0.57,8.75,0.00,0.00,1
36 | 36,1.51567,13.29,3.45,1.21,72.74,0.56,8.57,0.00,0.00,1
37 | 37,1.51909,13.89,3.53,1.32,71.81,0.51,8.78,0.11,0.00,1
38 | 38,1.51797,12.74,3.48,1.35,72.96,0.64,8.68,0.00,0.00,1
39 | 39,1.52213,14.21,3.82,0.47,71.77,0.11,9.57,0.00,0.00,1
40 | 40,1.52213,14.21,3.82,0.47,71.77,0.11,9.57,0.00,0.00,1
41 | 41,1.51793,12.79,3.50,1.12,73.03,0.64,8.77,0.00,0.00,1
42 | 42,1.51755,12.71,3.42,1.20,73.20,0.59,8.64,0.00,0.00,1
43 | 43,1.51779,13.21,3.39,1.33,72.76,0.59,8.59,0.00,0.00,1
44 | 44,1.52210,13.73,3.84,0.72,71.76,0.17,9.74,0.00,0.00,1
45 | 45,1.51786,12.73,3.43,1.19,72.95,0.62,8.76,0.00,0.30,1
46 | 46,1.51900,13.49,3.48,1.35,71.95,0.55,9.00,0.00,0.00,1
47 | 47,1.51869,13.19,3.37,1.18,72.72,0.57,8.83,0.00,0.16,1
48 | 48,1.52667,13.99,3.70,0.71,71.57,0.02,9.82,0.00,0.10,1
49 | 49,1.52223,13.21,3.77,0.79,71.99,0.13,10.02,0.00,0.00,1
50 | 50,1.51898,13.58,3.35,1.23,72.08,0.59,8.91,0.00,0.00,1
51 | 51,1.52320,13.72,3.72,0.51,71.75,0.09,10.06,0.00,0.16,1
52 | 52,1.51926,13.20,3.33,1.28,72.36,0.60,9.14,0.00,0.11,1
53 | 53,1.51808,13.43,2.87,1.19,72.84,0.55,9.03,0.00,0.00,1
54 | 54,1.51837,13.14,2.84,1.28,72.85,0.55,9.07,0.00,0.00,1
55 | 55,1.51778,13.21,2.81,1.29,72.98,0.51,9.02,0.00,0.09,1
56 | 56,1.51769,12.45,2.71,1.29,73.70,0.56,9.06,0.00,0.24,1
57 | 57,1.51215,12.99,3.47,1.12,72.98,0.62,8.35,0.00,0.31,1
58 | 58,1.51824,12.87,3.48,1.29,72.95,0.60,8.43,0.00,0.00,1
59 | 59,1.51754,13.48,3.74,1.17,72.99,0.59,8.03,0.00,0.00,1
60 | 60,1.51754,13.39,3.66,1.19,72.79,0.57,8.27,0.00,0.11,1
61 | 61,1.51905,13.60,3.62,1.11,72.64,0.14,8.76,0.00,0.00,1
62 | 62,1.51977,13.81,3.58,1.32,71.72,0.12,8.67,0.69,0.00,1
63 | 63,1.52172,13.51,3.86,0.88,71.79,0.23,9.54,0.00,0.11,1
64 | 64,1.52227,14.17,3.81,0.78,71.35,0.00,9.69,0.00,0.00,1
65 | 65,1.52172,13.48,3.74,0.90,72.01,0.18,9.61,0.00,0.07,1
66 | 66,1.52099,13.69,3.59,1.12,71.96,0.09,9.40,0.00,0.00,1
67 | 67,1.52152,13.05,3.65,0.87,72.22,0.19,9.85,0.00,0.17,1
68 | 68,1.52152,13.05,3.65,0.87,72.32,0.19,9.85,0.00,0.17,1
69 | 69,1.52152,13.12,3.58,0.90,72.20,0.23,9.82,0.00,0.16,1
70 | 70,1.52300,13.31,3.58,0.82,71.99,0.12,10.17,0.00,0.03,1
71 | 71,1.51574,14.86,3.67,1.74,71.87,0.16,7.36,0.00,0.12,2
72 | 72,1.51848,13.64,3.87,1.27,71.96,0.54,8.32,0.00,0.32,2
73 | 73,1.51593,13.09,3.59,1.52,73.10,0.67,7.83,0.00,0.00,2
74 | 74,1.51631,13.34,3.57,1.57,72.87,0.61,7.89,0.00,0.00,2
75 | 75,1.51596,13.02,3.56,1.54,73.11,0.72,7.90,0.00,0.00,2
76 | 76,1.51590,13.02,3.58,1.51,73.12,0.69,7.96,0.00,0.00,2
77 | 77,1.51645,13.44,3.61,1.54,72.39,0.66,8.03,0.00,0.00,2
78 | 78,1.51627,13.00,3.58,1.54,72.83,0.61,8.04,0.00,0.00,2
79 | 79,1.51613,13.92,3.52,1.25,72.88,0.37,7.94,0.00,0.14,2
80 | 80,1.51590,12.82,3.52,1.90,72.86,0.69,7.97,0.00,0.00,2
81 | 81,1.51592,12.86,3.52,2.12,72.66,0.69,7.97,0.00,0.00,2
82 | 82,1.51593,13.25,3.45,1.43,73.17,0.61,7.86,0.00,0.00,2
83 | 83,1.51646,13.41,3.55,1.25,72.81,0.68,8.10,0.00,0.00,2
84 | 84,1.51594,13.09,3.52,1.55,72.87,0.68,8.05,0.00,0.09,2
85 | 85,1.51409,14.25,3.09,2.08,72.28,1.10,7.08,0.00,0.00,2
86 | 86,1.51625,13.36,3.58,1.49,72.72,0.45,8.21,0.00,0.00,2
87 | 87,1.51569,13.24,3.49,1.47,73.25,0.38,8.03,0.00,0.00,2
88 | 88,1.51645,13.40,3.49,1.52,72.65,0.67,8.08,0.00,0.10,2
89 | 89,1.51618,13.01,3.50,1.48,72.89,0.60,8.12,0.00,0.00,2
90 | 90,1.51640,12.55,3.48,1.87,73.23,0.63,8.08,0.00,0.09,2
91 | 91,1.51841,12.93,3.74,1.11,72.28,0.64,8.96,0.00,0.22,2
92 | 92,1.51605,12.90,3.44,1.45,73.06,0.44,8.27,0.00,0.00,2
93 | 93,1.51588,13.12,3.41,1.58,73.26,0.07,8.39,0.00,0.19,2
94 | 94,1.51590,13.24,3.34,1.47,73.10,0.39,8.22,0.00,0.00,2
95 | 95,1.51629,12.71,3.33,1.49,73.28,0.67,8.24,0.00,0.00,2
96 | 96,1.51860,13.36,3.43,1.43,72.26,0.51,8.60,0.00,0.00,2
97 | 97,1.51841,13.02,3.62,1.06,72.34,0.64,9.13,0.00,0.15,2
98 | 98,1.51743,12.20,3.25,1.16,73.55,0.62,8.90,0.00,0.24,2
99 | 99,1.51689,12.67,2.88,1.71,73.21,0.73,8.54,0.00,0.00,2
100 | 100,1.51811,12.96,2.96,1.43,72.92,0.60,8.79,0.14,0.00,2
101 | 101,1.51655,12.75,2.85,1.44,73.27,0.57,8.79,0.11,0.22,2
102 | 102,1.51730,12.35,2.72,1.63,72.87,0.70,9.23,0.00,0.00,2
103 | 103,1.51820,12.62,2.76,0.83,73.81,0.35,9.42,0.00,0.20,2
104 | 104,1.52725,13.80,3.15,0.66,70.57,0.08,11.64,0.00,0.00,2
105 | 105,1.52410,13.83,2.90,1.17,71.15,0.08,10.79,0.00,0.00,2
106 | 106,1.52475,11.45,0.00,1.88,72.19,0.81,13.24,0.00,0.34,2
107 | 107,1.53125,10.73,0.00,2.10,69.81,0.58,13.30,3.15,0.28,2
108 | 108,1.53393,12.30,0.00,1.00,70.16,0.12,16.19,0.00,0.24,2
109 | 109,1.52222,14.43,0.00,1.00,72.67,0.10,11.52,0.00,0.08,2
110 | 110,1.51818,13.72,0.00,0.56,74.45,0.00,10.99,0.00,0.00,2
111 | 111,1.52664,11.23,0.00,0.77,73.21,0.00,14.68,0.00,0.00,2
112 | 112,1.52739,11.02,0.00,0.75,73.08,0.00,14.96,0.00,0.00,2
113 | 113,1.52777,12.64,0.00,0.67,72.02,0.06,14.40,0.00,0.00,2
114 | 114,1.51892,13.46,3.83,1.26,72.55,0.57,8.21,0.00,0.14,2
115 | 115,1.51847,13.10,3.97,1.19,72.44,0.60,8.43,0.00,0.00,2
116 | 116,1.51846,13.41,3.89,1.33,72.38,0.51,8.28,0.00,0.00,2
117 | 117,1.51829,13.24,3.90,1.41,72.33,0.55,8.31,0.00,0.10,2
118 | 118,1.51708,13.72,3.68,1.81,72.06,0.64,7.88,0.00,0.00,2
119 | 119,1.51673,13.30,3.64,1.53,72.53,0.65,8.03,0.00,0.29,2
120 | 120,1.51652,13.56,3.57,1.47,72.45,0.64,7.96,0.00,0.00,2
121 | 121,1.51844,13.25,3.76,1.32,72.40,0.58,8.42,0.00,0.00,2
122 | 122,1.51663,12.93,3.54,1.62,72.96,0.64,8.03,0.00,0.21,2
123 | 123,1.51687,13.23,3.54,1.48,72.84,0.56,8.10,0.00,0.00,2
124 | 124,1.51707,13.48,3.48,1.71,72.52,0.62,7.99,0.00,0.00,2
125 | 125,1.52177,13.20,3.68,1.15,72.75,0.54,8.52,0.00,0.00,2
126 | 126,1.51872,12.93,3.66,1.56,72.51,0.58,8.55,0.00,0.12,2
127 | 127,1.51667,12.94,3.61,1.26,72.75,0.56,8.60,0.00,0.00,2
128 | 128,1.52081,13.78,2.28,1.43,71.99,0.49,9.85,0.00,0.17,2
129 | 129,1.52068,13.55,2.09,1.67,72.18,0.53,9.57,0.27,0.17,2
130 | 130,1.52020,13.98,1.35,1.63,71.76,0.39,10.56,0.00,0.18,2
131 | 131,1.52177,13.75,1.01,1.36,72.19,0.33,11.14,0.00,0.00,2
132 | 132,1.52614,13.70,0.00,1.36,71.24,0.19,13.44,0.00,0.10,2
133 | 133,1.51813,13.43,3.98,1.18,72.49,0.58,8.15,0.00,0.00,2
134 | 134,1.51800,13.71,3.93,1.54,71.81,0.54,8.21,0.00,0.15,2
135 | 135,1.51811,13.33,3.85,1.25,72.78,0.52,8.12,0.00,0.00,2
136 | 136,1.51789,13.19,3.90,1.30,72.33,0.55,8.44,0.00,0.28,2
137 | 137,1.51806,13.00,3.80,1.08,73.07,0.56,8.38,0.00,0.12,2
138 | 138,1.51711,12.89,3.62,1.57,72.96,0.61,8.11,0.00,0.00,2
139 | 139,1.51674,12.79,3.52,1.54,73.36,0.66,7.90,0.00,0.00,2
140 | 140,1.51674,12.87,3.56,1.64,73.14,0.65,7.99,0.00,0.00,2
141 | 141,1.51690,13.33,3.54,1.61,72.54,0.68,8.11,0.00,0.00,2
142 | 142,1.51851,13.20,3.63,1.07,72.83,0.57,8.41,0.09,0.17,2
143 | 143,1.51662,12.85,3.51,1.44,73.01,0.68,8.23,0.06,0.25,2
144 | 144,1.51709,13.00,3.47,1.79,72.72,0.66,8.18,0.00,0.00,2
145 | 145,1.51660,12.99,3.18,1.23,72.97,0.58,8.81,0.00,0.24,2
146 | 146,1.51839,12.85,3.67,1.24,72.57,0.62,8.68,0.00,0.35,2
147 | 147,1.51769,13.65,3.66,1.11,72.77,0.11,8.60,0.00,0.00,3
148 | 148,1.51610,13.33,3.53,1.34,72.67,0.56,8.33,0.00,0.00,3
149 | 149,1.51670,13.24,3.57,1.38,72.70,0.56,8.44,0.00,0.10,3
150 | 150,1.51643,12.16,3.52,1.35,72.89,0.57,8.53,0.00,0.00,3
151 | 151,1.51665,13.14,3.45,1.76,72.48,0.60,8.38,0.00,0.17,3
152 | 152,1.52127,14.32,3.90,0.83,71.50,0.00,9.49,0.00,0.00,3
153 | 153,1.51779,13.64,3.65,0.65,73.00,0.06,8.93,0.00,0.00,3
154 | 154,1.51610,13.42,3.40,1.22,72.69,0.59,8.32,0.00,0.00,3
155 | 155,1.51694,12.86,3.58,1.31,72.61,0.61,8.79,0.00,0.00,3
156 | 156,1.51646,13.04,3.40,1.26,73.01,0.52,8.58,0.00,0.00,3
157 | 157,1.51655,13.41,3.39,1.28,72.64,0.52,8.65,0.00,0.00,3
158 | 158,1.52121,14.03,3.76,0.58,71.79,0.11,9.65,0.00,0.00,3
159 | 159,1.51776,13.53,3.41,1.52,72.04,0.58,8.79,0.00,0.00,3
160 | 160,1.51796,13.50,3.36,1.63,71.94,0.57,8.81,0.00,0.09,3
161 | 161,1.51832,13.33,3.34,1.54,72.14,0.56,8.99,0.00,0.00,3
162 | 162,1.51934,13.64,3.54,0.75,72.65,0.16,8.89,0.15,0.24,3
163 | 163,1.52211,14.19,3.78,0.91,71.36,0.23,9.14,0.00,0.37,3
164 | 164,1.51514,14.01,2.68,3.50,69.89,1.68,5.87,2.20,0.00,5
165 | 165,1.51915,12.73,1.85,1.86,72.69,0.60,10.09,0.00,0.00,5
166 | 166,1.52171,11.56,1.88,1.56,72.86,0.47,11.41,0.00,0.00,5
167 | 167,1.52151,11.03,1.71,1.56,73.44,0.58,11.62,0.00,0.00,5
168 | 168,1.51969,12.64,0.00,1.65,73.75,0.38,11.53,0.00,0.00,5
169 | 169,1.51666,12.86,0.00,1.83,73.88,0.97,10.17,0.00,0.00,5
170 | 170,1.51994,13.27,0.00,1.76,73.03,0.47,11.32,0.00,0.00,5
171 | 171,1.52369,13.44,0.00,1.58,72.22,0.32,12.24,0.00,0.00,5
172 | 172,1.51316,13.02,0.00,3.04,70.48,6.21,6.96,0.00,0.00,5
173 | 173,1.51321,13.00,0.00,3.02,70.70,6.21,6.93,0.00,0.00,5
174 | 174,1.52043,13.38,0.00,1.40,72.25,0.33,12.50,0.00,0.00,5
175 | 175,1.52058,12.85,1.61,2.17,72.18,0.76,9.70,0.24,0.51,5
176 | 176,1.52119,12.97,0.33,1.51,73.39,0.13,11.27,0.00,0.28,5
177 | 177,1.51905,14.00,2.39,1.56,72.37,0.00,9.57,0.00,0.00,6
178 | 178,1.51937,13.79,2.41,1.19,72.76,0.00,9.77,0.00,0.00,6
179 | 179,1.51829,14.46,2.24,1.62,72.38,0.00,9.26,0.00,0.00,6
180 | 180,1.51852,14.09,2.19,1.66,72.67,0.00,9.32,0.00,0.00,6
181 | 181,1.51299,14.40,1.74,1.54,74.55,0.00,7.59,0.00,0.00,6
182 | 182,1.51888,14.99,0.78,1.74,72.50,0.00,9.95,0.00,0.00,6
183 | 183,1.51916,14.15,0.00,2.09,72.74,0.00,10.88,0.00,0.00,6
184 | 184,1.51969,14.56,0.00,0.56,73.48,0.00,11.22,0.00,0.00,6
185 | 185,1.51115,17.38,0.00,0.34,75.41,0.00,6.65,0.00,0.00,6
186 | 186,1.51131,13.69,3.20,1.81,72.81,1.76,5.43,1.19,0.00,7
187 | 187,1.51838,14.32,3.26,2.22,71.25,1.46,5.79,1.63,0.00,7
188 | 188,1.52315,13.44,3.34,1.23,72.38,0.60,8.83,0.00,0.00,7
189 | 189,1.52247,14.86,2.20,2.06,70.26,0.76,9.76,0.00,0.00,7
190 | 190,1.52365,15.79,1.83,1.31,70.43,0.31,8.61,1.68,0.00,7
191 | 191,1.51613,13.88,1.78,1.79,73.10,0.00,8.67,0.76,0.00,7
192 | 192,1.51602,14.85,0.00,2.38,73.28,0.00,8.76,0.64,0.09,7
193 | 193,1.51623,14.20,0.00,2.79,73.46,0.04,9.04,0.40,0.09,7
194 | 194,1.51719,14.75,0.00,2.00,73.02,0.00,8.53,1.59,0.08,7
195 | 195,1.51683,14.56,0.00,1.98,73.29,0.00,8.52,1.57,0.07,7
196 | 196,1.51545,14.14,0.00,2.68,73.39,0.08,9.07,0.61,0.05,7
197 | 197,1.51556,13.87,0.00,2.54,73.23,0.14,9.41,0.81,0.01,7
198 | 198,1.51727,14.70,0.00,2.34,73.28,0.00,8.95,0.66,0.00,7
199 | 199,1.51531,14.38,0.00,2.66,73.10,0.04,9.08,0.64,0.00,7
200 | 200,1.51609,15.01,0.00,2.51,73.05,0.05,8.83,0.53,0.00,7
201 | 201,1.51508,15.15,0.00,2.25,73.50,0.00,8.34,0.63,0.00,7
202 | 202,1.51653,11.95,0.00,1.19,75.18,2.70,8.93,0.00,0.00,7
203 | 203,1.51514,14.85,0.00,2.42,73.72,0.00,8.39,0.56,0.00,7
204 | 204,1.51658,14.80,0.00,1.99,73.11,0.00,8.28,1.71,0.00,7
205 | 205,1.51617,14.95,0.00,2.27,73.30,0.00,8.71,0.67,0.00,7
206 | 206,1.51732,14.95,0.00,1.80,72.99,0.00,8.61,1.55,0.00,7
207 | 207,1.51645,14.94,0.00,1.87,73.11,0.00,8.67,1.38,0.00,7
208 | 208,1.51831,14.39,0.00,1.82,72.86,1.41,6.47,2.88,0.00,7
209 | 209,1.51640,14.37,0.00,2.74,72.85,0.00,9.45,0.54,0.00,7
210 | 210,1.51623,14.14,0.00,2.88,72.61,0.08,9.18,1.06,0.00,7
211 | 211,1.51685,14.92,0.00,1.99,73.06,0.00,8.40,1.59,0.00,7
212 | 212,1.52065,14.36,0.00,2.02,73.42,0.00,8.44,1.64,0.00,7
213 | 213,1.51651,14.38,0.00,1.94,73.61,0.00,8.48,1.57,0.00,7
214 | 214,1.51711,14.23,0.00,2.08,73.36,0.00,8.62,1.67,0.00,7
215 |
--------------------------------------------------------------------------------
/Chapter10/glass.names:
--------------------------------------------------------------------------------
1 | 1. Title: Glass Identification Database
2 |
3 | 2. Sources:
4 | (a) Creator: B. German
5 | -- Central Research Establishment
6 | Home Office Forensic Science Service
7 | Aldermaston, Reading, Berkshire RG7 4PN
8 | (b) Donor: Vina Spiehler, Ph.D., DABFT
9 | Diagnostic Products Corporation
10 | (213) 776-0180 (ext 3014)
11 | (c) Date: September, 1987
12 |
13 | 3. Past Usage:
14 | -- Rule Induction in Forensic Science
15 | -- Ian W. Evett and Ernest J. Spiehler
16 | -- Central Research Establishment
17 | Home Office Forensic Science Service
18 | Aldermaston, Reading, Berkshire RG7 4PN
19 | -- Unknown technical note number (sorry, not listed here)
20 | -- General Results: nearest neighbor held its own with respect to the
21 | rule-based system
22 |
23 | 4. Relevant Information:n
24 | Vina conducted a comparison test of her rule-based system, BEAGLE, the
25 | nearest-neighbor algorithm, and discriminant analysis. BEAGLE is
26 | a product available through VRS Consulting, Inc.; 4676 Admiralty Way,
27 | Suite 206; Marina Del Ray, CA 90292 (213) 827-7890 and FAX: -3189.
28 | In determining whether the glass was a type of "float" glass or not,
29 | the following results were obtained (# incorrect answers):
30 |
31 | Type of Sample Beagle NN DA
32 | Windows that were float processed (87) 10 12 21
33 | Windows that were not: (76) 19 16 22
34 |
35 | The study of classification of types of glass was motivated by
36 | criminological investigation. At the scene of the crime, the glass left
37 | can be used as evidence...if it is correctly identified!
38 |
39 | 5. Number of Instances: 214
40 |
41 | 6. Number of Attributes: 10 (including an Id#) plus the class attribute
42 | -- all attributes are continuously valued
43 |
44 | 7. Attribute Information:
45 | 1. Id number: 1 to 214
46 | 2. RI: refractive index
47 | 3. Na: Sodium (unit measurement: weight percent in corresponding oxide, as
48 | are attributes 4-10)
49 | 4. Mg: Magnesium
50 | 5. Al: Aluminum
51 | 6. Si: Silicon
52 | 7. K: Potassium
53 | 8. Ca: Calcium
54 | 9. Ba: Barium
55 | 10. Fe: Iron
56 | 11. Type of glass: (class attribute)
57 | -- 1 building_windows_float_processed
58 | -- 2 building_windows_non_float_processed
59 | -- 3 vehicle_windows_float_processed
60 | -- 4 vehicle_windows_non_float_processed (none in this database)
61 | -- 5 containers
62 | -- 6 tableware
63 | -- 7 headlamps
64 |
65 | 8. Missing Attribute Values: None
66 |
67 | Summary Statistics:
68 | Attribute: Min Max Mean SD Correlation with class
69 | 2. RI: 1.5112 1.5339 1.5184 0.0030 -0.1642
70 | 3. Na: 10.73 17.38 13.4079 0.8166 0.5030
71 | 4. Mg: 0 4.49 2.6845 1.4424 -0.7447
72 | 5. Al: 0.29 3.5 1.4449 0.4993 0.5988
73 | 6. Si: 69.81 75.41 72.6509 0.7745 0.1515
74 | 7. K: 0 6.21 0.4971 0.6522 -0.0100
75 | 8. Ca: 5.43 16.19 8.9570 1.4232 0.0007
76 | 9. Ba: 0 3.15 0.1750 0.4972 0.5751
77 | 10. Fe: 0 0.51 0.0570 0.0974 -0.1879
78 |
79 | 9. Class Distribution: (out of 214 total instances)
80 | -- 163 Window glass (building windows and vehicle windows)
81 | -- 87 float processed
82 | -- 70 building windows
83 | -- 17 vehicle windows
84 | -- 76 non-float processed
85 | -- 76 building windows
86 | -- 0 vehicle windows
87 | -- 51 Non-window glass
88 | -- 13 containers
89 | -- 9 tableware
90 | -- 29 headlamps
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/Chapter10/glass.tag:
--------------------------------------------------------------------------------
1 | An original file donated by Vina Speihler
2 |
3 | ID, N -- numeric identifier of the instance
4 | RI, N -- refractive index
5 | NA2O, N -- Sodium oxide
6 | MGO, N -- magnesium oxide
7 | AL2O3, N -- aluminum oxide
8 | SIO2, N -- silcon oxide
9 | K2O, N -- potassium oxide
10 | CAO, N -- calcium oxide
11 | BAO, N -- barium oxide
12 | FE2O3, N -- iron oxide
13 | TYPE, N -- An unknown, but must correspond to the types in the paper
14 | CAMG, N -- Unsure
15 |
16 | Types include:
17 | 1. WF (Float Window)
18 | 2. WNF (Non-float Window)
19 | 3. C (Container)
20 | 4. T (Tableware)
21 | 5. H (Headlamp) 214 2568 14127 glass.dat
22 | 19 92 518 glass.tag
23 | 62 742 4775 glassx.dat
24 | 51 610 3928 nonwindo.dat
25 | 6 14 120 phones
26 | 163 1955 12552 window.dat
27 | 515 5981 36020 total
28 |
--------------------------------------------------------------------------------
/Chapter10/glass.txt:
--------------------------------------------------------------------------------
1 | 1,1.52101,13.64,4.49,1.10,71.78,0.06,8.75,0.00,0.00,1
2 | 2,1.51761,13.89,3.60,1.36,72.73,0.48,7.83,0.00,0.00,1
3 | 3,1.51618,13.53,3.55,1.54,72.99,0.39,7.78,0.00,0.00,1
4 | 4,1.51766,13.21,3.69,1.29,72.61,0.57,8.22,0.00,0.00,1
5 | 5,1.51742,13.27,3.62,1.24,73.08,0.55,8.07,0.00,0.00,1
6 | 6,1.51596,12.79,3.61,1.62,72.97,0.64,8.07,0.00,0.26,1
7 | 7,1.51743,13.30,3.60,1.14,73.09,0.58,8.17,0.00,0.00,1
8 | 8,1.51756,13.15,3.61,1.05,73.24,0.57,8.24,0.00,0.00,1
9 | 9,1.51918,14.04,3.58,1.37,72.08,0.56,8.30,0.00,0.00,1
10 | 10,1.51755,13.00,3.60,1.36,72.99,0.57,8.40,0.00,0.11,1
11 | 11,1.51571,12.72,3.46,1.56,73.20,0.67,8.09,0.00,0.24,1
12 | 12,1.51763,12.80,3.66,1.27,73.01,0.60,8.56,0.00,0.00,1
13 | 13,1.51589,12.88,3.43,1.40,73.28,0.69,8.05,0.00,0.24,1
14 | 14,1.51748,12.86,3.56,1.27,73.21,0.54,8.38,0.00,0.17,1
15 | 15,1.51763,12.61,3.59,1.31,73.29,0.58,8.50,0.00,0.00,1
16 | 16,1.51761,12.81,3.54,1.23,73.24,0.58,8.39,0.00,0.00,1
17 | 17,1.51784,12.68,3.67,1.16,73.11,0.61,8.70,0.00,0.00,1
18 | 18,1.52196,14.36,3.85,0.89,71.36,0.15,9.15,0.00,0.00,1
19 | 19,1.51911,13.90,3.73,1.18,72.12,0.06,8.89,0.00,0.00,1
20 | 20,1.51735,13.02,3.54,1.69,72.73,0.54,8.44,0.00,0.07,1
21 | 21,1.51750,12.82,3.55,1.49,72.75,0.54,8.52,0.00,0.19,1
22 | 22,1.51966,14.77,3.75,0.29,72.02,0.03,9.00,0.00,0.00,1
23 | 23,1.51736,12.78,3.62,1.29,72.79,0.59,8.70,0.00,0.00,1
24 | 24,1.51751,12.81,3.57,1.35,73.02,0.62,8.59,0.00,0.00,1
25 | 25,1.51720,13.38,3.50,1.15,72.85,0.50,8.43,0.00,0.00,1
26 | 26,1.51764,12.98,3.54,1.21,73.00,0.65,8.53,0.00,0.00,1
27 | 27,1.51793,13.21,3.48,1.41,72.64,0.59,8.43,0.00,0.00,1
28 | 28,1.51721,12.87,3.48,1.33,73.04,0.56,8.43,0.00,0.00,1
29 | 29,1.51768,12.56,3.52,1.43,73.15,0.57,8.54,0.00,0.00,1
30 | 30,1.51784,13.08,3.49,1.28,72.86,0.60,8.49,0.00,0.00,1
31 | 31,1.51768,12.65,3.56,1.30,73.08,0.61,8.69,0.00,0.14,1
32 | 32,1.51747,12.84,3.50,1.14,73.27,0.56,8.55,0.00,0.00,1
33 | 33,1.51775,12.85,3.48,1.23,72.97,0.61,8.56,0.09,0.22,1
34 | 34,1.51753,12.57,3.47,1.38,73.39,0.60,8.55,0.00,0.06,1
35 | 35,1.51783,12.69,3.54,1.34,72.95,0.57,8.75,0.00,0.00,1
36 | 36,1.51567,13.29,3.45,1.21,72.74,0.56,8.57,0.00,0.00,1
37 | 37,1.51909,13.89,3.53,1.32,71.81,0.51,8.78,0.11,0.00,1
38 | 38,1.51797,12.74,3.48,1.35,72.96,0.64,8.68,0.00,0.00,1
39 | 39,1.52213,14.21,3.82,0.47,71.77,0.11,9.57,0.00,0.00,1
40 | 40,1.52213,14.21,3.82,0.47,71.77,0.11,9.57,0.00,0.00,1
41 | 41,1.51793,12.79,3.50,1.12,73.03,0.64,8.77,0.00,0.00,1
42 | 42,1.51755,12.71,3.42,1.20,73.20,0.59,8.64,0.00,0.00,1
43 | 43,1.51779,13.21,3.39,1.33,72.76,0.59,8.59,0.00,0.00,1
44 | 44,1.52210,13.73,3.84,0.72,71.76,0.17,9.74,0.00,0.00,1
45 | 45,1.51786,12.73,3.43,1.19,72.95,0.62,8.76,0.00,0.30,1
46 | 46,1.51900,13.49,3.48,1.35,71.95,0.55,9.00,0.00,0.00,1
47 | 47,1.51869,13.19,3.37,1.18,72.72,0.57,8.83,0.00,0.16,1
48 | 48,1.52667,13.99,3.70,0.71,71.57,0.02,9.82,0.00,0.10,1
49 | 49,1.52223,13.21,3.77,0.79,71.99,0.13,10.02,0.00,0.00,1
50 | 50,1.51898,13.58,3.35,1.23,72.08,0.59,8.91,0.00,0.00,1
51 | 51,1.52320,13.72,3.72,0.51,71.75,0.09,10.06,0.00,0.16,1
52 | 52,1.51926,13.20,3.33,1.28,72.36,0.60,9.14,0.00,0.11,1
53 | 53,1.51808,13.43,2.87,1.19,72.84,0.55,9.03,0.00,0.00,1
54 | 54,1.51837,13.14,2.84,1.28,72.85,0.55,9.07,0.00,0.00,1
55 | 55,1.51778,13.21,2.81,1.29,72.98,0.51,9.02,0.00,0.09,1
56 | 56,1.51769,12.45,2.71,1.29,73.70,0.56,9.06,0.00,0.24,1
57 | 57,1.51215,12.99,3.47,1.12,72.98,0.62,8.35,0.00,0.31,1
58 | 58,1.51824,12.87,3.48,1.29,72.95,0.60,8.43,0.00,0.00,1
59 | 59,1.51754,13.48,3.74,1.17,72.99,0.59,8.03,0.00,0.00,1
60 | 60,1.51754,13.39,3.66,1.19,72.79,0.57,8.27,0.00,0.11,1
61 | 61,1.51905,13.60,3.62,1.11,72.64,0.14,8.76,0.00,0.00,1
62 | 62,1.51977,13.81,3.58,1.32,71.72,0.12,8.67,0.69,0.00,1
63 | 63,1.52172,13.51,3.86,0.88,71.79,0.23,9.54,0.00,0.11,1
64 | 64,1.52227,14.17,3.81,0.78,71.35,0.00,9.69,0.00,0.00,1
65 | 65,1.52172,13.48,3.74,0.90,72.01,0.18,9.61,0.00,0.07,1
66 | 66,1.52099,13.69,3.59,1.12,71.96,0.09,9.40,0.00,0.00,1
67 | 67,1.52152,13.05,3.65,0.87,72.22,0.19,9.85,0.00,0.17,1
68 | 68,1.52152,13.05,3.65,0.87,72.32,0.19,9.85,0.00,0.17,1
69 | 69,1.52152,13.12,3.58,0.90,72.20,0.23,9.82,0.00,0.16,1
70 | 70,1.52300,13.31,3.58,0.82,71.99,0.12,10.17,0.00,0.03,1
71 | 71,1.51574,14.86,3.67,1.74,71.87,0.16,7.36,0.00,0.12,2
72 | 72,1.51848,13.64,3.87,1.27,71.96,0.54,8.32,0.00,0.32,2
73 | 73,1.51593,13.09,3.59,1.52,73.10,0.67,7.83,0.00,0.00,2
74 | 74,1.51631,13.34,3.57,1.57,72.87,0.61,7.89,0.00,0.00,2
75 | 75,1.51596,13.02,3.56,1.54,73.11,0.72,7.90,0.00,0.00,2
76 | 76,1.51590,13.02,3.58,1.51,73.12,0.69,7.96,0.00,0.00,2
77 | 77,1.51645,13.44,3.61,1.54,72.39,0.66,8.03,0.00,0.00,2
78 | 78,1.51627,13.00,3.58,1.54,72.83,0.61,8.04,0.00,0.00,2
79 | 79,1.51613,13.92,3.52,1.25,72.88,0.37,7.94,0.00,0.14,2
80 | 80,1.51590,12.82,3.52,1.90,72.86,0.69,7.97,0.00,0.00,2
81 | 81,1.51592,12.86,3.52,2.12,72.66,0.69,7.97,0.00,0.00,2
82 | 82,1.51593,13.25,3.45,1.43,73.17,0.61,7.86,0.00,0.00,2
83 | 83,1.51646,13.41,3.55,1.25,72.81,0.68,8.10,0.00,0.00,2
84 | 84,1.51594,13.09,3.52,1.55,72.87,0.68,8.05,0.00,0.09,2
85 | 85,1.51409,14.25,3.09,2.08,72.28,1.10,7.08,0.00,0.00,2
86 | 86,1.51625,13.36,3.58,1.49,72.72,0.45,8.21,0.00,0.00,2
87 | 87,1.51569,13.24,3.49,1.47,73.25,0.38,8.03,0.00,0.00,2
88 | 88,1.51645,13.40,3.49,1.52,72.65,0.67,8.08,0.00,0.10,2
89 | 89,1.51618,13.01,3.50,1.48,72.89,0.60,8.12,0.00,0.00,2
90 | 90,1.51640,12.55,3.48,1.87,73.23,0.63,8.08,0.00,0.09,2
91 | 91,1.51841,12.93,3.74,1.11,72.28,0.64,8.96,0.00,0.22,2
92 | 92,1.51605,12.90,3.44,1.45,73.06,0.44,8.27,0.00,0.00,2
93 | 93,1.51588,13.12,3.41,1.58,73.26,0.07,8.39,0.00,0.19,2
94 | 94,1.51590,13.24,3.34,1.47,73.10,0.39,8.22,0.00,0.00,2
95 | 95,1.51629,12.71,3.33,1.49,73.28,0.67,8.24,0.00,0.00,2
96 | 96,1.51860,13.36,3.43,1.43,72.26,0.51,8.60,0.00,0.00,2
97 | 97,1.51841,13.02,3.62,1.06,72.34,0.64,9.13,0.00,0.15,2
98 | 98,1.51743,12.20,3.25,1.16,73.55,0.62,8.90,0.00,0.24,2
99 | 99,1.51689,12.67,2.88,1.71,73.21,0.73,8.54,0.00,0.00,2
100 | 100,1.51811,12.96,2.96,1.43,72.92,0.60,8.79,0.14,0.00,2
101 | 101,1.51655,12.75,2.85,1.44,73.27,0.57,8.79,0.11,0.22,2
102 | 102,1.51730,12.35,2.72,1.63,72.87,0.70,9.23,0.00,0.00,2
103 | 103,1.51820,12.62,2.76,0.83,73.81,0.35,9.42,0.00,0.20,2
104 | 104,1.52725,13.80,3.15,0.66,70.57,0.08,11.64,0.00,0.00,2
105 | 105,1.52410,13.83,2.90,1.17,71.15,0.08,10.79,0.00,0.00,2
106 | 106,1.52475,11.45,0.00,1.88,72.19,0.81,13.24,0.00,0.34,2
107 | 107,1.53125,10.73,0.00,2.10,69.81,0.58,13.30,3.15,0.28,2
108 | 108,1.53393,12.30,0.00,1.00,70.16,0.12,16.19,0.00,0.24,2
109 | 109,1.52222,14.43,0.00,1.00,72.67,0.10,11.52,0.00,0.08,2
110 | 110,1.51818,13.72,0.00,0.56,74.45,0.00,10.99,0.00,0.00,2
111 | 111,1.52664,11.23,0.00,0.77,73.21,0.00,14.68,0.00,0.00,2
112 | 112,1.52739,11.02,0.00,0.75,73.08,0.00,14.96,0.00,0.00,2
113 | 113,1.52777,12.64,0.00,0.67,72.02,0.06,14.40,0.00,0.00,2
114 | 114,1.51892,13.46,3.83,1.26,72.55,0.57,8.21,0.00,0.14,2
115 | 115,1.51847,13.10,3.97,1.19,72.44,0.60,8.43,0.00,0.00,2
116 | 116,1.51846,13.41,3.89,1.33,72.38,0.51,8.28,0.00,0.00,2
117 | 117,1.51829,13.24,3.90,1.41,72.33,0.55,8.31,0.00,0.10,2
118 | 118,1.51708,13.72,3.68,1.81,72.06,0.64,7.88,0.00,0.00,2
119 | 119,1.51673,13.30,3.64,1.53,72.53,0.65,8.03,0.00,0.29,2
120 | 120,1.51652,13.56,3.57,1.47,72.45,0.64,7.96,0.00,0.00,2
121 | 121,1.51844,13.25,3.76,1.32,72.40,0.58,8.42,0.00,0.00,2
122 | 122,1.51663,12.93,3.54,1.62,72.96,0.64,8.03,0.00,0.21,2
123 | 123,1.51687,13.23,3.54,1.48,72.84,0.56,8.10,0.00,0.00,2
124 | 124,1.51707,13.48,3.48,1.71,72.52,0.62,7.99,0.00,0.00,2
125 | 125,1.52177,13.20,3.68,1.15,72.75,0.54,8.52,0.00,0.00,2
126 | 126,1.51872,12.93,3.66,1.56,72.51,0.58,8.55,0.00,0.12,2
127 | 127,1.51667,12.94,3.61,1.26,72.75,0.56,8.60,0.00,0.00,2
128 | 128,1.52081,13.78,2.28,1.43,71.99,0.49,9.85,0.00,0.17,2
129 | 129,1.52068,13.55,2.09,1.67,72.18,0.53,9.57,0.27,0.17,2
130 | 130,1.52020,13.98,1.35,1.63,71.76,0.39,10.56,0.00,0.18,2
131 | 131,1.52177,13.75,1.01,1.36,72.19,0.33,11.14,0.00,0.00,2
132 | 132,1.52614,13.70,0.00,1.36,71.24,0.19,13.44,0.00,0.10,2
133 | 133,1.51813,13.43,3.98,1.18,72.49,0.58,8.15,0.00,0.00,2
134 | 134,1.51800,13.71,3.93,1.54,71.81,0.54,8.21,0.00,0.15,2
135 | 135,1.51811,13.33,3.85,1.25,72.78,0.52,8.12,0.00,0.00,2
136 | 136,1.51789,13.19,3.90,1.30,72.33,0.55,8.44,0.00,0.28,2
137 | 137,1.51806,13.00,3.80,1.08,73.07,0.56,8.38,0.00,0.12,2
138 | 138,1.51711,12.89,3.62,1.57,72.96,0.61,8.11,0.00,0.00,2
139 | 139,1.51674,12.79,3.52,1.54,73.36,0.66,7.90,0.00,0.00,2
140 | 140,1.51674,12.87,3.56,1.64,73.14,0.65,7.99,0.00,0.00,2
141 | 141,1.51690,13.33,3.54,1.61,72.54,0.68,8.11,0.00,0.00,2
142 | 142,1.51851,13.20,3.63,1.07,72.83,0.57,8.41,0.09,0.17,2
143 | 143,1.51662,12.85,3.51,1.44,73.01,0.68,8.23,0.06,0.25,2
144 | 144,1.51709,13.00,3.47,1.79,72.72,0.66,8.18,0.00,0.00,2
145 | 145,1.51660,12.99,3.18,1.23,72.97,0.58,8.81,0.00,0.24,2
146 | 146,1.51839,12.85,3.67,1.24,72.57,0.62,8.68,0.00,0.35,2
147 | 147,1.51769,13.65,3.66,1.11,72.77,0.11,8.60,0.00,0.00,3
148 | 148,1.51610,13.33,3.53,1.34,72.67,0.56,8.33,0.00,0.00,3
149 | 149,1.51670,13.24,3.57,1.38,72.70,0.56,8.44,0.00,0.10,3
150 | 150,1.51643,12.16,3.52,1.35,72.89,0.57,8.53,0.00,0.00,3
151 | 151,1.51665,13.14,3.45,1.76,72.48,0.60,8.38,0.00,0.17,3
152 | 152,1.52127,14.32,3.90,0.83,71.50,0.00,9.49,0.00,0.00,3
153 | 153,1.51779,13.64,3.65,0.65,73.00,0.06,8.93,0.00,0.00,3
154 | 154,1.51610,13.42,3.40,1.22,72.69,0.59,8.32,0.00,0.00,3
155 | 155,1.51694,12.86,3.58,1.31,72.61,0.61,8.79,0.00,0.00,3
156 | 156,1.51646,13.04,3.40,1.26,73.01,0.52,8.58,0.00,0.00,3
157 | 157,1.51655,13.41,3.39,1.28,72.64,0.52,8.65,0.00,0.00,3
158 | 158,1.52121,14.03,3.76,0.58,71.79,0.11,9.65,0.00,0.00,3
159 | 159,1.51776,13.53,3.41,1.52,72.04,0.58,8.79,0.00,0.00,3
160 | 160,1.51796,13.50,3.36,1.63,71.94,0.57,8.81,0.00,0.09,3
161 | 161,1.51832,13.33,3.34,1.54,72.14,0.56,8.99,0.00,0.00,3
162 | 162,1.51934,13.64,3.54,0.75,72.65,0.16,8.89,0.15,0.24,3
163 | 163,1.52211,14.19,3.78,0.91,71.36,0.23,9.14,0.00,0.37,3
164 | 164,1.51514,14.01,2.68,3.50,69.89,1.68,5.87,2.20,0.00,5
165 | 165,1.51915,12.73,1.85,1.86,72.69,0.60,10.09,0.00,0.00,5
166 | 166,1.52171,11.56,1.88,1.56,72.86,0.47,11.41,0.00,0.00,5
167 | 167,1.52151,11.03,1.71,1.56,73.44,0.58,11.62,0.00,0.00,5
168 | 168,1.51969,12.64,0.00,1.65,73.75,0.38,11.53,0.00,0.00,5
169 | 169,1.51666,12.86,0.00,1.83,73.88,0.97,10.17,0.00,0.00,5
170 | 170,1.51994,13.27,0.00,1.76,73.03,0.47,11.32,0.00,0.00,5
171 | 171,1.52369,13.44,0.00,1.58,72.22,0.32,12.24,0.00,0.00,5
172 | 172,1.51316,13.02,0.00,3.04,70.48,6.21,6.96,0.00,0.00,5
173 | 173,1.51321,13.00,0.00,3.02,70.70,6.21,6.93,0.00,0.00,5
174 | 174,1.52043,13.38,0.00,1.40,72.25,0.33,12.50,0.00,0.00,5
175 | 175,1.52058,12.85,1.61,2.17,72.18,0.76,9.70,0.24,0.51,5
176 | 176,1.52119,12.97,0.33,1.51,73.39,0.13,11.27,0.00,0.28,5
177 | 177,1.51905,14.00,2.39,1.56,72.37,0.00,9.57,0.00,0.00,6
178 | 178,1.51937,13.79,2.41,1.19,72.76,0.00,9.77,0.00,0.00,6
179 | 179,1.51829,14.46,2.24,1.62,72.38,0.00,9.26,0.00,0.00,6
180 | 180,1.51852,14.09,2.19,1.66,72.67,0.00,9.32,0.00,0.00,6
181 | 181,1.51299,14.40,1.74,1.54,74.55,0.00,7.59,0.00,0.00,6
182 | 182,1.51888,14.99,0.78,1.74,72.50,0.00,9.95,0.00,0.00,6
183 | 183,1.51916,14.15,0.00,2.09,72.74,0.00,10.88,0.00,0.00,6
184 | 184,1.51969,14.56,0.00,0.56,73.48,0.00,11.22,0.00,0.00,6
185 | 185,1.51115,17.38,0.00,0.34,75.41,0.00,6.65,0.00,0.00,6
186 | 186,1.51131,13.69,3.20,1.81,72.81,1.76,5.43,1.19,0.00,7
187 | 187,1.51838,14.32,3.26,2.22,71.25,1.46,5.79,1.63,0.00,7
188 | 188,1.52315,13.44,3.34,1.23,72.38,0.60,8.83,0.00,0.00,7
189 | 189,1.52247,14.86,2.20,2.06,70.26,0.76,9.76,0.00,0.00,7
190 | 190,1.52365,15.79,1.83,1.31,70.43,0.31,8.61,1.68,0.00,7
191 | 191,1.51613,13.88,1.78,1.79,73.10,0.00,8.67,0.76,0.00,7
192 | 192,1.51602,14.85,0.00,2.38,73.28,0.00,8.76,0.64,0.09,7
193 | 193,1.51623,14.20,0.00,2.79,73.46,0.04,9.04,0.40,0.09,7
194 | 194,1.51719,14.75,0.00,2.00,73.02,0.00,8.53,1.59,0.08,7
195 | 195,1.51683,14.56,0.00,1.98,73.29,0.00,8.52,1.57,0.07,7
196 | 196,1.51545,14.14,0.00,2.68,73.39,0.08,9.07,0.61,0.05,7
197 | 197,1.51556,13.87,0.00,2.54,73.23,0.14,9.41,0.81,0.01,7
198 | 198,1.51727,14.70,0.00,2.34,73.28,0.00,8.95,0.66,0.00,7
199 | 199,1.51531,14.38,0.00,2.66,73.10,0.04,9.08,0.64,0.00,7
200 | 200,1.51609,15.01,0.00,2.51,73.05,0.05,8.83,0.53,0.00,7
201 | 201,1.51508,15.15,0.00,2.25,73.50,0.00,8.34,0.63,0.00,7
202 | 202,1.51653,11.95,0.00,1.19,75.18,2.70,8.93,0.00,0.00,7
203 | 203,1.51514,14.85,0.00,2.42,73.72,0.00,8.39,0.56,0.00,7
204 | 204,1.51658,14.80,0.00,1.99,73.11,0.00,8.28,1.71,0.00,7
205 | 205,1.51617,14.95,0.00,2.27,73.30,0.00,8.71,0.67,0.00,7
206 | 206,1.51732,14.95,0.00,1.80,72.99,0.00,8.61,1.55,0.00,7
207 | 207,1.51645,14.94,0.00,1.87,73.11,0.00,8.67,1.38,0.00,7
208 | 208,1.51831,14.39,0.00,1.82,72.86,1.41,6.47,2.88,0.00,7
209 | 209,1.51640,14.37,0.00,2.74,72.85,0.00,9.45,0.54,0.00,7
210 | 210,1.51623,14.14,0.00,2.88,72.61,0.08,9.18,1.06,0.00,7
211 | 211,1.51685,14.92,0.00,1.99,73.06,0.00,8.40,1.59,0.00,7
212 | 212,1.52065,14.36,0.00,2.02,73.42,0.00,8.44,1.64,0.00,7
213 | 213,1.51651,14.38,0.00,1.94,73.61,0.00,8.48,1.57,0.00,7
214 | 214,1.51711,14.23,0.00,2.08,73.36,0.00,8.62,1.67,0.00,7
215 |
--------------------------------------------------------------------------------
/Chapter11/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Hands-On-Exploratory-Data-Analysis-with-R/c61adeddc248daf58857014da109d7a3290027bc/Chapter11/README.md
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Packt
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # Hands-On Exploratory Data Analysis with R
5 |
6 |
7 |
8 | This is the code repository for [Hands-On Exploratory Data Analysis with R](https://www2.packtpub.com/big-data-and-business-intelligence/hands-exploratory-data-analysis-r?utm_source=github&utm_medium=repository&utm_campaign=9781789804379), published by Packt.
9 |
10 | **Become an expert in exploratory data analysis using R packages**
11 |
12 | ## What is this book about?
13 | Hands-On Exploratory Data Analysis with R will help you build not just a foundation but also expertise in the elementary ways to analyze data. You will learn how to understand your data and summarize its main characteristics. You'll also uncover the structure of your data, and you'll learn graphical and numerical techniques using the R language.
14 |
15 | This book covers the following exciting features:
16 | * Learn powerful R techniques to speed up your data analysis projects
17 | * Import, clean, and explore data using powerful R packages
18 | * Practice graphical exploratory analysis techniques
19 | * Create informative data analysis reports using ggplot2
20 | * Identify and clean missing and erroneous data
21 |
22 | If you feel this book is for you, get your [copy](https://www.amazon.com/dp/178980437X) today!
23 |
24 |
26 |
27 |
28 | ## Instructions and Navigations
29 | All of the code is organized into folders. For example, Chapter02.
30 |
31 | The code will look like the following:
32 | ```
33 | > mpg <-read.csv("highway_mpg.csv", stringsAsFactors = FALSE)
34 | > View(mpg
35 | ```
36 |
37 | **Following is what you need for this book:**
38 | Hands-On Exploratory Data Analysis with R is for data enthusiasts who want to build a strong foundation for data analysis. If you are a data analyst, data engineer, software engineer, or product manager, this book will sharpen your skills in the complete workflow of exploratory data analysis.
39 |
40 | With the following software and hardware list you can run all code files present in the book (Chapter 1-15).
41 |
42 | ### Software and Hardware List
43 |
44 | | Chapter | Software required | OS required |
45 | | -------- | ------------------------------------| -----------------------------------|
46 | | 2-10 | R version 3.3.0 / RStudio Desktop 0.99.903 | Windows, Mac OS X, and Linux (Any) |
47 |
48 | We also provide a PDF file that has color images of the screenshots/diagrams used in this book. [Click here to download it](https://www.packtpub.com/sites/default/files/downloads/9781789804379_ColorImages.pdf).
49 |
50 | ### Related products
51 | * R Deep Learning Projects [[Packt]](https://www.packtpub.com/in/big-data-and-business-intelligence/r-deep-learning-projects?utm_source=github&utm_medium=repository&utm_campaign=9781788478403) [[Amazon]](https://www.amazon.com/dp/1788478401)
52 |
53 | * Machine Learning with R - Third Edition [[Packt]](https://www.packtpub.com/big-data-and-business-intelligence/machine-learning-r-third-edition?utm_source=github&utm_medium=repository&utm_campaign=9781788295864) [[Amazon]](https://www.amazon.com/dp/1788295862)
54 |
55 | ## Get to Know the Authors
56 | **Radhika Datar**
57 | has more than 5 years' experience in software development and content writing. She is well versed in frameworks such as Python, PHP, and Java, and regularly provides training on them. She has been working with Educba and Eduonix as a training consultant since June 2016, while also working as a freelance academic writer in data science and data analytics. She obtained her master's degree from the Symbiosis Institute of Computer Studies and Research and her bachelor's degree from K. J. Somaiya College of Science and Commerce.
58 |
59 | **Harish Garg**
60 | is a Principal Software Developer, author, and co-founder of a software development and training company, Bignumworks. Harish has more than 19 years of experience in a wide variety of technologies, including blockchain, data science and enterprise software. During this time, he has worked for companies such as McAfee, Intel, etc.
61 |
62 | ## Other books by the authors
63 | * [Mastering Exploratory Analysis with pandas](https://www2.packtpub.com/big-data-and-business-intelligence/mastering-exploratory-analysis-pandas?utm_source=github&utm_medium=repository&utm_campaign=9781789619638)
64 |
65 | ### Suggestions and Feedback
66 | [Click here](https://docs.google.com/forms/d/e/1FAIpQLSdy7dATC6QmEL81FIUuymZ0Wy9vH1jHkvpY57OiMeKGqib_Ow/viewform) if you have any feedback or suggestions.
67 | ### Download a free PDF
68 |
69 | If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
70 |