├── Chapter 7
├── data
│ ├── bike.png
│ ├── Ch7_email_marketing_conversions.csv
│ ├── Ch7_bike_station_locations.csv
│ ├── Ch7_marketing.csv
│ ├── Ch7_optimal_maint_route.csv
│ └── Ch7_email_marketing_campaign.csv
└── B04662_07_01.R
├── Chapter 8
├── B04662_08_02
│ ├── www
│ │ ├── bike-shortcut-icon.ico
│ │ └── app-styling.css
│ ├── data
│ │ └── Ch8_global_market_data.csv
│ ├── B04662_08_02global.R
│ ├── B04662_08_02ui.R
│ └── B04662_08_02server.R
└── B04662_08_01
│ ├── B04662_08_01ui.R
│ ├── B04662_08_01server.R
│ └── data
│ └── Ch8_marketing.csv
├── .gitattributes
├── .gitignore
├── LICENSE
├── Chapter 1
└── B04662_01_01.R
├── README.md
├── Chapter 2
└── B04662_02_01.R
├── Chapter 5
├── B04662_05_02.R
├── B04662_05_01.R
└── data
│ └── Ch5_bike_station_locations.csv
├── Chapter 6
└── B04662_06_01.R
├── Chapter 4
├── B04662_04_01.R
└── data
│ └── Ch4_marketing.csv
└── Chapter 3
├── B04662_03_01.R
└── data
└── Ch3_marketing.csv
/Chapter 7/data/bike.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Introduction-To-R-For-Business-Intelligence/HEAD/Chapter 7/data/bike.png
--------------------------------------------------------------------------------
/Chapter 8/B04662_08_02/www/bike-shortcut-icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Introduction-To-R-For-Business-Intelligence/HEAD/Chapter 8/B04662_08_02/www/bike-shortcut-icon.ico
--------------------------------------------------------------------------------
/Chapter 8/B04662_08_02/data/Ch8_global_market_data.csv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Introduction-To-R-For-Business-Intelligence/HEAD/Chapter 8/B04662_08_02/data/Ch8_global_market_data.csv
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/Chapter 8/B04662_08_01/B04662_08_01ui.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 8, ui.R file - Web Dashboards with Shiny
5 |
6 | if(!require("shiny")) install.packages("shiny")
7 | suppressMessages(suppressWarnings(library(shiny)))
8 |
9 | shinyUI(fluidPage(
10 |
11 | titlePanel("Revenue Prediction from Marketing Expenditures"),
12 |
13 | sidebarLayout(
14 | sidebarPanel(
15 | sliderInput("spend", "Expenditure Level in $K:",
16 | min = 54, max = 481, value = 250)
17 | ),
18 | mainPanel(
19 | plotOutput("prediction_plot")
20 | )
21 | )
22 | ))
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear in the root of a volume
35 | .DocumentRevisions-V100
36 | .fseventsd
37 | .Spotlight-V100
38 | .TemporaryItems
39 | .Trashes
40 | .VolumeIcon.icns
41 |
42 | # Directories potentially created on remote AFP share
43 | .AppleDB
44 | .AppleDesktop
45 | Network Trash Folder
46 | Temporary Items
47 | .apdisk
48 |
--------------------------------------------------------------------------------
/Chapter 7/data/Ch7_email_marketing_conversions.csv:
--------------------------------------------------------------------------------
1 | Promotion,Source,Target,Count,Percent
2 | Free Month,Sent Email,Opened Email,388,0.388000
3 | 10% off,Sent Email,Opened Email,308,0.308000
4 | Free Month,Sent Email,No Action,612,0.612000
5 | 10% off,Sent Email,No Action,692,0.692000
6 | Free Month,Opened Email,Clicked Email Link,194,0.500000
7 | 10% off,Opened Email,Clicked Email Link,143,0.464286
8 | Free Month,Opened Email,No Action,194,0.500000
9 | 10% off,Opened Email,No Action,165,0.535714
10 | Free Month,Clicked Email Link,Created Account,114,0.587629
11 | 10% off,Clicked Email Link,Created Account,115,0.804196
12 | Free Month,Clicked Email Link,No Action,80,0.412371
13 | 10% off,Clicked Email Link,No Action,28,0.195804
14 | Free Month,Created Account,Paid for Membership,83,0.728070
15 | 10% off,Created Account,Paid for Membership,106,0.921739
16 | Free Month,Created Account,No Action,31,0.271930
17 | 10% off,Created Account,No Action,9,0.078261
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 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 |
--------------------------------------------------------------------------------
/Chapter 1/B04662_01_01.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 1 - Extract, Transform, and Load
5 |
6 | message("Introduction to R for Business Intelligence
7 | Chapter 1 - Extract, Transform, and Load
8 | Copyright (2016) Packt Publishing \n
9 | This is your introduction to ETL")
10 |
11 | #
12 | # Extracting Data from Sources
13 |
14 | getwd()
15 |
16 | bike <- read.csv("./data/Ch1_bike_sharing_data.csv")
17 | str(bike)
18 |
19 | bike <- read.table("./data/Ch1_bike_sharing_data.csv",
20 | sep = ",", header = TRUE)
21 |
22 | #
23 | # Transforming Data to Fit Analytic Needs
24 |
25 | if(!require("dplyr")) install.packages("dplyr")
26 | suppressMessages(suppressWarnings(library(dplyr)))
27 | extracted_rows <- filter(bike, registered == 0, season == 1 | season == 2)
28 | dim(extracted_rows)
29 |
30 | using_membership <- filter(bike, registered == 0, season %in% c(1, 2))
31 |
32 | identical(extracted_rows, using_membership)
33 |
34 | extracted_columns <- select(extracted_rows, season, casual)
35 |
36 | add_revenue <- mutate(extracted_columns, revenue = casual * 5)
37 |
38 | grouped <- group_by(add_revenue, season)
39 | report <- summarise(grouped, sum(casual), sum(revenue))
40 |
41 | #
42 | # Loading Data into Business Systems for Analysis
43 |
44 | write.csv(report, "revenue_report.csv", row.names = FALSE)
45 |
46 | write.table(report, "revenue_report.txt", row.names = FALSE, sep = "\t")
--------------------------------------------------------------------------------
/Chapter 8/B04662_08_01/B04662_08_01server.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 8, server.R file - Web Dashboards with Shiny
5 |
6 | if(!require("shiny")) install.packages("shiny")
7 | suppressMessages(suppressWarnings(library(shiny)))
8 |
9 | revenue <- read.csv("./data/Ch8_marketing.csv")
10 | model <- lm(revenues ~ marketing_total, data = revenue)
11 |
12 | shinyServer(function(input, output) {
13 | output$prediction_plot <- renderPlot({
14 |
15 | plot(revenue$marketing_total, revenue$revenues,
16 | xlab = "Marketing Expenditures ($K)",
17 | ylab = "Revenues ($K)")
18 | abline(model, col = "blue")
19 |
20 | newdata <- data.frame(marketing_total = input$spend)
21 | pred <- predict.lm(model, newdata, interval = "predict")
22 |
23 | points(c(rep(input$spend, 2)), c(pred[2], pred[3]),
24 | pch = "-", cex = 2, col = "orange")
25 | segments(input$spend, pred[2], input$spend, pred[3],
26 | col = "orange", lty = 2, lwd = 2)
27 | points(input$spend, pred[1], pch = 19, col = "blue",
28 | cex = 2)
29 | text(54, 55, pos = 4, cex = 1.0,
30 | paste0("Predicted revenues of $",
31 | round(pred[1], 2) * 1000,
32 | " range of {", round(pred[2], 2) * 1000,
33 | " to ", round(pred[3], 2) * 1000, "}"))
34 | })
35 | })
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # Introduction-To-R-For-Business-Intelligence
5 |
6 | This is the code repository for [Introduction to R for Business Intelligence](https://www.packtpub.com/big-data-and-business-intelligence/introduction-r-business-intelligence?utm_source=github&utm_medium=repository&utm_campaign=9781785280252), published by Packt Publishing. It contains all the supporting code files necessary to work through the book from start to finish.
7 |
8 | ##Instructions and Navigation
9 |
10 | All of the code is organized into chapter-wise folders. For example, Chapter 1.
11 |
12 | You need the R statistical package, available free as an open source download from CRAN (https://www.r-project.org/). This book used R version 3.3.1 for Windows. You will get the same results using the macOS or Linux software.
13 | Optionally, it is also recommended that you use RStudio Desktop, an open source user interface that works with R (https://www.rstudio.com/). This book used version 0.99.903 for Windows. It is also available for macOS and Linux.
14 | Lastly, you will need to install a variety of R packages to perform the various analyses. All these are all freely available using the install.packages() function within R.
15 |
16 | #####Code snippet example is as follows:
17 |
18 | ```
19 | message("Introduction to R for Business Intelligence
20 | Chapter 1 - Extract, Transform, and Load
21 | Copyright (2016) Packt Publishing \n
22 | This is your introduction to ETL")
23 | ```
24 |
25 | ## Related Business Intelligence books
26 | * [Python Business Intelligence Cookbook](https://www.packtpub.com/application-development/python-business-intelligence-cookbook?utm_source=github&utm_medium=repository&utm_campaign=9781785287466)
27 | * [Practical Business Intelligence](https://www.packtpub.com/big-data-and-business-intelligence/practical-business-intelligence?utm_source=github&utm_medium=repository&utm_campaign=9781785885433)
28 | ### Download a free PDF
29 |
30 | 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.
31 |
https://packt.link/free-ebook/9781785280252
--------------------------------------------------------------------------------
/Chapter 8/B04662_08_02/B04662_08_02global.R:
--------------------------------------------------------------------------------
1 | # campaign-creator-app/global.R
2 |
3 | # default strings to characters to
4 | # avoid potential factor-related issues
5 | options(stringsAsFactors = FALSE)
6 | if (!require(devtools)) install.packages("devtools")
7 | suppressWarnings(suppressPackageStartupMessages(library(devtools)))
8 |
9 | # load all packages used by the shiny app here in a central location
10 | # suppressing warnings and messages are simply for convenience
11 |
12 | # shiny package contains core functions for the app
13 | if(!require("shiny")) install.packages("shiny")
14 | suppressWarnings(suppressPackageStartupMessages(library(shiny)))
15 |
16 | # shinysky package contains an easy to implement progress wheel
17 | # so that users can be alerted when the app is running a calculation
18 | # and need to wait for it to finish before proceeding
19 | if (!require(devtools)) install.packages("devtools")
20 | devtools::install_github("AnalytixWare/ShinySky")
21 | suppressWarnings(suppressPackageStartupMessages(library(shinysky)))
22 |
23 | # DT package provides an interface to the jQuery Plug-in DataTables,
24 | # which is a feature-rich, interactive framework for displaying tables
25 | # inside web applications
26 | install_github(repo = 'rstudio/DT')
27 | suppressWarnings(suppressPackageStartupMessages(library(DT)))
28 |
29 | # this code requires a version of DT that is not yet available via CRAN as of 5/9/16
30 | # so check that the installed version is new enough
31 | stopifnot(packageVersion("DT")[1,2] >= 1,
32 | packageVersion("DT")[1,3] >= 38)
33 |
34 | # dplyr package contains easy to use functions for manipulating
35 | # data, which is a common task inside Shiny apps so that elements
36 | # render properly
37 | if(!require("dplyr")) install.packages("dplyr")
38 | suppressWarnings(suppressPackageStartupMessages(library(dplyr)))
39 |
40 | # ggplot2 package for creating graphics
41 | if(!require("ggplot2")) install.packages("ggplot2")
42 | suppressWarnings(suppressPackageStartupMessages(library(ggplot2)))
43 |
44 | # scales package for formatting the ggplot graphics
45 | if(!require("scales")) install.packages("scales")
46 | suppressWarnings(suppressPackageStartupMessages(library(scales)))
47 |
48 | # dendextend package for creating a dendrogram plot
49 | # that has more features than base plotting
50 | if(!require("denextend")) install.packages("dendextend")
51 | suppressWarnings(suppressPackageStartupMessages(library(dendextend)))
52 |
53 | # RColorBrewer for creating a length 10 color scale
54 | # to overwrite the default coloring of the dendextend package
55 | if(!require("RColorBrewer")) install.packages("RColorBrewer")
56 | suppressWarnings(suppressPackageStartupMessages(library(RColorBrewer)))
57 |
58 | dendrogram_color_scheme <- c(head(brewer.pal(8, 'Set1'), 2), brewer.pal(8, "Dark2"))
--------------------------------------------------------------------------------
/Chapter 8/B04662_08_01/data/Ch8_marketing.csv:
--------------------------------------------------------------------------------
1 | marketing_total,revenues
2 | 165.98,39.26
3 | 171.7,38.9
4 | 294.83,49.51
5 | 183.18,40.56
6 | 149.53,40.21
7 | 62.07,38.09
8 | 274.93,44.21
9 | 141.49,40.23
10 | 287.4,48.8
11 | 157.59,36.63
12 | 148.12,38.14
13 | 318.22,47.24
14 | 341.93,54.21
15 | 257.97,42.19
16 | 424.47,56.79
17 | 149.94,41.78
18 | 346.06,50.02
19 | 318.32,46.44
20 | 118.18,35.26
21 | 319.22,47.94
22 | 144.32,43.24
23 | 220.74,43.48
24 | 324.88,47.46
25 | 332.94,46.78
26 | 401.51,50.27
27 | 208.5,41.6
28 | 317.67,44.49
29 | 144.04,39.18
30 | 353.07,45.89
31 | 354.34,54.78
32 | 211.41,45.07
33 | 149,41.3
34 | 339.55,51.95
35 | 291.8,44.9
36 | 297.97,49.89
37 | 368.64,52.38
38 | 289.88,45.46
39 | 127.88,36.26
40 | 275.81,46.97
41 | 340.04,53.08
42 | 286.25,44.15
43 | 158.69,42.23
44 | 345.64,55.08
45 | 330.61,52.07
46 | 350.03,50.91
47 | 124.89,38.03
48 | 203.98,40.36
49 | 339.62,54.14
50 | 296.39,50.53
51 | 122.95,39.95
52 | 400.22,54.54
53 | 190.29,47.03
54 | 243.51,48.07
55 | 115.83,38.01
56 | 91.27,36.99
57 | 197.6,41.1
58 | 314.03,48.11
59 | 330.29,52.93
60 | 201.19,44.03
61 | 119.15,38.65
62 | 217.07,44.39
63 | 288.78,46.06
64 | 90.93,37.11
65 | 201.69,43.53
66 | 89.88,36.86
67 | 183.73,39.81
68 | 322.35,42.65
69 | 175.68,43.66
70 | 181.77,41.19
71 | 340.19,54.83
72 | 315.91,44.57
73 | 168.94,44.88
74 | 253.29,45.43
75 | 225.72,42.24
76 | 250.49,47.03
77 | 198.75,44.45
78 | 359.85,52.45
79 | 399.39,51.93
80 | 180.12,43.94
81 | 299.46,50.62
82 | 247.62,41.74
83 | 429.67,57.39
84 | 262.7,47
85 | 314.84,40.98
86 | 481,56.1
87 | 347.46,43.22
88 | 324.24,52.68
89 | 277.35,47.05
90 | 102.36,35.92
91 | 148.4,36.7
92 | 75.64,33.98
93 | 320.53,47.21
94 | 335.5,44.9
95 | 352.79,54.93
96 | 241.35,46.55
97 | 289.14,48.48
98 | 200.57,44.79
99 | 202.91,42.47
100 | 227.64,44.88
101 | 136.19,40.63
102 | 102.94,38.18
103 | 253.21,44.97
104 | 279.17,40.49
105 | 222.45,49.15
106 | 380.79,51.13
107 | 160.87,39.09
108 | 131.53,34.51
109 | 130.95,39.15
110 | 323.41,58.17
111 | 158.77,40.89
112 | 100.99,35.43
113 | 357.96,44.82
114 | 76.7,35.2
115 | 181.66,40.82
116 | 138.42,39.64
117 | 105.67,36.59
118 | 408.83,52.81
119 | 123.06,37.32
120 | 271.36,50.82
121 | 148.24,42.38
122 | 357.02,53.14
123 | 333.51,50.57
124 | 186.37,40.79
125 | 185.03,39.61
126 | 198.54,42.58
127 | 297.14,43.38
128 | 378.74,55.98
129 | 126.95,38.55
130 | 367.9,44.7
131 | 222.11,42.77
132 | 292.26,50.02
133 | 251.52,43.14
134 | 53.65,30.45
135 | 232.9,46.8
136 | 226.4,43.6
137 | 137.87,38.49
138 | 227.99,43.83
139 | 263.84,45.08
140 | 223,47.2
141 | 249.85,48.55
142 | 183.14,43.68
143 | 366.83,43.11
144 | 113.61,36.67
145 | 268.33,41.01
146 | 343.43,49.21
147 | 342.31,45.17
148 | 267.99,42.73
149 | 103.89,39.83
150 | 221.99,39.43
151 | 288.55,44.55
152 | 412,58.3
153 | 256.4,42.6
154 | 341.1,41.1
155 | 234.21,42.77
156 | 209.5,41
157 | 286.61,40.47
158 | 134.23,39.41
159 | 435.49,53.73
160 | 342.42,46.54
161 | 305.67,51.09
162 | 205.67,39.29
163 | 288.31,50.57
164 | 344.46,46.02
165 | 102.08,39.16
166 | 136.38,43.96
167 | 132.47,39.79
168 | 85.75,33.35
169 | 250.95,48.95
170 | 238.01,49.37
171 | 94.28,36.96
172 | 151.93,41.11
173 | 440.94,58.38
--------------------------------------------------------------------------------
/Chapter 2/B04662_02_01.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 2 - Data Cleaning
5 |
6 | message("Introduction to R for Business Intelligence
7 | Chapter 2 - Data Cleaning
8 | Copyright (2016) Packt Publishing \n
9 | This is your introduction to data cleaning")
10 |
11 | #
12 | # Summarizing your Data for Inspection
13 | bike <- read.csv("./data/Ch2_raw_bikeshare_data.csv",
14 | stringsAsFactors = FALSE)
15 | str(bike)
16 |
17 | #
18 | # Finding and Fixing Flawed Data
19 |
20 | # Missing values
21 | table(is.na(bike))
22 |
23 | if(!require("stringr")) install.packages("stringr")
24 | suppressMessages(suppressWarnings(library(stringr)))
25 | str_detect(bike, "NA")
26 | table(is.na(bike$sources))
27 |
28 | # Erroneous values
29 | bad_data <- str_subset(bike$humidity, "[a-z A-Z]")
30 | location <- str_detect(bike$humidity, bad_data)
31 | bike[location, ]
32 |
33 | # Fixing flaws in datasets
34 | bike$humidity <- str_replace_all(bike$humidity, bad_data, "61")
35 | bike[location, ]
36 |
37 | #
38 | # Converting Inputs to Data Types Suited for Analysis
39 |
40 | # Converting between data types
41 | bike$humidity <- as.numeric(bike$humidity)
42 |
43 | bike$holiday <- factor(bike$holiday, levels = c(0, 1),
44 | labels = c("no", "yes"))
45 | bike$workingday <- factor(bike$workingday, levels = c(0, 1),
46 | labels = c("no", "yes"))
47 |
48 | bike$season <- factor(bike$season, levels = c(1, 2, 3, 4),
49 | labels = c("spring", "summer",
50 | "fall", "winter"),
51 | ordered = TRUE )
52 |
53 | bike$weather <- factor(bike$weather, levels = c(1, 2, 3, 4),
54 | labels = c("clr_part_cloud",
55 | "mist_cloudy",
56 | "lt_rain_snow",
57 | "hvy_rain_snow"),
58 | ordered = TRUE )
59 | str(bike)
60 |
61 | # Date and time conversions
62 | if(!require("lubridate")) install.packages("lubridate")
63 | suppressMessages(suppressWarnings(library(lubridate)))
64 | bike$datetime <- mdy_hm(bike$datetime)
65 | str(bike)
66 |
67 | #
68 | ## Adapting String Variables to a Standard
69 | unique(bike$sources)
70 |
71 | bike$sources <- tolower(bike$sources)
72 | bike$sources <- str_trim(bike$sources)
73 | na_loc <- is.na(bike$sources)
74 | bike$sources[na_loc] <- "unknown"
75 | unique(bike$sources)
76 |
77 | # The power of seven, plus or minus two
78 | if(!require("DataCombine")) install.packages("DataCombine")
79 | suppressMessages(suppressWarnings(library(DataCombine)))
80 | web_sites <- "(www.[a-z]*.[a-z]*)"
81 | current <- unique(str_subset(bike$sources, web_sites))
82 | replace <- rep("web", length(current))
83 | replacements <- data.frame(from = current, to = replace)
84 | bike <- FindReplace(data = bike, Var = "sources", replacements,
85 | from = "from", to = "to", exact = FALSE)
86 | unique(bike$sources)
87 |
88 | bike$sources <- as.factor(bike$sources)
89 |
90 | # Data ready for analysis
91 | str(bike)
92 |
93 | write.csv(bike, "Ch2_clean_bike_sharing_data.csv",
94 | row.names = FALSE)
95 |
--------------------------------------------------------------------------------
/Chapter 8/B04662_08_02/www/app-styling.css:
--------------------------------------------------------------------------------
1 |
2 | /***************************
3 | ****************************
4 | change the font for the
5 | entire page and other
6 | styling
7 | ****************************
8 | ***************************/
9 | body {
10 | font-family: Source Sans Pro;
11 | overflow-y: scroll;
12 | margin: 10px 10px 10px 10px;
13 | color: #444;
14 | font-weight: 400;
15 | }
16 |
17 | /***************************
18 | ****************************
19 | style the "Hello" text in
20 | the first paragraph to be
21 | larger than all other text
22 | so that it stands out
23 | ****************************
24 | ***************************/
25 | p strong {
26 | font-size: 24pt;
27 | }
28 |
29 | /***************************
30 | ****************************
31 | highlight any selected rows
32 | in the table with yellow
33 |
34 | WARNING: Adjoining classes
35 | notation is not compatible
36 | with IE6 browsers
37 |
38 | The use of !important ensures
39 | that this style overrides
40 | others when doing the
41 | table row selections
42 | ****************************
43 | ***************************/
44 | .dataTable tbody .even.selected {
45 | background-color: #FFFFCC !important;
46 | }
47 | .dataTable tbody .odd.selected {
48 | background-color: #FFFFCC !important;
49 | }
50 |
51 | /***************************
52 | ****************************
53 | create a style for centering
54 | columns in a data table
55 | ****************************
56 | ***************************/
57 | dt-center {
58 | text-align: center;
59 | }
60 |
61 | /***************************
62 | ****************************
63 | modify the look and feel
64 | of the progress wheel
65 | ****************************
66 | ***************************/
67 | div.shinysky-busy-indicator {
68 | z-index: 10000 !important;
69 | position:fixed;
70 | top: 25%;
71 | left: 40%;
72 | margin-top: auto;
73 | margin-left: auto;
74 | display:none;
75 | background: rgba(230, 230, 230, .8);
76 | text-align: center;
77 | font-size: x-large !important;
78 | font-family: Source Sans Pro;
79 | padding-top: 20px;
80 | padding-left: 30px;
81 | padding-bottom: 30px;
82 | padding-right: 30px;
83 | border: 1px solid grey !important;
84 | border-radius: 5px;
85 | }
86 | div.shinysky-busy-indicator p {
87 | margin-bottom: 20px !important;
88 | }
89 |
90 | /***************************
91 | ****************************
92 | add margin to the
93 | download symbol
94 | ****************************
95 | ***************************/
96 | i.fa.fa-download {
97 | margin-right: 5px;
98 | }
99 |
100 | /***************************
101 | ****************************
102 | apply formatting to table
103 | filter inputs so they are
104 | easier to use
105 | ****************************
106 | ***************************/
107 | .dataTable tfoot td, table.dataTable thead td {
108 | padding: 3px 1px 3px 1px !important;
109 | }
110 | .dataTable thead td .glyphicon.glyphicon-remove-circle{
111 | position: relative;
112 | top: 1px;
113 | }
114 | .dataTable thead td .form-control {
115 | padding-right: 0;
116 | padding-left: 4px;
117 | }
118 | .dataTables_filter {
119 | display: none;
120 | }
121 |
122 | /***************************
123 | ****************************
124 | add margin to the download
125 | button so it is positioned
126 | further from the top of
127 | the table
128 | ****************************
129 | ***************************/
130 | #downloadDataFromTable {
131 | margin-bottom: 15px;
132 | }
133 |
134 | /***************************
135 | ****************************
136 | create elements to float
137 | the text and download
138 | buttons to the right and
139 | left of the screen
140 | ****************************
141 | ***************************/
142 | div.itemright {
143 | vertical-align: top;
144 | text-align: center;
145 | float: right;
146 | margin-right: 5px;
147 | }
148 | div.itemleft {
149 | vertical-align: top;
150 | float: left;
151 | margin-left: 5px;
152 | }
153 |
154 | /***************************
155 | ****************************
156 | create a special class that
157 | can be applid to the first
158 | row in the ui so that the
159 | sliderInput for choosing
160 | clusters is positioned
161 | nicely next to the
162 | welcome text
163 | ****************************
164 | ***************************/
165 | .vertical-align {
166 | display: flex;
167 | align-items: center;
168 | }
--------------------------------------------------------------------------------
/Chapter 5/B04662_05_02.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 5, Part 2 - Cluster Analysis: Hierarchical Clustering
5 |
6 | message("Introduction to R for Business Intelligence
7 | Chapter 5 - Data Mining with Cluster Analysis
8 | Copyright (2016) Packt Publishing \n
9 | Let's continue to learn hierarchical cluster analysis")
10 |
11 | #
12 | # Clustering Using Hierarchical Techniques
13 |
14 | # Cleaning and Exploring the Data
15 | market <- read.csv("./data/Ch5_age_income_data.csv")
16 | str(market)
17 | summary(market)
18 |
19 | par(mfrow = c(1, 2))
20 | boxplot(market$age ~ market$bin, main = "Explore Age")
21 | boxplot(market$income ~ market$bin, main = "Explore Income")
22 | par(mfrow = c(1, 1))
23 |
24 | cor.test(market$age, market$income)
25 |
26 | set.seed(789)
27 | three <- kmeans(market[, 2:3], 3)
28 | plot(market$age, market$inc, col = three$cluster, xlab = 'age',
29 | ylab = 'income', main = 'K-means without Scaling')
30 | points(three$centers[, 1], three$centers[, 2],
31 | pch = 23, col = 'maroon', bg = 'lightblue', cex = 3)
32 | text(three$centers[, 1], three$centers[, 2], cex = 1.1,
33 | col = 'black', attributes(three$centers)$dimnames[[1]])
34 | rm(three)
35 |
36 | market$age_scale <- as.numeric(scale(market$age))
37 | market$inc_scale <- as.numeric(scale(market$income))
38 |
39 | set.seed(789)
40 | three <- kmeans(market[, 4:5], 3)
41 | plot(market$age_scale, market$inc_scale, col=three$cluster,
42 | xlab = 'age', ylab = 'income',
43 | main = 'K-means with Scaling')
44 | points(three$centers[, 1], three$centers[, 2],
45 | pch = 23, col = 'maroon', bg = 'lightblue', cex = 3)
46 | text(three$centers[, 1], three$centers[, 2], cex = 1.1,
47 | col = 'black', attributes(three$centers)$dimnames[[1]])
48 | rm(three)
49 |
50 | # Running the hclust() Function
51 | set.seed(456)
52 | hc_mod <- hclust(dist(market[, 4:5]), method = "ward.D2")
53 |
54 | # Visualizing the Model Output
55 | dend <- as.dendrogram(hc_mod)
56 |
57 | if(!require("dendextend")) install.packages("dendextend")
58 | suppressMessages(suppressWarnings(library(dendextend)))
59 | dend_six_color <- color_branches(dend, k = 6)
60 | plot(dend_six_color, leaflab = "none", horiz = TRUE,
61 | main = "Age and Income Dendrogram", xlab = "Height")
62 | abline(v = 37.5, lty = 'dashed', col = 'blue')
63 |
64 | str(cut(dend, h = 37.5)$upper)
65 |
66 | rm(dend_six_color)
67 |
68 | set.seed(456)
69 | two <- kmeans(market[, 4:5], 2)
70 | three <- kmeans(market[, 4:5], 3)
71 | four <- kmeans(market[, 4:5], 4)
72 | five <- kmeans(market[, 4:5], 5)
73 | six <- kmeans(market[, 4:5], 6)
74 | seven <- kmeans(market[, 4:5], 7)
75 | eight <- kmeans(market[, 4:5], 8)
76 | nine <- kmeans(market[, 4:5], 9)
77 | ten <- kmeans(market[, 4:5], 10)
78 |
79 | # Evaluting the Models
80 | optimize <- data.frame(clusters = c(2:10), wss = rep(0, 9))
81 | optimize[1, 2] <- as.numeric(two$tot.withinss)
82 | optimize[2, 2] <- as.numeric(three$tot.withinss)
83 | optimize[3, 2] <- as.numeric(four$tot.withinss)
84 | optimize[4, 2] <- as.numeric(five$tot.withinss)
85 | optimize[5, 2] <- as.numeric(six$tot.withinss)
86 | optimize[6, 2] <- as.numeric(seven$tot.withinss)
87 | optimize[7, 2] <- as.numeric(eight$tot.withinss)
88 | optimize[8, 2] <- as.numeric(nine$tot.withinss)
89 | optimize[9, 2] <- as.numeric(ten$tot.withinss)
90 |
91 | plot(optimize$wss ~ optimize$clusters, type = "b",
92 | ylim = c(0, 12000), ylab = 'Within Sum of Square Error',
93 | main = 'Finding Optimal Number of Clusters Based on Error',
94 | xlab = 'Number of Clusters', pch = 17, col = 'black')
95 | rm(optimize)
96 |
97 | three$size; four$size; five$size; six$size; seven$size
98 | rm(two, three, four, seven, eight, nine, ten)
99 |
100 | market$clus5 <- five$cluster
101 | dend_five <- cutree(dend, k = 5)
102 | market$dend5 <- dend_five
103 |
104 | market$clus6 <- six$cluster
105 | dend_six <- cutree(dend, k = 6)
106 | market$dend6 <- dend_six
107 |
108 | # Choosing a Model
109 | par(mfrow = c(2, 2), mar = c(3, 4, 4, 2) + 0.1)
110 | plot(market$age, market$income, col = five$cluster,
111 | pch = five$cluster, xlab = '', main = '5-means Clustering')
112 | plot(market$age, market$income, col = six$cluster, xlab = '',
113 | ylab = '', pch = six$cluster, main = '6-means Clustering')
114 | par(mar = c(5, 4, 2, 2) + 0.1)
115 | plot(market$age, market$income, col = market$dend5,
116 | pch = market$dend5, main = 'k = 5 Hierarchical')
117 | plot(market$age, market$income, col = market$dend6, ylab = '',
118 | pch = market$dend6, main = 'k = 6 Hierarchical')
119 | par(mfrow = c(1, 1), mar = c(5, 4, 4, 2) + 0.1)
120 |
121 | # Preparing the Results
122 | if(!require("dplyr")) install.packages("dplyr")
123 | suppressMessages(suppressWarnings(library(dplyr)))
124 | labels <- as.data.frame(market %>%
125 | group_by(dend6) %>%
126 | summarise(avg_age = median(age), avg_inc = median(income)))
127 |
128 | plot(market$age, market$income, col = market$dend6,
129 | pch = market$dend6 - 1, xlab = "Age", ylab = "Income",
130 | main = 'Marketing Clusters from Hierarchical Clustering \n (Labels show medians of age and income for cluster)')
131 | points(labels[ ,2], labels[ ,3], pch = 21, col = 'maroon',
132 | bg = 'white', cex = 3)
133 | text(labels[, 2], labels[, 3], cex = 1.1, col = 'black',
134 | labels[, 1])
135 |
136 | market %>% group_by(dend6) %>% summarise(ClusterSize = n())
137 |
138 | market %>% group_by(dend6) %>%
139 | summarise(min_age = min(age), med_age = median(age),
140 | max_age = max(age), med_inc = median(income),
141 | min_inc = min(income), max_inc = max(income))
--------------------------------------------------------------------------------
/Chapter 8/B04662_08_02/B04662_08_02ui.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 8, UI.R file - Marketing Campaign Creator App
5 |
6 | # every user interface starts with shinyUI
7 | shinyUI(
8 |
9 | # fluidPage allows for a format that
10 | # stretches or narrows elements relative
11 | # to the size of the browser window
12 | fluidPage(
13 |
14 | # all resources typically put into an HTML head tag
15 | # can be specified using tags$head
16 | tags$head(
17 |
18 | # adding a title makes for a more identifiable
19 | # tab in the brower window for a user
20 | tags$title("Campaign Creator"),
21 |
22 | # load the Sans Pro Font for cleaner look
23 | # consistent with RStudio projects
24 | tags$link(rel="stylesheet",
25 | type = "text/css",
26 | href = "http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600"
27 | ),
28 |
29 | # load a style sheet specific to this application
30 | tags$link(rel = "stylesheet",
31 | type = "text/css",
32 | href = "app-styling.css"
33 | ),
34 |
35 | # include a browser shortcut icon
36 | # to make the app more visible in the
37 | # browser window and bookmarks folder
38 | tags$link(rel = "shortcut icon",
39 | type = "image/x-icon",
40 | href = "bike-shortcut-icon.ico"
41 | )
42 | ),
43 |
44 | # include a progress wheel whenever the app
45 | # is performing a calculation longer than 1 second
46 | busyIndicator(text = "Calculation in progress ... ", wait = 0),
47 |
48 | # create a row in the ui devoted to welcoming the user
49 | # and telling them how to choose different cluster sizes
50 | # using the slider input
51 | # NOTE: adding the class'vertical-align' ensures that
52 | # the slider input is centered vertically in the row
53 | # next to the block of text
54 | fluidRow(
55 | class="vertical-align",
56 | column(3,
57 | p(strong("Hello"), ", this application allows you to specify different clusters of customers",
58 | "based on age and income to determine more targeted marketing segments. Simply, ",
59 | "move the slider at right for more or less clusters and chose a clustering method."),
60 | p("After choosing a cluster scheme",
61 | "you can filter and download customer data based on those clusters to run a campaign.")
62 | ),
63 | # allow the user to pick a total number of
64 | # clusters to create
65 | column(3,
66 | sliderInput("cluster_count",
67 | label = "How Many Clusters?",
68 | min = 2, max = 10,
69 | value = 6, step = 1)
70 | ),
71 | # allow the user to pick a clustering method
72 | # default to K-means
73 | column(6,
74 | radioButtons("cluster_method",
75 | label = "Clustering Method?",
76 | choices = c("K-means", "Hierarchical"),
77 | selected = "K-means",
78 | inline = FALSE)
79 | )
80 | ),
81 |
82 | # create a row specifically for showing the results
83 | # and diagnostics of the user's cluster count choice
84 | fluidRow(
85 | column(7,
86 | # display the ggplot of clusters
87 | plotOutput("cluster_viz", height = "500px")
88 | ),
89 | column(5,
90 | h3("Cluster Summary Table"),
91 | # display the table of cluster summaries of age and income
92 | DT::dataTableOutput("campaign_summary_table", width = "100%")
93 | )
94 | ),
95 |
96 | # create a separate part of the ui
97 | # by dividing the page with a horizontal rule hr()
98 | # and showing them how to download groups of potential
99 | # campaign members based on the cluster membership and
100 | # other factors in the table of data
101 | hr(),
102 | h3("Potential Campaign Members"),
103 | fluidRow(
104 | column(4,
105 | p("The data in the table below shows all potential customers, their cluster ",
106 | "membership, and their relative percentile of age and income in that cluster. ",
107 | "Use the filter boxes at the top of the table to select even more granular ",
108 | "sets of customers.")
109 | ),
110 | column(4,
111 | p("For example, if you select the 75th percentile and above ",
112 | "for 'Income %Tile within Cluster', then you will be selecting only the top 25% ",
113 | "of incomes from each cluster, which might be a nicely stratified sample of customers ",
114 | "with disposable income relative to their peer group.")
115 | ),
116 | column(4,
117 | # add a button to download the data in the table
118 | tags$div(class = "itemright",
119 | downloadButton("downloadDataFromTable",
120 | "Download Table Data"))
121 | )
122 | ),
123 |
124 | fluidRow(
125 | column(12,
126 | # display the table of potential campaign members
127 | DT::dataTableOutput("campaign_table", width = "100%")
128 | )
129 | )
130 |
131 | ) # this parenthesis closes the fluidPage
132 | ) # this parenthesis closes the UI
133 |
--------------------------------------------------------------------------------
/Chapter 5/B04662_05_01.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 5, Part 1 - Cluster Analysis: K-means Clustering
5 |
6 | message("Introduction to R for Business Intelligence
7 | Chapter 5 - Data Mining with Cluster Analysis
8 | Copyright (2016) Packt Publishing \n
9 | Welcome. Let's learn k-means clustering")
10 |
11 | #
12 | # Partitioning Using K-means Clustering
13 |
14 | # Exploring the Data
15 | stations <- read.csv("./data/Ch5_bike_station_locations.csv")
16 | summary(stations)
17 |
18 | par(mfrow = c(1, 3))
19 | hist(stations$latitude, col = 'gray')
20 | hist(stations$longitude, ylim = c(0, 60), col = 'gray')
21 | plot(stations$longitude, stations$latitude, asp = 1)
22 | par(mfrow = c(1, 1))
23 |
24 | # Running the kmeans() Function
25 | set.seed(123)
26 | two <- kmeans(stations, 2)
27 | three <- kmeans(stations, 3)
28 |
29 | # Interpreting the Model Output
30 | three
31 |
32 | two$centers
33 | two$size
34 |
35 | clus <- cbind(stations, clus2 = two$cluster,
36 | clus3 = three$cluster)
37 | head(clus)
38 |
39 | # Developing a Business Case
40 | par(mfrow = c(1, 2))
41 | plot(clus$longitude, clus$latitude, col = two$cluster, asp = 1,
42 | pch = two$cluster, main = "Sites for two kiosks",
43 | xlab = "Longitude", ylab = "Latitude")
44 | points(two$centers[ ,2], two$centers[ ,1], pch = 23,
45 | col = 'maroon', bg = 'lightblue', cex = 3)
46 | text(two$centers[ ,2], two$centers[ ,1], cex = 1.1,
47 | col = 'black', attributes(two$centers)$dimnames[[1]])
48 |
49 | plot(clus$longitude, clus$latitude, col = three$cluster, asp = 1,
50 | pch = three$cluster, main = "Sites for three kiosks",
51 | xlab = "Longitude", ylab = "Latitude")
52 | points(three$centers[ ,2], three$centers[ ,1],
53 | pch = 23, col = 'maroon', bg = 'lightblue', cex = 3)
54 | text(three$centers[ ,2], three$centers[ ,1], cex = 1.1,
55 | col = 'black', attributes(three$centers)$dimnames[[1]])
56 | par(mfrow = c(1, 1))
57 |
58 | hybrid <- cbind(clus, hybrid_shape = rep(0, dim(clus)[1]))
59 |
60 | for (e in 1:dim(hybrid[1])[1]) {
61 | if (hybrid[e, 3] == hybrid[e, 4]) {
62 | hybrid[e, 5] <- hybrid[e, 3]
63 | }
64 | if (hybrid[e, 3] != hybrid[e, 4]) {
65 | hybrid[e, 5] <- hybrid[e ,3] + 15
66 | }
67 | }
68 |
69 | plot(hybrid$longitude, hybrid$latitude, col = two$cluster,
70 | main = "Hybrid: Two-cluster kiosks in three-cluster locations", pch = hybrid$hybrid_shape, cex = 1.1,
71 | xlab = "Longitude", ylab = "Latitude", asp = 1)
72 | points(three$centers[1:2, 2], three$centers[1:2, 1],
73 | pch = 23, col = 'maroon', bg = 'lightblue', cex = 3)
74 | text(three$centers[1:2, 2], three$centers[1:2, 1], cex = 1.1,
75 | col = 'black', attributes(two$centers)$dimnames[[1]])
76 |
77 | rm(hybrid, stations, e)
78 |
79 | # ----------------------------------------------------
80 | # Additional calculations to support the business case
81 | # ----------------------------------------------------
82 |
83 | # create dataframe with columns for distances
84 | compare <- cbind(clus, dist2 = rep(0, dim(clus)[1]),
85 | dist3 = rep(0, dim(clus)[1]))
86 |
87 | # -------
88 | # functions to find distance based on Spherical Law of Cosines
89 |
90 | distance2 <- function(lat, long, clus_id) {
91 | acos(sin(lat * pi / 180) * sin(two$centers[clus_id, 1] * pi / 180) +
92 | cos(lat * pi / 180) * cos(two$centers[clus_id, 1] * pi / 180) *
93 | cos(two$centers[clus_id, 2] * pi / 180 - long * pi / 180)) *
94 | 6371 #in km
95 | }
96 |
97 | distance3 <- function(lat, long, clus_id) {
98 | acos(sin(lat * pi / 180)*sin(three$centers[clus_id, 1] * pi / 180) +
99 | cos(lat * pi / 180) * cos(three$centers[clus_id, 1] * pi / 180) *
100 | cos(three$centers[clus_id, 2] * pi / 180 - long * pi / 180)) *
101 | 6371 #in km
102 | }
103 |
104 | # -------
105 |
106 | for (e in 1:dim(compare[1])[1]) {
107 | compare[e, 5] <- distance2(compare[e, 1], compare[e, 2], compare[e, 3])
108 | compare[e, 6] <- distance3(compare[e, 1], compare[e, 2], compare[e, 4])
109 | }
110 |
111 | if(!require("dplyr")) install.packages("dplyr")
112 | suppressMessages(suppressWarnings(library(dplyr)))
113 | compare <- cbind(compare, hybrid = rep(0, dim(compare)[1]))
114 |
115 | for (e in 1:dim(compare[1])[1]) {
116 | compare[e, 7] <- distance3(compare[e, 1], compare[e, 2], compare[e, 3])
117 | }
118 |
119 | compare <- mutate(compare, temp_increase = (hybrid - dist3))
120 |
121 | # -------
122 |
123 | par(mfrow = c(1, 3))
124 | hist(compare[ ,5], ylim = c(0, 80), xlim = c(0, 8), col = "lightgray",
125 | xlab = "Dist (km)", main = "Two Kiosks")
126 | abline(v = mean(compare[ ,5]), lty = "dashed")
127 | hist(compare[ ,6], ylim = c(0, 80), xlim = c(0, 8), col = "lightgray",
128 | xlab = "Dist (km)", main = "Three Kiosks")
129 | abline(v = mean(compare[ ,6]), lty = "dashed")
130 | hist(compare[ ,7], ylim = c(0, 80), xlim = c(0, 8), col = "lightgray",
131 | xlab = "Dist (km)", main = "Two (Hybrid Solution)")
132 | abline(v = mean(compare[ ,7]), lty = "dashed")
133 | par(mfrow = c(1, 1))
134 |
135 | summary(compare) #to indicate max
136 |
137 | hist(compare$temp_increase, breaks = 4, xlab = "Distance (km)",
138 | main = "Distance Increase: Building Two Kiosks at Future Locations", col = "gray")
139 |
140 | bins <- as.data.frame(table(cut(compare$temp_increase, breaks = c(-1:5))))
141 | text(seq(-.5, 4.5, 1), 50, cex = 1.1, col = 'black', bins[ ,2])
142 |
143 | increase <- filter(compare, temp_increase > 0)
144 | increase <- increase[ ,-c(1:7)]
145 |
146 | summary(increase)
147 |
148 | text(2, 80, paste("Average increase:", round(mean(increase) *
149 | 0.62137119, 2), "miles")) # .62 mi/km
--------------------------------------------------------------------------------
/Chapter 6/B04662_06_01.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 6 - Time Series Analysis
5 |
6 | message("Introduction to R for Business Intelligence
7 | Chapter 6 - Time Series Analysis
8 | Copyright (2016) Packt Publishing \n
9 | This is your introduction to time series analysis")
10 |
11 | #
12 | # Analyzing Time Series Data with Linear Regression
13 |
14 | if(!require("TSA")) install.packages("TSA")
15 | suppressMessages(suppressWarnings(library(TSA)))
16 | data(airpass)
17 | str(airpass)
18 | summary(airpass)
19 |
20 | volume <- as.matrix(airpass)
21 | time <- as.matrix(time(airpass))
22 |
23 | airpass_df <- as.data.frame(cbind(volume, time))
24 | colnames(airpass_df) <- c("volume", "time")
25 |
26 | lmfit <- lm(volume ~ time, data = airpass_df)
27 | summary(lmfit)
28 |
29 | # Linearity, normality and equal variance
30 |
31 | par(mfrow = c(1, 3))
32 | plot(airpass_df$time, airpass_df$volume, pch = 19,
33 | main = "Linearity?")
34 | abline(lmfit)
35 | hist(lmfit$residuals, main = "Normality?", col = "gray")
36 | plot(lmfit$fitted.values, lmfit$residuals,
37 | main = "Equal Variance?", pch = 19); abline(h = 0)
38 | par(mfrow = c(1, 1))
39 |
40 | # Prediction and confidence intervals
41 |
42 | plot(airpass, main = "95 Percent Confidence and Prediction Intervals of airpass Data")
43 | abline(lmfit, col = "blue")
44 | newdata <- data.frame(time = seq(1960, 1972, 2))
45 | pred <- predict.lm(lmfit, newdata, interval = "predict")
46 |
47 | points(seq(1960, 1972, 2), pred[, 1], pch = 19, col = "blue")
48 | abline(lsfit(seq(1960, 1972, 2), pred[, 2]), col = "red")
49 | abline(lsfit(seq(1960, 1972, 2), pred[, 3]), col = "red")
50 |
51 | pred <- predict.lm(lmfit, newdata, interval = "confidence")
52 | abline(lsfit(seq(1960, 1972, 2), pred[, 2]), lty = 2, col = "red")
53 | abline(lsfit(seq(1960, 1972, 2), pred[, 3]), lty = 2, col = "red")
54 |
55 | rm(airpass_df, newdata, pred, time, volume, lmfit)
56 |
57 | #
58 | # Introducing Key Elements of Time Series Analysis
59 |
60 | if(!require("forecast")) install.packages("forecast")
61 | suppressMessages(suppressWarnings(library(forecast)))
62 | plot(decompose(airpass))
63 |
64 | seq_down <- seq(.625, .125, -0.125)
65 | seq_up <- seq(0, 1.5, 0.25)
66 | y <- c(seq_down, seq_up, seq_down + .75, seq_up + .75,
67 | seq_down + 1.5, seq_up + 1.5)
68 |
69 | par(mfrow = c(1, 3))
70 | plot(y, type = "b", ylim = c(-.1, 3))
71 | plot(diff(y), ylim = c(-.1, 3), xlim = c(0, 36))
72 | plot(diff(diff(y), lag = 12), ylim = c(-.1, 3), xlim = c(0, 36))
73 | par(mfrow = c(1, 1))
74 | detach(package:TSA, unload = TRUE)
75 | rm(y, seq_down, seq_up)
76 |
77 | #
78 | # Building ARIMA Time Series Models
79 |
80 | # Selecting a model to make forecasts
81 |
82 | cycle <- read.csv("./data/Ch6_ridership_data_2011-2012.csv")
83 | head(cycle)
84 |
85 | if(!require("dplyr")) install.packages("dplyr")
86 | suppressMessages(suppressWarnings(library(dplyr)))
87 | if(!require("lubridate")) install.packages("lubridate")
88 | suppressMessages(suppressWarnings(library(lubridate)))
89 | monthly_ride <- as.data.frame(cycle %>%
90 | group_by(year = year(datetime),
91 | month = month(datetime)) %>%
92 | summarise(riders = sum(count)))
93 |
94 | table(monthly_ride$year, monthly_ride$month)
95 |
96 | riders <- monthly_ride[, 3]
97 | monthly <- ts(riders, frequency = 12, start = c(2011, 1))
98 | monthly
99 |
100 | plot(decompose(monthly))
101 |
102 | par(mfrow = c(1, 3))
103 | plot(monthly, ylim = c(-30000, max(monthly)))
104 | plot(diff(monthly), ylim = c(-30000, max(monthly)))
105 | plot(diff(diff(monthly), lag = 12), ylim = c(-30000, max(monthly)))
106 |
107 | par(mfrow = c(1, 2))
108 | acf(monthly, xlim = c(0, 2))
109 | pacf(monthly, xlim = c(0, 2))
110 | par(mfrow = c(1, 1))
111 |
112 | fit1 <- arima(monthly, c(1, 0, 0),
113 | seasonal = list(order = c(0, 0, 0)))
114 | fit1; tsdiag(fit1)
115 |
116 | fit2 <- arima(monthly, c(1, 1, 0),
117 | seasonal = list(order = c(0, 0, 0)))
118 | fit2; tsdiag(fit2)
119 |
120 | fit3 <- arima(monthly, c(2, 1, 0),
121 | seasonal = list(order = c(0, 0, 0)))
122 | fit3; tsdiag(fit3)
123 |
124 | fit4 <- arima(monthly, c(1, 1, 0),
125 | seasonal = list(order = c(0, 1, 0)))
126 | fit4; tsdiag(fit4)
127 |
128 | fit5 <- arima(monthly, c(0, 1, 1),
129 | seasonal = list(order = c(0, 0, 0)))
130 | fit5; tsdiag(fit5)
131 |
132 | suppressMessages(suppressWarnings(library(forecast)))
133 | yr_forecast <- forecast(fit2, h = 12)
134 | plot(yr_forecast)
135 |
136 | # Using advanced functionality for modeling
137 |
138 | monthly_data <- tbats(monthly)
139 | year_forecast <- forecast(monthly_data, h = 12)
140 | plot(year_forecast)
141 |
142 | summary(year_forecast$mean)
143 | summary(year_forecast$upper)
144 | summary(year_forecast$lower)
145 |
146 | mean_2011 <- round(as.numeric(
147 | filter(monthly_ride, year == 2011) %>%
148 | summarise(mean = mean(riders))), 0)
149 | mean_2012 <- round(as.numeric(
150 | filter(monthly_ride, year == 2012) %>%
151 | summarise(mean = mean(riders))), 0)
152 | mean_2013 <- round(mean(year_forecast$mean), 0)
153 | max_mean_2013 <- round(max(year_forecast$mean), 0)
154 |
155 | abline(h = max(year_forecast$mean), lty = 2, col = "blue")
156 | segments(2011, mean_2011, x1 = 2012, y1 = mean_2011,
157 | col = "darkgray", lty = 2, lwd = 2)
158 | segments(2012, mean_2012, x1 = 2013, y1 = mean_2012,
159 | col = "darkgray", lty = 2, lwd = 2)
160 | segments(2013, mean_2013, x1 = 2014, y1 = mean_2013,
161 | col = "blue", lty = 2, lwd = 2)
162 |
163 | text(2011.15, mean_2011 + 10000, mean_2011)
164 | text(2012, mean_2012 + 10000, mean_2012)
165 | text(2013, mean_2013 + 10000, mean_2013)
166 | text(2013.85, max_mean_2013 + 10000, max_mean_2013)
--------------------------------------------------------------------------------
/Chapter 4/B04662_04_01.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 4 - Linear Regression for Business
5 |
6 | message("Introduction to R for Business Intelligence
7 | Chapter 4 - Linear Regression for Business
8 | Copyright (2016) Packt Publishing \n
9 | Welcome. Let's learn linear regression.")
10 |
11 | #
12 | # Understanding Linear Regression
13 |
14 | # The lm() function
15 |
16 | adverts <- read.csv("./data/Ch4_marketing.csv"); str(adverts)
17 |
18 | pairs(adverts)
19 | plot(adverts$marketing_total, adverts$revenues, ylab = "Revenues",
20 | xlab = "Marketing Total", main = "Revenues and Marketing")
21 |
22 | # Simple linear regression (SLR)
23 |
24 | model1 <- lm(revenues ~ marketing_total, data = adverts)
25 | model1
26 |
27 | # Residuals
28 |
29 | plot(adverts$marketing_total, adverts$revenues,
30 | ylab = "Revenues", xlab = "Marketing",
31 | main = "Revenues versus Marketing",
32 | xlim = c(50, 150), xaxt = "n")
33 | abline(model1)
34 | segments(x0 = 53.6, y0 = 31.0, x1 = 53.6, y1 = 34.68, lwd = 2,
35 | lty = 3)
36 | text(x = 57.5, y = 30.5, labels = "A")
37 | text(x = 54.0, y = 36.3, labels = "P")
38 | axis(1, at = c(53.6, 100, 150, 200, 250))
39 |
40 | #
41 | # Checking Model Assumptions
42 |
43 | # Normality
44 |
45 | par(mfrow = c(1, 2))
46 | hist(model1$residuals, xlab = "Residuals", col = "gray",
47 | main = "Residuals Distribution")
48 |
49 | qqnorm(model1$residuals, main = "Q-Q Plot of Residuals")
50 | qqline(model1$residuals)
51 |
52 | # Equal variance
53 |
54 | par(mfrow = c(1, 1))
55 | plot(model1$fitted.values, model1$residuals, ylab = "Residuals",
56 | xlab = "Fitted Values", main = "Residuals Distribution")
57 | abline(0, 0, lwd = 3); abline(h = c(-6.5, 6.5), lwd = 3, lty = 3)
58 |
59 | #
60 | # Using a Simple Linear Regression
61 |
62 | # Interpreting model output
63 |
64 | summary(model1)
65 |
66 | # Predicting unknown outputs with an SLR
67 |
68 | range(adverts$marketing_total)
69 |
70 | if(!require("dplyr")) install.packages("dplyr")
71 | suppressMessages(suppressWarnings(library(dplyr)))
72 | select(adverts, marketing_total) %>% filter(marketing_total > 430)
73 |
74 | newdata <- data.frame(marketing_total = 460)
75 | predict.lm(model1, newdata, interval = "predict")
76 |
77 | predict.lm(model1, newdata, level = 0.99, interval = "predict")
78 | predict.lm(model1, newdata, level = 0.90, interval = "predict")
79 |
80 | newdata = data.frame(marketing_total = c(450, 460, 470))
81 | predict.lm(model1, newdata, interval = "predict")
82 |
83 | # Working with big data using confidence intervals
84 |
85 | set.seed(4510)
86 | market_sample <- sample_frac(adverts, 0.30, replace = FALSE)
87 | samp_model <- lm(revenues ~ marketing_total,
88 | data = market_sample)
89 | samp_model
90 | confint(samp_model)
91 |
92 | #
93 | # Refining Data for Simple Linear Regression
94 |
95 | x0 <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
96 | y0 <- c(1.00, 1.41, 1.73, 2.00, 2.24,
97 | 2.45, 2.65, 2.83, 3.00, 3.16)
98 | fit0 <- lm(y0 ~ x0)
99 |
100 | par(mfrow = c(1, 3))
101 | plot(x0, y0, pch = 19, main = "Linearity?"); abline(fit0)
102 | hist(fit0$residuals, main = "Normality?", col = "gray")
103 | plot(fit0$fitted.values, fit0$residuals,
104 | main = "Equal Variance?", pch = 19); abline(h = 0)
105 |
106 | # Transforming data
107 |
108 | y0_t <- y0^2
109 | fit0_t <- lm(y0_t ~ x0)
110 |
111 | plot(x0, y0_t, pch = 19, main = "Linear"); abline(fit0_t)
112 | hist(fit0_t$residuals, main = "Normal", col = "gray")
113 | plot(fit0_t$fitted.values, fit0_t$residuals,
114 | main = "Equal Variance", pch = 19); abline(h = 0)
115 | par(mfrow = c(1, 1))
116 |
117 | if(!require("MASS")) install.packages("MASS")
118 | suppressMessages(suppressWarnings(library(MASS)))
119 | boxcox(fit0)
120 |
121 | x1 <- c(1, 5, 15, 30, 60, 120, 240, 480,
122 | 720, 1440, 2880, 5760, 10080)
123 | y1 <- c(0.84, 0.71, 0.61, 0.56, 0.54, 0.47,
124 | 0.45, 0.38, 0.36, 0.26, 0.2, 0.16, 0.08)
125 | fit1 <- lm(y1 ~ x1)
126 |
127 | par(mfrow = c(1, 3))
128 | plot(x1, y1, pch = 19, main = "Linearity?"); abline(fit1)
129 | hist(fit1$residuals, main = "Normality?", col = "gray")
130 | plot(fit1$fitted.values, fit1$residuals,
131 | main = "Equal Variance?", pch = 19); abline(h = 0)
132 |
133 | x1_t <- log(x1)
134 | fit1_t <- lm(y1 ~ x1_t)
135 |
136 | plot(x1_t, y1, pch = 19, main = "Linear"); abline(fit1_t)
137 | hist(fit1_t$residuals, main = "Normal", col = "gray")
138 | plot(fit1_t$fitted.values, fit1_t$residuals,
139 | main = "Equal Variance", pch = 19); abline(h = 0)
140 |
141 | # Handling outliers and influential points
142 |
143 | x2 <- 1:20
144 | y2 <- c(1:10, 4, 12:20)
145 | fit2 <- lm(y2 ~ x2)
146 |
147 | x3 <- c(1:20, 30)
148 | y3 <- c(0.4, 2.2, 2.2, 5.6, 5.3, 5.2, 7.5, 8.7, 9.6, 9.7, 12.5,
149 | 12.4, 12.4, 11.8, 16.1, 16, 17, 18.9, 19.8, 20.6, 30.0)
150 | fit3 <-lm(y3 ~ x3)
151 |
152 | par(mfrow = c(1, 2))
153 | plot(x2, y2, pch = 19, main = "Outlier is Influential")
154 | abline(fit2)
155 | plot(x3, y3, pch = 19, main = "Outlier is not Influential")
156 | abline(fit3)
157 |
158 | #------------
159 | # You practice
160 |
161 | x4 <- c(1:20)
162 | y4 <- c(0.4, 2.2, 2.2, 5.6, 5.3, 5.2, 7.5, 8.7,
163 | 9.6, 9.7, 12.5, 12.4, 12.4, 12.8, 16.1,
164 | 16.0, 17.0, 11.5, 19.8, 20.6)
165 | fit4 <- lm(y4 ~ x4)
166 |
167 | par(mfrow = c(1, 1))
168 | plot(x4, y4, pch = 19, col = "blue")
169 | abline(fit4)
170 | summary(fit4)
171 |
172 | x4_t <- x4[-18]
173 | y4_t <-y4[-18]
174 | fit4_t <- lm(y4_t ~ x4_t)
175 | summary(fit4_t)
176 |
177 | par(mfrow = c(2, 2))
178 | plot(fit4)
179 | #------------
180 |
181 | #
182 | # Introduction to Multiple Linear Regression
183 |
184 | model2 <- lm(revenues ~ google_adwords + facebook + twitter,
185 | data = adverts)
186 |
187 | plot(model2)
188 | summary(model2)
189 |
--------------------------------------------------------------------------------
/Chapter 3/B04662_03_01.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 3 - Exploratory Data Analysis
5 |
6 | message("Introduction to R for Business Intelligence
7 | Chapter 3 - Exploratory Data Analysis
8 | Copyright (2016) Packt Publishing \n
9 | This is your introduction to data exploration")
10 |
11 | #
12 | # Analyzing a Single Data Variable
13 | marketing <- read.csv("./data/Ch3_marketing.csv",
14 | stringsAsFactors = TRUE)
15 | str(marketing)
16 |
17 | marketing$pop_density <- factor(marketing$pop_density,
18 | ordered = TRUE,
19 | levels = c("Low", "Medium",
20 | "High"))
21 |
22 | # Tabular exploration
23 |
24 | summary(marketing$google_adwords)
25 | fivenum(marketing$google_adwords)
26 |
27 | mean(marketing$google_adwords)
28 | sd(marketing$google_adwords)
29 | var(marketing$google_adwords)
30 |
31 | summary(marketing$pop_density)
32 |
33 | # Graphical exploration
34 |
35 | data("anscombe")
36 | anscombe
37 |
38 | sapply(anscombe, mean)
39 | sapply(anscombe, sd)
40 | sapply(anscombe, var)
41 |
42 | plot(marketing$pop_density)
43 |
44 | par(mfrow = c(1, 2))
45 | boxplot(marketing$google_adwords, ylab = "Expenditures")
46 | hist(marketing$google_adwords, main = NULL)
47 |
48 | summary(marketing$twitter)
49 |
50 | boxplot(marketing$twitter, ylab = "Expenditures", col = "gray")
51 | hist(marketing$twitter, main = NULL, col = "blue")
52 | par(mfrow = c(1, 1), lty = 1)
53 |
54 | #
55 | # Analyzing Two Variables Together
56 |
57 | # What does the data look like?
58 |
59 | marketing$emp_factor <- cut(marketing$employees, 2)
60 |
61 | summary(marketing)
62 |
63 | # Is there any relationship between two variables?
64 |
65 | table(marketing$emp_factor, marketing$pop_density)
66 |
67 | par(mfrow = c(1, 3))
68 | mosaicplot(table(marketing$pop_density, marketing$emp_factor),
69 | col=c("gray","black"), main = "Factor / Factor")
70 | boxplot(marketing$marketing_total ~ marketing$pop_density,
71 | main = "Factor / Numeric")
72 | plot(marketing$google_adwords, marketing$revenues,
73 | main = "Numeric / Numeric")
74 |
75 | # Is there any correlation between the two?
76 |
77 | cor(marketing$google_adwords, marketing$revenues)
78 | cor(marketing$google_adwords, marketing$facebook)
79 |
80 | # Is the correlation significant?
81 |
82 | cor.test(marketing$google_adwords, marketing$revenues)
83 |
84 | cor.test(marketing$twitter, marketing$revenues)
85 | cor.test(marketing$facebook, marketing$revenues)
86 |
87 | cheese <- c(9.3, 9.7, 9.7, 9.7, 9.9, 10.2, 10.5, 11, 10.6, 10.6)
88 | degrees <- c(480, 501, 540, 552, 547, 622, 655, 701, 712, 708)
89 | cor(cheese, degrees)
90 | cor.test(cheese, degrees)
91 |
92 | cor.test(marketing$google_adwords, marketing$facebook)
93 |
94 | cor.test(marketing$revenues, marketing$marketing_total)
95 |
96 | plot(marketing$google_adwords, marketing$revenues,
97 | main = "Cor: 0.766")
98 | plot(marketing$google_adwords, marketing$facebook,
99 | main = "Cor: 0.076")
100 | plot(marketing$marketing_total, marketing$revenues,
101 | main = "Cor: 0.853")
102 | par(mfrow = c(1, 1))
103 |
104 | marketing$emp_factor <- NULL
105 |
106 | #
107 | # Exploring Multiple Variables Simultaneously
108 |
109 | # Look
110 |
111 | summary(marketing)
112 |
113 | # Relationships
114 |
115 | pairs(marketing)
116 |
117 | # Correlations
118 |
119 | cor(marketing[ ,1:6])
120 |
121 | # Significance
122 |
123 | if(!require("psych")) install.packages("psych")
124 | suppressMessages(suppressWarnings(library(psych)))
125 | corr.test(marketing[ ,1:6])
126 |
127 | if(!require("corrgram")) install.packages("corrgram")
128 | suppressMessages(suppressWarnings(library(corrgram)))
129 | corrgram(marketing[ ,1:6], order = FALSE,
130 | main = "Correlogram of Marketing Data, Unordered",
131 | lower.panel = panel.conf, upper.panel = panel.ellipse,
132 | diag.panel = panel.minmax, text.panel = panel.txt)
133 |
134 | corrgram(marketing[ ,1:6], order = TRUE,
135 | main = "Correlogram of Marketing Data, Ordered",
136 | lower.panel = panel.shade, upper.panel = panel.pie,
137 | diag.panel = panel.minmax, text.panel = panel.txt)
138 |
139 | #
140 | # Further Practice
141 |
142 | # Read in data and reconvert data
143 | bike <- read.csv("./data/Ch2_clean_bike_sharing_data.csv",
144 | stringsAsFactors = TRUE)
145 |
146 | bike$season <- factor(bike$season, ordered = TRUE,
147 | levels = c("spring", "summer",
148 | "fall", "winter"))
149 | bike$weather <- factor(bike$weather, ordered = TRUE,
150 | levels = c("clr_part_cloud",
151 | "mist_cloudy",
152 | "lt_rain_snow",
153 | "hvy_rain_snow"))
154 |
155 | if(!require("lubridate")) install.packages("lubridate")
156 | suppressMessages(suppressWarnings(library(lubridate)))
157 | bike$datetime <- ymd_hms(bike$datetime)
158 |
159 | # Question 1
160 | str(bike)
161 |
162 | # Question 2
163 | table(bike$season)
164 |
165 | # Question 3
166 | mean(bike$temp)
167 | sd(bike$temp)
168 |
169 | # Question 4
170 | hist(bike$temp)
171 |
172 | # Question 5
173 | plot(bike$workingday)
174 | hist(bike$casual)
175 |
176 | # Question 6
177 | nbike <- bike[ ,-c(1:5, 13)]
178 | cor(nbike)
179 |
180 | # Question 7
181 | png('bikePairs.png', width = 15, height = 15,
182 | units = 'in', res = 300) #creates file in working dir
183 | pairs(bike) #this could take a couple minutes
184 | dev.off()
185 |
186 | corr.test(nbike)
187 |
188 | corrgram(nbike, order = FALSE,
189 | main = "Correlogram of Bike Data",
190 | lower.panel = panel.conf, upper.panel = panel.ellipse,
191 | diag.panel = panel.minmax, text.panel = panel.txt)
192 |
193 | corrgram(nbike, order = TRUE,
194 | main = "Correlogram of Bike Data",
195 | lower.panel = panel.shade, upper.panel = panel.pie,
196 | diag.panel = panel.minmax, text.panel = panel.txt)
--------------------------------------------------------------------------------
/Chapter 4/data/Ch4_marketing.csv:
--------------------------------------------------------------------------------
1 | google_adwords,facebook,twitter,marketing_total,revenues
2 | 65.66,47.86,52.46,165.98,39.26
3 | 39.1,55.2,77.4,171.7,38.9
4 | 174.81,52.01,68.01,294.83,49.51
5 | 34.36,61.96,86.86,183.18,40.56
6 | 78.21,40.91,30.41,149.53,40.21
7 | 34.19,15.09,12.79,62.07,38.09
8 | 225.71,15.91,33.31,274.93,44.21
9 | 90.03,17.13,34.33,141.49,40.23
10 | 238.4,35.1,13.9,287.4,48.8
11 | 43.53,42.23,71.83,157.59,36.63
12 | 118.24,15.74,14.14,148.12,38.14
13 | 224.64,40.84,52.74,318.22,47.24
14 | 219.51,59.21,63.21,341.93,54.21
15 | 89.79,45.99,122.19,257.97,42.19
16 | 306.09,51.69,66.69,424.47,56.79
17 | 91.98,30.68,27.28,149.94,41.78
18 | 242.72,39.42,63.92,346.06,50.02
19 | 263.64,18.74,35.94,318.32,46.44
20 | 35.16,25.26,57.76,118.18,35.26
21 | 253.04,29.04,37.14,319.22,47.94
22 | 88.14,25.84,30.34,144.32,43.24
23 | 163.68,37.48,19.58,220.74,43.48
24 | 263.96,27.96,32.96,324.88,47.46
25 | 268.98,34.68,29.28,332.94,46.78
26 | 314.07,36.87,50.57,401.51,50.27
27 | 134.9,26.8,46.8,208.5,41.6
28 | 284.99,26.79,5.89,317.67,44.49
29 | 117.68,10.78,15.58,144.04,39.18
30 | 316.09,16.89,20.09,353.07,45.89
31 | 288.58,52.88,12.88,354.34,54.78
32 | 97.37,59.47,54.57,211.41,45.07
33 | 66.6,37.6,44.8,149,41.3
34 | 250.75,47.85,40.95,339.55,51.95
35 | 223.1,30.3,38.4,291.8,44.9
36 | 202.09,45.89,49.99,297.97,49.89
37 | 317.58,39.08,11.98,368.64,52.38
38 | 231.76,20.66,37.46,289.88,45.46
39 | 45.16,33.16,49.56,127.88,36.26
40 | 199.47,34.27,42.07,275.81,46.97
41 | 262.08,51.08,26.88,340.04,53.08
42 | 224.85,15.55,45.85,286.25,44.15
43 | 124.23,20.83,13.63,158.69,42.23
44 | 241.18,53.88,50.58,345.64,55.08
45 | 205.77,56.77,68.07,330.61,52.07
46 | 285.71,39.21,25.11,350.03,50.91
47 | 32.13,40.33,52.43,124.89,38.03
48 | 155.66,26.06,22.26,203.98,40.36
49 | 233.44,59.64,46.54,339.62,54.14
50 | 235.13,41.33,19.93,296.39,50.53
51 | 77.65,13.55,31.75,122.95,39.95
52 | 283.94,52.74,63.54,400.22,54.54
53 | 128.03,42.33,19.93,190.29,47.03
54 | 153.47,52.57,37.47,243.51,48.07
55 | 90.01,17.71,8.11,115.83,38.01
56 | 51.29,31.79,8.19,91.27,36.99
57 | 159.3,21.9,16.4,197.6,41.1
58 | 258.91,36.41,18.71,314.03,48.11
59 | 239.73,54.23,36.33,330.29,52.93
60 | 133.73,25.63,41.83,201.19,44.03
61 | 48.95,42.55,27.65,119.15,38.65
62 | 155.09,18.79,43.19,217.07,44.39
63 | 234.76,33.36,20.66,288.78,46.06
64 | 50.01,11.51,29.41,90.93,37.11
65 | 142.13,37.53,22.03,201.69,43.53
66 | 29.26,41.16,19.46,89.88,36.86
67 | 137.11,16.21,30.41,183.73,39.81
68 | 262.45,14.15,45.75,322.35,42.65
69 | 99.96,32.36,43.36,175.68,43.66
70 | 88.29,51.79,41.69,181.77,41.19
71 | 238.93,55.83,45.43,340.19,54.83
72 | 214.87,27.47,73.57,315.91,44.57
73 | 101.48,40.08,27.38,168.94,44.88
74 | 132.43,49.73,71.13,253.29,45.43
75 | 109.94,34.54,81.24,225.72,42.24
76 | 132.43,57.83,60.23,250.49,47.03
77 | 159.85,17.85,21.05,198.75,44.45
78 | 243.05,46.25,70.55,359.85,52.45
79 | 272.93,45.93,80.53,399.39,51.93
80 | 132.14,26.14,21.84,180.12,43.94
81 | 189.32,45.02,65.12,299.46,50.62
82 | 219.94,13.24,14.44,247.62,41.74
83 | 313.99,53.99,61.69,429.67,57.39
84 | 157.3,51.2,54.2,262.7,47
85 | 243.98,13.28,57.58,314.84,40.98
86 | 321,48.3,111.7,481,56.1
87 | 300.92,18.22,28.32,347.46,43.22
88 | 262.48,45.98,15.78,324.24,52.68
89 | 158.05,53.95,65.35,277.35,47.05
90 | 46.02,19.42,36.92,102.36,35.92
91 | 110.7,8,29.7,148.4,36.7
92 | 34.08,8.78,32.78,75.64,33.98
93 | 275.11,34.01,11.41,320.53,47.21
94 | 249.6,19.4,66.5,335.5,44.9
95 | 267.13,50.83,34.83,352.79,54.93
96 | 200.45,27.55,13.35,241.35,46.55
97 | 234.48,32.88,21.78,289.14,48.48
98 | 100.69,56.69,43.19,200.57,44.79
99 | 97.27,44.57,61.07,202.91,42.47
100 | 164.18,26.68,36.78,227.64,44.88
101 | 99.93,11.73,24.53,136.19,40.63
102 | 43.28,27.28,32.38,102.94,38.18
103 | 163.07,35.97,54.17,253.21,44.97
104 | 245.19,10.99,22.99,279.17,40.49
105 | 149.35,48.25,24.85,222.45,49.15
106 | 253.23,43.43,84.13,380.79,51.13
107 | 107.99,19.99,32.89,160.87,39.09
108 | 28.01,46.51,57.01,131.53,34.51
109 | 102.85,10.05,18.05,130.95,39.15
110 | 246.07,62.17,15.17,323.41,58.17
111 | 83.09,22.89,52.79,158.77,40.89
112 | 26.83,53.13,21.03,100.99,35.43
113 | 289.62,14.72,53.62,357.96,44.82
114 | 30.2,36.4,10.1,76.7,35.2
115 | 59.22,48.32,74.12,181.66,40.82
116 | 68.64,54.74,15.04,138.42,39.64
117 | 44.99,45.79,14.89,105.67,36.59
118 | 298.01,40.61,70.21,408.83,52.81
119 | 63.02,33.32,26.72,123.06,37.32
120 | 207.32,53.72,10.32,271.36,50.82
121 | 97.18,28.18,22.88,148.24,42.38
122 | 219.94,49.04,88.04,357.02,53.14
123 | 243.27,43.37,46.87,333.51,50.57
124 | 127.29,15.79,43.29,186.37,40.79
125 | 116.71,22.71,45.61,185.03,39.61
126 | 164.88,13.88,19.78,198.54,42.58
127 | 262.58,17.18,17.38,297.14,43.38
128 | 266.08,59.28,53.38,378.74,55.98
129 | 65.45,33.95,27.55,126.95,38.55
130 | 301.6,22.2,44.1,367.9,44.7
131 | 144.47,19.27,58.37,222.11,42.77
132 | 194.62,50.42,47.22,292.26,50.02
133 | 207.64,28.34,15.54,251.52,43.14
134 | 23.65,18.55,11.45,53.65,30.45
135 | 117.7,54.7,60.5,232.9,46.8
136 | 175.6,14.5,36.3,226.4,43.6
137 | 35.19,47.79,54.89,137.87,38.49
138 | 154.93,29.03,44.03,227.99,43.83
139 | 195.48,28.48,39.88,263.84,45.08
140 | 111.9,49.4,61.7,223,47.2
141 | 186.35,47.05,16.45,249.85,48.55
142 | 141.28,26.18,15.68,183.14,43.68
143 | 258.01,14.31,94.51,366.83,43.11
144 | 38.87,45.97,28.77,113.61,36.67
145 | 227.91,13.71,26.71,268.33,41.01
146 | 239.81,35.41,68.21,343.43,49.21
147 | 306.77,20.47,15.07,342.31,45.17
148 | 185.03,28.83,54.13,267.99,42.73
149 | 44.13,32.03,27.73,103.89,39.83
150 | 188.43,14.53,19.03,221.99,39.43
151 | 247.75,16.15,24.65,288.55,44.55
152 | 300.5,59.9,51.6,412,58.3
153 | 193.4,18.4,44.6,256.4,42.6
154 | 298.3,11.3,31.5,341.1,41.1
155 | 188.07,19.87,26.27,234.21,42.77
156 | 179.4,12.8,17.3,209.5,41
157 | 239.07,13.37,34.17,286.61,40.47
158 | 79.21,16.11,38.91,134.23,39.41
159 | 307.43,50.23,77.83,435.49,53.73
160 | 275.04,29.94,37.44,342.42,46.54
161 | 225.79,53.29,26.59,305.67,51.09
162 | 160.79,10.79,34.09,205.67,39.29
163 | 216.67,41.67,29.97,288.31,50.57
164 | 308.42,23.72,12.32,344.46,46.02
165 | 43.46,24.26,34.36,102.08,39.16
166 | 64.96,53.96,17.46,136.38,43.96
167 | 97.69,20.39,14.39,132.47,39.79
168 | 36.95,11.25,37.55,85.75,33.35
169 | 188.45,51.05,11.45,250.95,48.95
170 | 174.07,47.37,16.57,238.01,49.37
171 | 59.86,12.76,21.66,94.28,36.96
172 | 117.91,16.01,18.01,151.93,41.11
173 | 308.78,54.58,77.58,440.94,58.38
--------------------------------------------------------------------------------
/Chapter 5/data/Ch5_bike_station_locations.csv:
--------------------------------------------------------------------------------
1 | "latitude","longitude"
2 | 38.95659,-76.993437
3 | 38.905218,-77.001496
4 | 38.980858,-77.054722
5 | 38.902925,-76.929915
6 | 38.949498,-77.09362
7 | 38.927799,-77.084738
8 | 38.888698,-76.91947
9 | 38.863403,-76.98242
10 | 38.885703,-76.919518
11 | 38.919268,-76.954753
12 | 38.918425,-77.074441
13 | 38.868376,-76.942321
14 | 38.903461,-76.934427
15 | 38.88017,-76.931564
16 | 38.921942,-77.017931
17 | 38.916089,-77.037732
18 | 38.913814,-77.04852
19 | 38.956787,-77.008228
20 | 38.909844,-77.063495
21 | 38.871136,-76.952488
22 | 38.855555,-76.962725
23 | 38.955217,-77.018456
24 | 38.907719,-77.029879
25 | 38.921747,-76.955459
26 | 38.913915,-77.052149
27 | 38.934249,-76.981012
28 | 38.976661,-77.055576
29 | 38.932086,-77.02481
30 | 38.96785,-77.008818
31 | 38.884181,-77.004803
32 | 38.885501,-76.94327
33 | 38.892934,-76.992413
34 | 38.918765,-77.001814
35 | 38.934762,-77.042165
36 | 38.95008,-76.988523
37 | 38.91996,-77.097714
38 | 38.963521,-77.019691
39 | 38.881183,-76.942278
40 | 38.91529,-77.017438
41 | 38.962518,-77.00209
42 | 38.845999,-76.972549
43 | 38.945373,-77.026788
44 | 38.910956,-77.049479
45 | 38.929305,-77.021286
46 | 38.889225,-76.932455
47 | 38.914653,-77.01283
48 | 38.906435,-76.978719
49 | 38.93211,-77.044458
50 | 38.886669,-76.986616
51 | 38.906434,-77.065048
52 | 38.866297,-76.988457
53 | 38.968379,-77.010484
54 | 38.858684,-76.986088
55 | 38.833648,-76.996361
56 | 38.896423,-76.974288
57 | 38.902678,-76.943012
58 | 38.89207,-76.948542
59 | 38.837071,-76.990945
60 | 38.967111,-77.021462
61 | 38.904986,-76.985906
62 | 38.916704,-77.055444
63 | 38.917885,-77.096921
64 | 38.906955,-77.06345
65 | 38.948451,-77.027837
66 | 38.830615,-76.991721
67 | 38.870938,-77.016675
68 | 38.835598,-77.016727
69 | 38.985747,-77.031797
70 | 38.939416,-76.976961
71 | 38.94197,-77.01687
72 | 38.934875,-76.967353
73 | 38.922168,-77.002985
74 | 38.907379,-77.027693
75 | 38.960559,-77.022671
76 | 38.896277,-76.973281
77 | 38.928912,-76.999274
78 | 38.916857,-76.999135
79 | 38.917247,-77.017682
80 | 38.90149,-76.988621
81 | 38.931946,-77.106502
82 | 38.90248,-76.92515
83 | 38.918972,-77.071495
84 | 38.930385,-77.03959
85 | 38.929345,-77.056653
86 | 38.930892,-76.992335
87 | 38.925589,-77.044202
88 | 38.857391,-76.958568
89 | 38.929135,-77.019964
90 | 38.87344,-76.992401
91 | 38.838929,-77.0219
92 | 38.927824,-77.029118
93 | 38.883001,-76.94034
94 | 38.956242,-77.078104
95 | 38.860892,-76.993419
96 | 38.869939,-76.972432
97 | 38.974502,-77.020733
98 | 38.920329,-77.039613
99 | 38.872104,-76.970186
100 | 38.960796,-77.000789
101 | 38.922543,-77.102561
102 | 38.910906,-77.010031
103 | 38.849709,-76.9842
104 | 38.914689,-77.039419
105 | 38.928918,-77.037902
106 | 38.921263,-76.997534
107 | 38.912859,-77.025277
108 | 38.923367,-77.049161
109 | 38.910569,-77.028744
110 | 38.908749,-77.01634
111 | 38.966864,-77.020829
112 | 38.94164,-77.030424
113 | 38.916776,-77.03051
114 | 38.886919,-76.985745
115 | 38.932364,-77.030634
116 | 38.934471,-77.084305
117 | 38.882075,-77.022412
118 | 38.912813,-77.01553
119 | 38.915226,-77.026685
120 | 38.827425,-77.008389
121 | 38.929172,-76.972423
122 | 38.891268,-76.925797
123 | 38.924646,-76.99059
124 | 38.968968,-77.055342
125 | 38.925207,-77.102848
126 | 38.944474,-77.056286
127 | 38.898837,-76.983047
128 | 38.885531,-76.984412
129 | 38.87587,-76.965204
130 | 38.883832,-76.997361
131 | 38.833856,-76.99795
132 | 38.903168,-77.016452
133 | 38.93387,-77.037394
134 | 38.948993,-77.09976
135 | 38.90622,-77.07043
136 | 38.983378,-77.029954
137 | 38.888301,-76.999742
138 | 38.891676,-76.941061
139 | 38.893588,-76.981154
140 | 38.917513,-77.072033
141 | 38.932341,-76.979131
142 | 38.939952,-77.028917
143 | 38.945128,-77.016727
144 | 38.95169,-77.024296
145 | 38.929518,-77.060069
146 | 38.913221,-77.017982
147 | 38.936486,-77.068053
148 | 38.91355,-77.067488
149 | 38.905029,-77.011678
150 | 38.958927,-77.029959
151 | 38.842278,-76.986051
152 | 38.953066,-77.072046
153 | 38.955633,-76.998161
154 | 38.885983,-76.977936
155 | 38.928662,-77.022949
156 | 38.980572,-77.029239
157 | 38.897148,-76.992395
158 | 38.968397,-77.074348
159 | 38.907002,-76.941122
160 | 38.936715,-76.970934
161 | 38.941603,-76.976511
162 | 38.902301,-76.922726
163 | 38.883947,-76.983447
164 | 38.861129,-76.997192
165 | 38.874046,-77.011539
166 | 38.955204,-77.018935
167 | 38.886206,-76.936297
168 | 38.909965,-77.038268
169 | 38.95447,-77.083262
170 | 38.952482,-77.021892
171 | 38.888027,-77.000781
172 | 38.930497,-77.033913
173 | 38.941506,-77.018949
174 | 38.980954,-77.024163
175 | 38.900086,-76.939458
176 | 38.921344,-77.048025
177 | 38.900493,-77.018321
178 | 38.888853,-76.988634
179 | 38.91045,-77.015458
180 | 38.954028,-77.022373
181 | 38.951808,-77.090849
182 | 38.882752,-77.004064
183 | 38.897961,-76.997333
184 | 38.903559,-76.993221
185 | 38.920371,-77.042655
186 | 38.896764,-76.998661
187 | 38.863313,-76.989413
188 | 38.87492,-77.01159
189 | 38.931635,-77.066023
190 | 38.882348,-76.991819
191 | 38.943689,-77.009815
192 | 38.87351,-76.968042
193 | 38.833408,-77.007389
194 | 38.920851,-77.073338
195 | 38.950393,-77.033153
196 | 38.886216,-76.992408
197 | 38.885538,-76.942666
198 | 38.901133,-76.993063
199 | 38.912033,-77.011169
200 | 38.933307,-76.97988
201 | 38.948675,-77.018831
202 | 38.935688,-77.067285
203 | 38.920399,-77.014547
204 | 38.962607,-77.077438
205 | 38.913575,-77.039239
206 | 38.945442,-77.019768
207 | 38.906431,-76.9806
208 | 38.905476,-77.00005
209 | 38.923584,-77.099968
210 | 38.948053,-77.007096
211 | 38.971688,-77.028209
212 | 38.958061,-77.013406
213 | 38.873638,-76.962678
214 | 38.843038,-77.019541
215 | 38.917933,-77.009993
216 | 38.925082,-77.017308
217 | 38.897321,-76.941893
218 | 38.931537,-77.088115
219 | 38.931497,-76.966477
220 | 38.837364,-77.011409
221 | 38.984523,-77.032555
222 | 38.903871,-77.010345
223 | 38.965141,-77.063211
224 | 38.930069,-76.965304
225 | 38.891852,-77.005538
226 | 38.98798,-77.044239
227 | 38.892595,-76.996372
228 | 38.902078,-76.989093
229 | 38.964767,-77.021035
230 | 38.834783,-77.004059
231 | 38.893627,-76.923993
232 | 38.955897,-76.992291
233 | 38.92891,-76.99104
234 | 38.96098,-77.017786
235 | 38.930385,-77.039661
236 | 38.903246,-76.927256
237 | 38.829601,-77.023423
238 | 38.906193,-76.950338
239 | 38.967822,-77.05587
240 | 38.884449,-76.981989
241 | 38.96562,-77.060719
242 | 38.88073,-76.993533
243 | 38.92469,-76.978702
244 | 38.869303,-76.968034
245 | 38.934918,-76.965717
--------------------------------------------------------------------------------
/Chapter 7/data/Ch7_bike_station_locations.csv:
--------------------------------------------------------------------------------
1 | "latitude","longitude"
2 | 38.95659,-76.993437
3 | 38.905218,-77.001496
4 | 38.980858,-77.054722
5 | 38.902925,-76.929915
6 | 38.949498,-77.09362
7 | 38.927799,-77.084738
8 | 38.888698,-76.91947
9 | 38.863403,-76.98242
10 | 38.885703,-76.919518
11 | 38.919268,-76.954753
12 | 38.918425,-77.074441
13 | 38.868376,-76.942321
14 | 38.903461,-76.934427
15 | 38.88017,-76.931564
16 | 38.921942,-77.017931
17 | 38.916089,-77.037732
18 | 38.913814,-77.04852
19 | 38.956787,-77.008228
20 | 38.909844,-77.063495
21 | 38.871136,-76.952488
22 | 38.855555,-76.962725
23 | 38.955217,-77.018456
24 | 38.907719,-77.029879
25 | 38.921747,-76.955459
26 | 38.913915,-77.052149
27 | 38.934249,-76.981012
28 | 38.976661,-77.055576
29 | 38.932086,-77.02481
30 | 38.96785,-77.008818
31 | 38.884181,-77.004803
32 | 38.885501,-76.94327
33 | 38.892934,-76.992413
34 | 38.918765,-77.001814
35 | 38.934762,-77.042165
36 | 38.95008,-76.988523
37 | 38.91996,-77.097714
38 | 38.963521,-77.019691
39 | 38.881183,-76.942278
40 | 38.91529,-77.017438
41 | 38.962518,-77.00209
42 | 38.845999,-76.972549
43 | 38.945373,-77.026788
44 | 38.910956,-77.049479
45 | 38.929305,-77.021286
46 | 38.889225,-76.932455
47 | 38.914653,-77.01283
48 | 38.906435,-76.978719
49 | 38.93211,-77.044458
50 | 38.886669,-76.986616
51 | 38.906434,-77.065048
52 | 38.866297,-76.988457
53 | 38.968379,-77.010484
54 | 38.858684,-76.986088
55 | 38.833648,-76.996361
56 | 38.896423,-76.974288
57 | 38.902678,-76.943012
58 | 38.89207,-76.948542
59 | 38.837071,-76.990945
60 | 38.967111,-77.021462
61 | 38.904986,-76.985906
62 | 38.916704,-77.055444
63 | 38.917885,-77.096921
64 | 38.906955,-77.06345
65 | 38.948451,-77.027837
66 | 38.830615,-76.991721
67 | 38.870938,-77.016675
68 | 38.835598,-77.016727
69 | 38.985747,-77.031797
70 | 38.939416,-76.976961
71 | 38.94197,-77.01687
72 | 38.934875,-76.967353
73 | 38.922168,-77.002985
74 | 38.907379,-77.027693
75 | 38.960559,-77.022671
76 | 38.896277,-76.973281
77 | 38.928912,-76.999274
78 | 38.916857,-76.999135
79 | 38.917247,-77.017682
80 | 38.90149,-76.988621
81 | 38.931946,-77.106502
82 | 38.90248,-76.92515
83 | 38.918972,-77.071495
84 | 38.930385,-77.03959
85 | 38.929345,-77.056653
86 | 38.930892,-76.992335
87 | 38.925589,-77.044202
88 | 38.857391,-76.958568
89 | 38.929135,-77.019964
90 | 38.87344,-76.992401
91 | 38.838929,-77.0219
92 | 38.927824,-77.029118
93 | 38.883001,-76.94034
94 | 38.956242,-77.078104
95 | 38.860892,-76.993419
96 | 38.869939,-76.972432
97 | 38.974502,-77.020733
98 | 38.920329,-77.039613
99 | 38.872104,-76.970186
100 | 38.960796,-77.000789
101 | 38.922543,-77.102561
102 | 38.910906,-77.010031
103 | 38.849709,-76.9842
104 | 38.914689,-77.039419
105 | 38.928918,-77.037902
106 | 38.921263,-76.997534
107 | 38.912859,-77.025277
108 | 38.923367,-77.049161
109 | 38.910569,-77.028744
110 | 38.908749,-77.01634
111 | 38.966864,-77.020829
112 | 38.94164,-77.030424
113 | 38.916776,-77.03051
114 | 38.886919,-76.985745
115 | 38.932364,-77.030634
116 | 38.934471,-77.084305
117 | 38.882075,-77.022412
118 | 38.912813,-77.01553
119 | 38.915226,-77.026685
120 | 38.827425,-77.008389
121 | 38.929172,-76.972423
122 | 38.891268,-76.925797
123 | 38.924646,-76.99059
124 | 38.968968,-77.055342
125 | 38.925207,-77.102848
126 | 38.944474,-77.056286
127 | 38.898837,-76.983047
128 | 38.885531,-76.984412
129 | 38.87587,-76.965204
130 | 38.883832,-76.997361
131 | 38.833856,-76.99795
132 | 38.903168,-77.016452
133 | 38.93387,-77.037394
134 | 38.948993,-77.09976
135 | 38.90622,-77.07043
136 | 38.983378,-77.029954
137 | 38.888301,-76.999742
138 | 38.891676,-76.941061
139 | 38.893588,-76.981154
140 | 38.917513,-77.072033
141 | 38.932341,-76.979131
142 | 38.939952,-77.028917
143 | 38.945128,-77.016727
144 | 38.95169,-77.024296
145 | 38.929518,-77.060069
146 | 38.913221,-77.017982
147 | 38.936486,-77.068053
148 | 38.91355,-77.067488
149 | 38.905029,-77.011678
150 | 38.958927,-77.029959
151 | 38.842278,-76.986051
152 | 38.953066,-77.072046
153 | 38.955633,-76.998161
154 | 38.885983,-76.977936
155 | 38.928662,-77.022949
156 | 38.980572,-77.029239
157 | 38.897148,-76.992395
158 | 38.968397,-77.074348
159 | 38.907002,-76.941122
160 | 38.936715,-76.970934
161 | 38.941603,-76.976511
162 | 38.902301,-76.922726
163 | 38.883947,-76.983447
164 | 38.861129,-76.997192
165 | 38.874046,-77.011539
166 | 38.955204,-77.018935
167 | 38.886206,-76.936297
168 | 38.909965,-77.038268
169 | 38.95447,-77.083262
170 | 38.952482,-77.021892
171 | 38.888027,-77.000781
172 | 38.930497,-77.033913
173 | 38.941506,-77.018949
174 | 38.980954,-77.024163
175 | 38.900086,-76.939458
176 | 38.921344,-77.048025
177 | 38.900493,-77.018321
178 | 38.888853,-76.988634
179 | 38.91045,-77.015458
180 | 38.954028,-77.022373
181 | 38.951808,-77.090849
182 | 38.882752,-77.004064
183 | 38.897961,-76.997333
184 | 38.903559,-76.993221
185 | 38.920371,-77.042655
186 | 38.896764,-76.998661
187 | 38.863313,-76.989413
188 | 38.87492,-77.01159
189 | 38.931635,-77.066023
190 | 38.882348,-76.991819
191 | 38.943689,-77.009815
192 | 38.87351,-76.968042
193 | 38.833408,-77.007389
194 | 38.920851,-77.073338
195 | 38.950393,-77.033153
196 | 38.886216,-76.992408
197 | 38.885538,-76.942666
198 | 38.901133,-76.993063
199 | 38.912033,-77.011169
200 | 38.933307,-76.97988
201 | 38.948675,-77.018831
202 | 38.935688,-77.067285
203 | 38.920399,-77.014547
204 | 38.962607,-77.077438
205 | 38.913575,-77.039239
206 | 38.945442,-77.019768
207 | 38.906431,-76.9806
208 | 38.905476,-77.00005
209 | 38.923584,-77.099968
210 | 38.948053,-77.007096
211 | 38.971688,-77.028209
212 | 38.958061,-77.013406
213 | 38.873638,-76.962678
214 | 38.843038,-77.019541
215 | 38.917933,-77.009993
216 | 38.925082,-77.017308
217 | 38.897321,-76.941893
218 | 38.931537,-77.088115
219 | 38.931497,-76.966477
220 | 38.837364,-77.011409
221 | 38.984523,-77.032555
222 | 38.903871,-77.010345
223 | 38.965141,-77.063211
224 | 38.930069,-76.965304
225 | 38.891852,-77.005538
226 | 38.98798,-77.044239
227 | 38.892595,-76.996372
228 | 38.902078,-76.989093
229 | 38.964767,-77.021035
230 | 38.834783,-77.004059
231 | 38.893627,-76.923993
232 | 38.955897,-76.992291
233 | 38.92891,-76.99104
234 | 38.96098,-77.017786
235 | 38.930385,-77.039661
236 | 38.903246,-76.927256
237 | 38.829601,-77.023423
238 | 38.906193,-76.950338
239 | 38.967822,-77.05587
240 | 38.884449,-76.981989
241 | 38.96562,-77.060719
242 | 38.88073,-76.993533
243 | 38.92469,-76.978702
244 | 38.869303,-76.968034
245 | 38.934918,-76.965717
--------------------------------------------------------------------------------
/Chapter 7/B04662_07_01.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 7, Visualizing the Data’s Story
5 |
6 | message("Introduction to R for Business Intelligence
7 | Chapter 7 - Visualizing the Data's Story
8 | Copyright (2016) Packt Publishing \n
9 | Let's look at ways to visualize data")
10 |
11 | #
12 | # Visualizing Data
13 |
14 | #
15 | # Plotting with ggplot2
16 |
17 | plot_dat <- read.csv("./data/Ch7_marketing.csv")
18 | plot_dat$emp_size <- cut(plot_dat$employees, breaks = 3,
19 | labels = c("Employees: 3 - 6", "7 - 9", "10+"))
20 |
21 | if(!require("ggplot2")) install.packages("ggplot2")
22 | suppressMessages(suppressWarnings(library(ggplot2)))
23 | if(!require("scales")) install.packages("scales")
24 | suppressMessages(suppressWarnings(library(scales)))
25 | plot <- ggplot(data = plot_dat, aes(x = marketing_total,
26 | y = revenues))
27 |
28 | plot <- plot + facet_grid(. ~ emp_size) +
29 | geom_point(aes(color = pop_density), shape = 18, size = 4)
30 |
31 | plot + scale_y_continuous(labels = dollar,
32 | breaks = pretty_breaks(n = 5)) +
33 | scale_x_continuous(labels = dollar,
34 | breaks = pretty_breaks(n = 5)) +
35 | scale_color_discrete(guide = guide_legend(
36 | title = "Population\nDensity")) +
37 | xlab("Marketing Expenditures ($K)") + ylab("Revenues ($K)")
38 | rm(plot_dat, plot)
39 |
40 | #
41 | # Geo-mapping Using Leaflet
42 |
43 | # Learning geo-mapping
44 |
45 | stations <- read.csv("./data/Ch7_bike_station_locations.csv")
46 |
47 | if(!require("magrittr")) install.packages("magrittr")
48 | suppressMessages(suppressWarnings(library(magrittr)))
49 | if(!require("leaflet")) install.packages("leaflet")
50 | suppressMessages(suppressWarnings(library(leaflet)))
51 | leaflet() %>%
52 | addTiles() %>%
53 | addMarkers(data = stations, ~longitude, ~latitude)
54 |
55 | bike <- makeIcon("./data/bike.png", iconWidth = 20,
56 | iconHeight = 20)
57 | stations$popup <- paste0("Station Location #",
58 | seq(1, nrow(stations)))
59 | new_tile_url <- "http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png"
60 | new_tile_attribution_string <- '© OpenStreetMap© CartoDB'
61 |
62 | leaflet() %>%
63 | addTiles(urlTemplate = new_tile_url,
64 | attribution = new_tile_attribution_string,
65 | options = providerTileOptions(noWrap = TRUE)) %>%
66 | addMarkers(data = stations, lng = ~longitude, lat = ~latitude,
67 | popup = ~popup, icon = bike)
68 |
69 | rm(stations, bike, new_tile_url, new_tile_attribution_string)
70 |
71 | # Extending geo-mapping functionality
72 |
73 | short_path <- read.csv("./data/Ch7_optimal_maint_route.csv")
74 | head(short_path)
75 | nrow(short_path)
76 |
77 | leaflet() %>%
78 | addTiles() %>%
79 | addCircleMarkers(data = short_path, lat = ~latitude,
80 | lng = ~longitude, radius = 3,
81 | popup = ~popup) %>%
82 | addPolylines(data = short_path, lat = ~latitude,
83 | lng = ~longitude, color = "#A93E36",
84 | opacity = .7)
85 |
86 | rm(short_path)
87 |
88 | #
89 | # Creating Interactive Graphics Using rCharts
90 |
91 | # Learning interactive graphing with JavaScript
92 |
93 | dat <- read.csv("./data/Ch7_email_marketing_campaign.csv",
94 | check.names = FALSE)
95 | head(dat)
96 |
97 | if(!require("reshape2")) install.packages("reshape2")
98 | suppressMessages(suppressWarnings(library(reshape2)))
99 | dat2 <- melt(dat[, 2:6], id.vars = "Promotion",
100 | variable.name = "Event", value.name = "Outcome")
101 | head(dat2)
102 |
103 | dat2$Outcome <- ifelse(dat2$Outcome == "Y", 1, 0)
104 | aggregate <- aggregate(Outcome ~ Promotion + Event, FUN = sum,
105 | data = dat2)
106 | aggregate
107 |
108 | if(!require("devtools")) install.packages("devtools")
109 | suppressMessages(suppressWarnings(library(devtools)))
110 |
111 | install_github(repo = 'ramnathv/rCharts')
112 | suppressMessages(suppressWarnings(library(rCharts)))
113 | n1 <- nPlot(Outcome ~ Event, group = "Promotion",
114 | data = aggregate, type = "multiBarChart")
115 |
116 | n1$xAxis(axisLabel = "Event Type", staggerLabels = FALSE,
117 | rotateLabels = 0)
118 | n1$yAxis(axisLabel = "Conversions", width = 40,
119 | tickFormat = "#! d3.format('.0f') !#",
120 | showMaxMin = TRUE)
121 | n1$chart(color = c("#006CB8", "#ED1C24"))
122 | n1$params$width <- 700
123 | n1$params$height <- 400
124 | n1
125 |
126 | rm(n1, aggregate, dat, dat2)
127 |
128 | dat <- read.csv("./data/Ch7_email_marketing_conversions.csv",
129 | check.names = FALSE)
130 | head(dat)
131 |
132 | promotion1 <- dat[dat$Promotion == "10% off", 2:4]
133 | colnames(promotion1) <- c("source", "target", "value")
134 |
135 | sankeyPlot <- rCharts$new()
136 | sankeyPlot$setLib("http://timelyportfolio.github.io/rCharts_d3_sankey/libraries/widgets/d3_sankey")
137 | sankeyPlot$set(
138 | data = promotion1,
139 | nodeWidth = 25,
140 | nodePadding = 100,
141 | layout = 800,
142 | width = 700,
143 | height = 500
144 | )
145 |
146 | sankeyPlot$setTemplate(
147 | afterScript = "
148 |
179 | ")
180 |
181 | sankeyPlot
--------------------------------------------------------------------------------
/Chapter 3/data/Ch3_marketing.csv:
--------------------------------------------------------------------------------
1 | google_adwords,facebook,twitter,marketing_total,revenues,employees,pop_density
2 | 65.66,47.86,52.46,165.98,39.26,5,High
3 | 39.1,55.2,77.4,171.7,38.9,7,Medium
4 | 174.81,52.01,68.01,294.83,49.51,11,Medium
5 | 34.36,61.96,86.86,183.18,40.56,7,High
6 | 78.21,40.91,30.41,149.53,40.21,9,Low
7 | 34.19,15.09,12.79,62.07,38.09,3,High
8 | 225.71,15.91,33.31,274.93,44.21,10,Low
9 | 90.03,17.13,34.33,141.49,40.23,6,High
10 | 238.4,35.1,13.9,287.4,48.8,6,Medium
11 | 43.53,42.23,71.83,157.59,36.63,4,Low
12 | 118.24,15.74,14.14,148.12,38.14,7,Medium
13 | 224.64,40.84,52.74,318.22,47.24,9,High
14 | 219.51,59.21,63.21,341.93,54.21,10,High
15 | 89.79,45.99,122.19,257.97,42.19,6,Low
16 | 306.09,51.69,66.69,424.47,56.79,12,Medium
17 | 91.98,30.68,27.28,149.94,41.78,6,High
18 | 242.72,39.42,63.92,346.06,50.02,10,Medium
19 | 263.64,18.74,35.94,318.32,46.44,6,Low
20 | 35.16,25.26,57.76,118.18,35.26,5,Low
21 | 253.04,29.04,37.14,319.22,47.94,10,High
22 | 88.14,25.84,30.34,144.32,43.24,6,High
23 | 163.68,37.48,19.58,220.74,43.48,6,Low
24 | 263.96,27.96,32.96,324.88,47.46,9,Medium
25 | 268.98,34.68,29.28,332.94,46.78,9,Low
26 | 314.07,36.87,50.57,401.51,50.27,9,Low
27 | 134.9,26.8,46.8,208.5,41.6,8,High
28 | 284.99,26.79,5.89,317.67,44.49,10,Medium
29 | 117.68,10.78,15.58,144.04,39.18,3,Low
30 | 316.09,16.89,20.09,353.07,45.89,10,Medium
31 | 288.58,52.88,12.88,354.34,54.78,10,Low
32 | 97.37,59.47,54.57,211.41,45.07,10,Medium
33 | 66.6,37.6,44.8,149,41.3,7,High
34 | 250.75,47.85,40.95,339.55,51.95,12,Medium
35 | 223.1,30.3,38.4,291.8,44.9,6,High
36 | 202.09,45.89,49.99,297.97,49.89,9,Medium
37 | 317.58,39.08,11.98,368.64,52.38,9,High
38 | 231.76,20.66,37.46,289.88,45.46,8,High
39 | 45.16,33.16,49.56,127.88,36.26,6,Medium
40 | 199.47,34.27,42.07,275.81,46.97,8,Low
41 | 262.08,51.08,26.88,340.04,53.08,9,Low
42 | 224.85,15.55,45.85,286.25,44.15,9,Low
43 | 124.23,20.83,13.63,158.69,42.23,8,Medium
44 | 241.18,53.88,50.58,345.64,55.08,9,Low
45 | 205.77,56.77,68.07,330.61,52.07,10,Medium
46 | 285.71,39.21,25.11,350.03,50.91,10,Low
47 | 32.13,40.33,52.43,124.89,38.03,6,Low
48 | 155.66,26.06,22.26,203.98,40.36,9,High
49 | 233.44,59.64,46.54,339.62,54.14,10,Low
50 | 235.13,41.33,19.93,296.39,50.53,12,High
51 | 77.65,13.55,31.75,122.95,39.95,7,Medium
52 | 283.94,52.74,63.54,400.22,54.54,10,Medium
53 | 128.03,42.33,19.93,190.29,47.03,7,High
54 | 153.47,52.57,37.47,243.51,48.07,9,Low
55 | 90.01,17.71,8.11,115.83,38.01,4,Low
56 | 51.29,31.79,8.19,91.27,36.99,4,Medium
57 | 159.3,21.9,16.4,197.6,41.1,9,Medium
58 | 258.91,36.41,18.71,314.03,48.11,10,High
59 | 239.73,54.23,36.33,330.29,52.93,11,Low
60 | 133.73,25.63,41.83,201.19,44.03,8,Medium
61 | 48.95,42.55,27.65,119.15,38.65,3,Low
62 | 155.09,18.79,43.19,217.07,44.39,8,High
63 | 234.76,33.36,20.66,288.78,46.06,8,High
64 | 50.01,11.51,29.41,90.93,37.11,3,Low
65 | 142.13,37.53,22.03,201.69,43.53,10,High
66 | 29.26,41.16,19.46,89.88,36.86,6,High
67 | 137.11,16.21,30.41,183.73,39.81,3,Medium
68 | 262.45,14.15,45.75,322.35,42.65,7,Medium
69 | 99.96,32.36,43.36,175.68,43.66,7,Low
70 | 88.29,51.79,41.69,181.77,41.19,7,Low
71 | 238.93,55.83,45.43,340.19,54.83,11,Medium
72 | 214.87,27.47,73.57,315.91,44.57,6,Medium
73 | 101.48,40.08,27.38,168.94,44.88,7,High
74 | 132.43,49.73,71.13,253.29,45.43,8,High
75 | 109.94,34.54,81.24,225.72,42.24,6,Low
76 | 132.43,57.83,60.23,250.49,47.03,10,High
77 | 159.85,17.85,21.05,198.75,44.45,8,Medium
78 | 243.05,46.25,70.55,359.85,52.45,10,Medium
79 | 272.93,45.93,80.53,399.39,51.93,9,Medium
80 | 132.14,26.14,21.84,180.12,43.94,10,High
81 | 189.32,45.02,65.12,299.46,50.62,12,Medium
82 | 219.94,13.24,14.44,247.62,41.74,8,Low
83 | 313.99,53.99,61.69,429.67,57.39,12,Low
84 | 157.3,51.2,54.2,262.7,47,7,Low
85 | 243.98,13.28,57.58,314.84,40.98,7,Medium
86 | 321,48.3,111.7,481,56.1,12,High
87 | 300.92,18.22,28.32,347.46,43.22,9,Medium
88 | 262.48,45.98,15.78,324.24,52.68,9,High
89 | 158.05,53.95,65.35,277.35,47.05,8,High
90 | 46.02,19.42,36.92,102.36,35.92,6,Low
91 | 110.7,8,29.7,148.4,36.7,6,High
92 | 34.08,8.78,32.78,75.64,33.98,5,Low
93 | 275.11,34.01,11.41,320.53,47.21,7,Low
94 | 249.6,19.4,66.5,335.5,44.9,9,High
95 | 267.13,50.83,34.83,352.79,54.93,11,Low
96 | 200.45,27.55,13.35,241.35,46.55,6,Low
97 | 234.48,32.88,21.78,289.14,48.48,10,Low
98 | 100.69,56.69,43.19,200.57,44.79,10,High
99 | 97.27,44.57,61.07,202.91,42.47,8,High
100 | 164.18,26.68,36.78,227.64,44.88,8,High
101 | 99.93,11.73,24.53,136.19,40.63,8,High
102 | 43.28,27.28,32.38,102.94,38.18,5,Medium
103 | 163.07,35.97,54.17,253.21,44.97,10,Low
104 | 245.19,10.99,22.99,279.17,40.49,7,Low
105 | 149.35,48.25,24.85,222.45,49.15,10,Medium
106 | 253.23,43.43,84.13,380.79,51.13,10,Medium
107 | 107.99,19.99,32.89,160.87,39.09,5,Medium
108 | 28.01,46.51,57.01,131.53,34.51,6,Low
109 | 102.85,10.05,18.05,130.95,39.15,5,High
110 | 246.07,62.17,15.17,323.41,58.17,10,Low
111 | 83.09,22.89,52.79,158.77,40.89,10,Low
112 | 26.83,53.13,21.03,100.99,35.43,4,Medium
113 | 289.62,14.72,53.62,357.96,44.82,6,Low
114 | 30.2,36.4,10.1,76.7,35.2,3,Low
115 | 59.22,48.32,74.12,181.66,40.82,7,Low
116 | 68.64,54.74,15.04,138.42,39.64,6,Medium
117 | 44.99,45.79,14.89,105.67,36.59,4,High
118 | 298.01,40.61,70.21,408.83,52.81,12,High
119 | 63.02,33.32,26.72,123.06,37.32,7,High
120 | 207.32,53.72,10.32,271.36,50.82,12,Medium
121 | 97.18,28.18,22.88,148.24,42.38,8,Low
122 | 219.94,49.04,88.04,357.02,53.14,10,High
123 | 243.27,43.37,46.87,333.51,50.57,12,Medium
124 | 127.29,15.79,43.29,186.37,40.79,6,Medium
125 | 116.71,22.71,45.61,185.03,39.61,6,Medium
126 | 164.88,13.88,19.78,198.54,42.58,6,Low
127 | 262.58,17.18,17.38,297.14,43.38,8,Medium
128 | 266.08,59.28,53.38,378.74,55.98,12,High
129 | 65.45,33.95,27.55,126.95,38.55,3,High
130 | 301.6,22.2,44.1,367.9,44.7,6,High
131 | 144.47,19.27,58.37,222.11,42.77,6,High
132 | 194.62,50.42,47.22,292.26,50.02,10,Medium
133 | 207.64,28.34,15.54,251.52,43.14,6,Low
134 | 23.65,18.55,11.45,53.65,30.45,3,Low
135 | 117.7,54.7,60.5,232.9,46.8,10,Low
136 | 175.6,14.5,36.3,226.4,43.6,7,High
137 | 35.19,47.79,54.89,137.87,38.49,5,Medium
138 | 154.93,29.03,44.03,227.99,43.83,7,Low
139 | 195.48,28.48,39.88,263.84,45.08,10,Low
140 | 111.9,49.4,61.7,223,47.2,7,High
141 | 186.35,47.05,16.45,249.85,48.55,8,Low
142 | 141.28,26.18,15.68,183.14,43.68,7,Low
143 | 258.01,14.31,94.51,366.83,43.11,9,Low
144 | 38.87,45.97,28.77,113.61,36.67,4,Medium
145 | 227.91,13.71,26.71,268.33,41.01,10,Low
146 | 239.81,35.41,68.21,343.43,49.21,10,Low
147 | 306.77,20.47,15.07,342.31,45.17,10,Medium
148 | 185.03,28.83,54.13,267.99,42.73,7,Low
149 | 44.13,32.03,27.73,103.89,39.83,4,Medium
150 | 188.43,14.53,19.03,221.99,39.43,7,Low
151 | 247.75,16.15,24.65,288.55,44.55,7,Low
152 | 300.5,59.9,51.6,412,58.3,9,High
153 | 193.4,18.4,44.6,256.4,42.6,9,Low
154 | 298.3,11.3,31.5,341.1,41.1,10,High
155 | 188.07,19.87,26.27,234.21,42.77,6,High
156 | 179.4,12.8,17.3,209.5,41,9,Low
157 | 239.07,13.37,34.17,286.61,40.47,10,Medium
158 | 79.21,16.11,38.91,134.23,39.41,4,Low
159 | 307.43,50.23,77.83,435.49,53.73,11,Low
160 | 275.04,29.94,37.44,342.42,46.54,9,Low
161 | 225.79,53.29,26.59,305.67,51.09,10,Medium
162 | 160.79,10.79,34.09,205.67,39.29,4,Medium
163 | 216.67,41.67,29.97,288.31,50.57,12,Medium
164 | 308.42,23.72,12.32,344.46,46.02,9,Low
165 | 43.46,24.26,34.36,102.08,39.16,6,Medium
166 | 64.96,53.96,17.46,136.38,43.96,9,High
167 | 97.69,20.39,14.39,132.47,39.79,7,High
168 | 36.95,11.25,37.55,85.75,33.35,7,Low
169 | 188.45,51.05,11.45,250.95,48.95,9,Low
170 | 174.07,47.37,16.57,238.01,49.37,12,High
171 | 59.86,12.76,21.66,94.28,36.96,4,Low
172 | 117.91,16.01,18.01,151.93,41.11,7,Low
173 | 308.78,54.58,77.58,440.94,58.38,10,Medium
--------------------------------------------------------------------------------
/Chapter 7/data/Ch7_marketing.csv:
--------------------------------------------------------------------------------
1 | google_adwords,facebook,twitter,marketing_total,revenues,employees,pop_density
2 | 65.66,47.86,52.46,165.98,39.26,5,High
3 | 39.1,55.2,77.4,171.7,38.9,7,Medium
4 | 174.81,52.01,68.01,294.83,49.51,11,Medium
5 | 34.36,61.96,86.86,183.18,40.56,7,High
6 | 78.21,40.91,30.41,149.53,40.21,9,Low
7 | 34.19,15.09,12.79,62.07,38.09,3,High
8 | 225.71,15.91,33.31,274.93,44.21,10,Low
9 | 90.03,17.13,34.33,141.49,40.23,6,High
10 | 238.4,35.1,13.9,287.4,48.8,6,Medium
11 | 43.53,42.23,71.83,157.59,36.63,4,Low
12 | 118.24,15.74,14.14,148.12,38.14,7,Medium
13 | 224.64,40.84,52.74,318.22,47.24,9,High
14 | 219.51,59.21,63.21,341.93,54.21,10,High
15 | 89.79,45.99,122.19,257.97,42.19,6,Low
16 | 306.09,51.69,66.69,424.47,56.79,12,Medium
17 | 91.98,30.68,27.28,149.94,41.78,6,High
18 | 242.72,39.42,63.92,346.06,50.02,10,Medium
19 | 263.64,18.74,35.94,318.32,46.44,6,Low
20 | 35.16,25.26,57.76,118.18,35.26,5,Low
21 | 253.04,29.04,37.14,319.22,47.94,10,High
22 | 88.14,25.84,30.34,144.32,43.24,6,High
23 | 163.68,37.48,19.58,220.74,43.48,6,Low
24 | 263.96,27.96,32.96,324.88,47.46,9,Medium
25 | 268.98,34.68,29.28,332.94,46.78,9,Low
26 | 314.07,36.87,50.57,401.51,50.27,9,Low
27 | 134.9,26.8,46.8,208.5,41.6,8,High
28 | 284.99,26.79,5.89,317.67,44.49,10,Medium
29 | 117.68,10.78,15.58,144.04,39.18,3,Low
30 | 316.09,16.89,20.09,353.07,45.89,10,Medium
31 | 288.58,52.88,12.88,354.34,54.78,10,Low
32 | 97.37,59.47,54.57,211.41,45.07,10,Medium
33 | 66.6,37.6,44.8,149,41.3,7,High
34 | 250.75,47.85,40.95,339.55,51.95,12,Medium
35 | 223.1,30.3,38.4,291.8,44.9,6,High
36 | 202.09,45.89,49.99,297.97,49.89,9,Medium
37 | 317.58,39.08,11.98,368.64,52.38,9,High
38 | 231.76,20.66,37.46,289.88,45.46,8,High
39 | 45.16,33.16,49.56,127.88,36.26,6,Medium
40 | 199.47,34.27,42.07,275.81,46.97,8,Low
41 | 262.08,51.08,26.88,340.04,53.08,9,Low
42 | 224.85,15.55,45.85,286.25,44.15,9,Low
43 | 124.23,20.83,13.63,158.69,42.23,8,Medium
44 | 241.18,53.88,50.58,345.64,55.08,9,Low
45 | 205.77,56.77,68.07,330.61,52.07,10,Medium
46 | 285.71,39.21,25.11,350.03,50.91,10,Low
47 | 32.13,40.33,52.43,124.89,38.03,6,Low
48 | 155.66,26.06,22.26,203.98,40.36,9,High
49 | 233.44,59.64,46.54,339.62,54.14,10,Low
50 | 235.13,41.33,19.93,296.39,50.53,12,High
51 | 77.65,13.55,31.75,122.95,39.95,7,Medium
52 | 283.94,52.74,63.54,400.22,54.54,10,Medium
53 | 128.03,42.33,19.93,190.29,47.03,7,High
54 | 153.47,52.57,37.47,243.51,48.07,9,Low
55 | 90.01,17.71,8.11,115.83,38.01,4,Low
56 | 51.29,31.79,8.19,91.27,36.99,4,Medium
57 | 159.3,21.9,16.4,197.6,41.1,9,Medium
58 | 258.91,36.41,18.71,314.03,48.11,10,High
59 | 239.73,54.23,36.33,330.29,52.93,11,Low
60 | 133.73,25.63,41.83,201.19,44.03,8,Medium
61 | 48.95,42.55,27.65,119.15,38.65,3,Low
62 | 155.09,18.79,43.19,217.07,44.39,8,High
63 | 234.76,33.36,20.66,288.78,46.06,8,High
64 | 50.01,11.51,29.41,90.93,37.11,3,Low
65 | 142.13,37.53,22.03,201.69,43.53,10,High
66 | 29.26,41.16,19.46,89.88,36.86,6,High
67 | 137.11,16.21,30.41,183.73,39.81,3,Medium
68 | 262.45,14.15,45.75,322.35,42.65,7,Medium
69 | 99.96,32.36,43.36,175.68,43.66,7,Low
70 | 88.29,51.79,41.69,181.77,41.19,7,Low
71 | 238.93,55.83,45.43,340.19,54.83,11,Medium
72 | 214.87,27.47,73.57,315.91,44.57,6,Medium
73 | 101.48,40.08,27.38,168.94,44.88,7,High
74 | 132.43,49.73,71.13,253.29,45.43,8,High
75 | 109.94,34.54,81.24,225.72,42.24,6,Low
76 | 132.43,57.83,60.23,250.49,47.03,10,High
77 | 159.85,17.85,21.05,198.75,44.45,8,Medium
78 | 243.05,46.25,70.55,359.85,52.45,10,Medium
79 | 272.93,45.93,80.53,399.39,51.93,9,Medium
80 | 132.14,26.14,21.84,180.12,43.94,10,High
81 | 189.32,45.02,65.12,299.46,50.62,12,Medium
82 | 219.94,13.24,14.44,247.62,41.74,8,Low
83 | 313.99,53.99,61.69,429.67,57.39,12,Low
84 | 157.3,51.2,54.2,262.7,47,7,Low
85 | 243.98,13.28,57.58,314.84,40.98,7,Medium
86 | 321,48.3,111.7,481,56.1,12,High
87 | 300.92,18.22,28.32,347.46,43.22,9,Medium
88 | 262.48,45.98,15.78,324.24,52.68,9,High
89 | 158.05,53.95,65.35,277.35,47.05,8,High
90 | 46.02,19.42,36.92,102.36,35.92,6,Low
91 | 110.7,8,29.7,148.4,36.7,6,High
92 | 34.08,8.78,32.78,75.64,33.98,5,Low
93 | 275.11,34.01,11.41,320.53,47.21,7,Low
94 | 249.6,19.4,66.5,335.5,44.9,9,High
95 | 267.13,50.83,34.83,352.79,54.93,11,Low
96 | 200.45,27.55,13.35,241.35,46.55,6,Low
97 | 234.48,32.88,21.78,289.14,48.48,10,Low
98 | 100.69,56.69,43.19,200.57,44.79,10,High
99 | 97.27,44.57,61.07,202.91,42.47,8,High
100 | 164.18,26.68,36.78,227.64,44.88,8,High
101 | 99.93,11.73,24.53,136.19,40.63,8,High
102 | 43.28,27.28,32.38,102.94,38.18,5,Medium
103 | 163.07,35.97,54.17,253.21,44.97,10,Low
104 | 245.19,10.99,22.99,279.17,40.49,7,Low
105 | 149.35,48.25,24.85,222.45,49.15,10,Medium
106 | 253.23,43.43,84.13,380.79,51.13,10,Medium
107 | 107.99,19.99,32.89,160.87,39.09,5,Medium
108 | 28.01,46.51,57.01,131.53,34.51,6,Low
109 | 102.85,10.05,18.05,130.95,39.15,5,High
110 | 246.07,62.17,15.17,323.41,58.17,10,Low
111 | 83.09,22.89,52.79,158.77,40.89,10,Low
112 | 26.83,53.13,21.03,100.99,35.43,4,Medium
113 | 289.62,14.72,53.62,357.96,44.82,6,Low
114 | 30.2,36.4,10.1,76.7,35.2,3,Low
115 | 59.22,48.32,74.12,181.66,40.82,7,Low
116 | 68.64,54.74,15.04,138.42,39.64,6,Medium
117 | 44.99,45.79,14.89,105.67,36.59,4,High
118 | 298.01,40.61,70.21,408.83,52.81,12,High
119 | 63.02,33.32,26.72,123.06,37.32,7,High
120 | 207.32,53.72,10.32,271.36,50.82,12,Medium
121 | 97.18,28.18,22.88,148.24,42.38,8,Low
122 | 219.94,49.04,88.04,357.02,53.14,10,High
123 | 243.27,43.37,46.87,333.51,50.57,12,Medium
124 | 127.29,15.79,43.29,186.37,40.79,6,Medium
125 | 116.71,22.71,45.61,185.03,39.61,6,Medium
126 | 164.88,13.88,19.78,198.54,42.58,6,Low
127 | 262.58,17.18,17.38,297.14,43.38,8,Medium
128 | 266.08,59.28,53.38,378.74,55.98,12,High
129 | 65.45,33.95,27.55,126.95,38.55,3,High
130 | 301.6,22.2,44.1,367.9,44.7,6,High
131 | 144.47,19.27,58.37,222.11,42.77,6,High
132 | 194.62,50.42,47.22,292.26,50.02,10,Medium
133 | 207.64,28.34,15.54,251.52,43.14,6,Low
134 | 23.65,18.55,11.45,53.65,30.45,3,Low
135 | 117.7,54.7,60.5,232.9,46.8,10,Low
136 | 175.6,14.5,36.3,226.4,43.6,7,High
137 | 35.19,47.79,54.89,137.87,38.49,5,Medium
138 | 154.93,29.03,44.03,227.99,43.83,7,Low
139 | 195.48,28.48,39.88,263.84,45.08,10,Low
140 | 111.9,49.4,61.7,223,47.2,7,High
141 | 186.35,47.05,16.45,249.85,48.55,8,Low
142 | 141.28,26.18,15.68,183.14,43.68,7,Low
143 | 258.01,14.31,94.51,366.83,43.11,9,Low
144 | 38.87,45.97,28.77,113.61,36.67,4,Medium
145 | 227.91,13.71,26.71,268.33,41.01,10,Low
146 | 239.81,35.41,68.21,343.43,49.21,10,Low
147 | 306.77,20.47,15.07,342.31,45.17,10,Medium
148 | 185.03,28.83,54.13,267.99,42.73,7,Low
149 | 44.13,32.03,27.73,103.89,39.83,4,Medium
150 | 188.43,14.53,19.03,221.99,39.43,7,Low
151 | 247.75,16.15,24.65,288.55,44.55,7,Low
152 | 300.5,59.9,51.6,412,58.3,9,High
153 | 193.4,18.4,44.6,256.4,42.6,9,Low
154 | 298.3,11.3,31.5,341.1,41.1,10,High
155 | 188.07,19.87,26.27,234.21,42.77,6,High
156 | 179.4,12.8,17.3,209.5,41,9,Low
157 | 239.07,13.37,34.17,286.61,40.47,10,Medium
158 | 79.21,16.11,38.91,134.23,39.41,4,Low
159 | 307.43,50.23,77.83,435.49,53.73,11,Low
160 | 275.04,29.94,37.44,342.42,46.54,9,Low
161 | 225.79,53.29,26.59,305.67,51.09,10,Medium
162 | 160.79,10.79,34.09,205.67,39.29,4,Medium
163 | 216.67,41.67,29.97,288.31,50.57,12,Medium
164 | 308.42,23.72,12.32,344.46,46.02,9,Low
165 | 43.46,24.26,34.36,102.08,39.16,6,Medium
166 | 64.96,53.96,17.46,136.38,43.96,9,High
167 | 97.69,20.39,14.39,132.47,39.79,7,High
168 | 36.95,11.25,37.55,85.75,33.35,7,Low
169 | 188.45,51.05,11.45,250.95,48.95,9,Low
170 | 174.07,47.37,16.57,238.01,49.37,12,High
171 | 59.86,12.76,21.66,94.28,36.96,4,Low
172 | 117.91,16.01,18.01,151.93,41.11,7,Low
173 | 308.78,54.58,77.58,440.94,58.38,10,Medium
--------------------------------------------------------------------------------
/Chapter 7/data/Ch7_optimal_maint_route.csv:
--------------------------------------------------------------------------------
1 | "latitude","longitude","popup"
2 | 38.949498,-77.09362,"Station Location #5"
3 | 38.948993,-77.09976,"Station Location #133"
4 | 38.934471,-77.084305,"Station Location #115"
5 | 38.931537,-77.088115,"Station Location #217"
6 | 38.931946,-77.106502,"Station Location #80"
7 | 38.925207,-77.102848,"Station Location #124"
8 | 38.922543,-77.102561,"Station Location #100"
9 | 38.923584,-77.099968,"Station Location #208"
10 | 38.91996,-77.097714,"Station Location #36"
11 | 38.917885,-77.096921,"Station Location #62"
12 | 38.927799,-77.084738,"Station Location #6"
13 | 38.920851,-77.073338,"Station Location #193"
14 | 38.918425,-77.074441,"Station Location #11"
15 | 38.918972,-77.071495,"Station Location #82"
16 | 38.917513,-77.072033,"Station Location #139"
17 | 38.91355,-77.067488,"Station Location #147"
18 | 38.909844,-77.063495,"Station Location #19"
19 | 38.90622,-77.07043,"Station Location #134"
20 | 38.906434,-77.065048,"Station Location #50"
21 | 38.906955,-77.06345,"Station Location #63"
22 | 38.882075,-77.022412,"Station Location #116"
23 | 38.87492,-77.01159,"Station Location #187"
24 | 38.874046,-77.011539,"Station Location #164"
25 | 38.870938,-77.016675,"Station Location #66"
26 | 38.843038,-77.019541,"Station Location #213"
27 | 38.838929,-77.0219,"Station Location #90"
28 | 38.829601,-77.023423,"Station Location #236"
29 | 38.835598,-77.016727,"Station Location #67"
30 | 38.837364,-77.011409,"Station Location #219"
31 | 38.833408,-77.007389,"Station Location #192"
32 | 38.827425,-77.008389,"Station Location #119"
33 | 38.834783,-77.004059,"Station Location #229"
34 | 38.833856,-76.99795,"Station Location #130"
35 | 38.833648,-76.996361,"Station Location #54"
36 | 38.830615,-76.991721,"Station Location #65"
37 | 38.837071,-76.990945,"Station Location #58"
38 | 38.842278,-76.986051,"Station Location #150"
39 | 38.849709,-76.9842,"Station Location #102"
40 | 38.858684,-76.986088,"Station Location #53"
41 | 38.860892,-76.993419,"Station Location #94"
42 | 38.861129,-76.997192,"Station Location #163"
43 | 38.863313,-76.989413,"Station Location #186"
44 | 38.866297,-76.988457,"Station Location #51"
45 | 38.863403,-76.98242,"Station Location #8"
46 | 38.845999,-76.972549,"Station Location #41"
47 | 38.855555,-76.962725,"Station Location #21"
48 | 38.857391,-76.958568,"Station Location #87"
49 | 38.869303,-76.968034,"Station Location #243"
50 | 38.869939,-76.972432,"Station Location #95"
51 | 38.872104,-76.970186,"Station Location #98"
52 | 38.87351,-76.968042,"Station Location #191"
53 | 38.87587,-76.965204,"Station Location #128"
54 | 38.873638,-76.962678,"Station Location #212"
55 | 38.871136,-76.952488,"Station Location #20"
56 | 38.868376,-76.942321,"Station Location #12"
57 | 38.881183,-76.942278,"Station Location #38"
58 | 38.883001,-76.94034,"Station Location #92"
59 | 38.885538,-76.942666,"Station Location #196"
60 | 38.885501,-76.94327,"Station Location #31"
61 | 38.89207,-76.948542,"Station Location #57"
62 | 38.891676,-76.941061,"Station Location #137"
63 | 38.889225,-76.932455,"Station Location #45"
64 | 38.886206,-76.936297,"Station Location #166"
65 | 38.88017,-76.931564,"Station Location #14"
66 | 38.885703,-76.919518,"Station Location #9"
67 | 38.888698,-76.91947,"Station Location #7"
68 | 38.891268,-76.925797,"Station Location #121"
69 | 38.893627,-76.923993,"Station Location #230"
70 | 38.902301,-76.922726,"Station Location #161"
71 | 38.90248,-76.92515,"Station Location #81"
72 | 38.903246,-76.927256,"Station Location #235"
73 | 38.902925,-76.929915,"Station Location #4"
74 | 38.903461,-76.934427,"Station Location #13"
75 | 38.900086,-76.939458,"Station Location #174"
76 | 38.897321,-76.941893,"Station Location #216"
77 | 38.902678,-76.943012,"Station Location #56"
78 | 38.907002,-76.941122,"Station Location #158"
79 | 38.906193,-76.950338,"Station Location #237"
80 | 38.919268,-76.954753,"Station Location #10"
81 | 38.921747,-76.955459,"Station Location #24"
82 | 38.906435,-76.978719,"Station Location #47"
83 | 38.906431,-76.9806,"Station Location #206"
84 | 38.904986,-76.985906,"Station Location #60"
85 | 38.902078,-76.989093,"Station Location #227"
86 | 38.90149,-76.988621,"Station Location #79"
87 | 38.898837,-76.983047,"Station Location #126"
88 | 38.896423,-76.974288,"Station Location #55"
89 | 38.896277,-76.973281,"Station Location #75"
90 | 38.893588,-76.981154,"Station Location #138"
91 | 38.885983,-76.977936,"Station Location #153"
92 | 38.884449,-76.981989,"Station Location #239"
93 | 38.883947,-76.983447,"Station Location #162"
94 | 38.885531,-76.984412,"Station Location #127"
95 | 38.886919,-76.985745,"Station Location #113"
96 | 38.886669,-76.986616,"Station Location #49"
97 | 38.888853,-76.988634,"Station Location #177"
98 | 38.886216,-76.992408,"Station Location #195"
99 | 38.882348,-76.991819,"Station Location #189"
100 | 38.88073,-76.993533,"Station Location #241"
101 | 38.87344,-76.992401,"Station Location #89"
102 | 38.883832,-76.997361,"Station Location #129"
103 | 38.882752,-77.004064,"Station Location #181"
104 | 38.884181,-77.004803,"Station Location #30"
105 | 38.888027,-77.000781,"Station Location #170"
106 | 38.888301,-76.999742,"Station Location #136"
107 | 38.891852,-77.005538,"Station Location #224"
108 | 38.892595,-76.996372,"Station Location #226"
109 | 38.892934,-76.992413,"Station Location #32"
110 | 38.896764,-76.998661,"Station Location #185"
111 | 38.897961,-76.997333,"Station Location #182"
112 | 38.897148,-76.992395,"Station Location #156"
113 | 38.901133,-76.993063,"Station Location #197"
114 | 38.903559,-76.993221,"Station Location #183"
115 | 38.905476,-77.00005,"Station Location #207"
116 | 38.905218,-77.001496,"Station Location #2"
117 | 38.903871,-77.010345,"Station Location #221"
118 | 38.905029,-77.011678,"Station Location #148"
119 | 38.900493,-77.018321,"Station Location #176"
120 | 38.903168,-77.016452,"Station Location #131"
121 | 38.908749,-77.01634,"Station Location #109"
122 | 38.91045,-77.015458,"Station Location #178"
123 | 38.912813,-77.01553,"Station Location #117"
124 | 38.913221,-77.017982,"Station Location #145"
125 | 38.912859,-77.025277,"Station Location #106"
126 | 38.915226,-77.026685,"Station Location #118"
127 | 38.916776,-77.03051,"Station Location #112"
128 | 38.910569,-77.028744,"Station Location #108"
129 | 38.907379,-77.027693,"Station Location #73"
130 | 38.907719,-77.029879,"Station Location #23"
131 | 38.909965,-77.038268,"Station Location #167"
132 | 38.913575,-77.039239,"Station Location #204"
133 | 38.914689,-77.039419,"Station Location #103"
134 | 38.916089,-77.037732,"Station Location #16"
135 | 38.913814,-77.04852,"Station Location #17"
136 | 38.910956,-77.049479,"Station Location #43"
137 | 38.913915,-77.052149,"Station Location #25"
138 | 38.916704,-77.055444,"Station Location #61"
139 | 38.921344,-77.048025,"Station Location #175"
140 | 38.920371,-77.042655,"Station Location #184"
141 | 38.920329,-77.039613,"Station Location #97"
142 | 38.925589,-77.044202,"Station Location #86"
143 | 38.923367,-77.049161,"Station Location #107"
144 | 38.929345,-77.056653,"Station Location #84"
145 | 38.929518,-77.060069,"Station Location #144"
146 | 38.931635,-77.066023,"Station Location #188"
147 | 38.935688,-77.067285,"Station Location #201"
148 | 38.936486,-77.068053,"Station Location #146"
149 | 38.944474,-77.056286,"Station Location #125"
150 | 38.934762,-77.042165,"Station Location #34"
151 | 38.93211,-77.044458,"Station Location #48"
152 | 38.930385,-77.039661,"Station Location #234"
153 | 38.930385,-77.03959,"Station Location #83"
154 | 38.928918,-77.037902,"Station Location #104"
155 | 38.930497,-77.033913,"Station Location #171"
156 | 38.93387,-77.037394,"Station Location #132"
157 | 38.939952,-77.028917,"Station Location #141"
158 | 38.94164,-77.030424,"Station Location #111"
159 | 38.945373,-77.026788,"Station Location #42"
160 | 38.950393,-77.033153,"Station Location #194"
161 | 38.948451,-77.027837,"Station Location #64"
162 | 38.948675,-77.018831,"Station Location #200"
163 | 38.945442,-77.019768,"Station Location #205"
164 | 38.945128,-77.016727,"Station Location #142"
165 | 38.948053,-77.007096,"Station Location #209"
166 | 38.943689,-77.009815,"Station Location #190"
167 | 38.94197,-77.01687,"Station Location #70"
168 | 38.941506,-77.018949,"Station Location #172"
169 | 38.932086,-77.02481,"Station Location #28"
170 | 38.932364,-77.030634,"Station Location #114"
171 | 38.927824,-77.029118,"Station Location #91"
172 | 38.928662,-77.022949,"Station Location #154"
173 | 38.929305,-77.021286,"Station Location #44"
174 | 38.929135,-77.019964,"Station Location #88"
175 | 38.925082,-77.017308,"Station Location #215"
176 | 38.921942,-77.017931,"Station Location #15"
177 | 38.920399,-77.014547,"Station Location #202"
178 | 38.917247,-77.017682,"Station Location #78"
179 | 38.91529,-77.017438,"Station Location #39"
180 | 38.914653,-77.01283,"Station Location #46"
181 | 38.912033,-77.011169,"Station Location #198"
182 | 38.910906,-77.010031,"Station Location #101"
183 | 38.917933,-77.009993,"Station Location #214"
184 | 38.918765,-77.001814,"Station Location #33"
185 | 38.916857,-76.999135,"Station Location #77"
186 | 38.921263,-76.997534,"Station Location #105"
187 | 38.922168,-77.002985,"Station Location #72"
188 | 38.928912,-76.999274,"Station Location #76"
189 | 38.930892,-76.992335,"Station Location #85"
190 | 38.92891,-76.99104,"Station Location #232"
191 | 38.924646,-76.99059,"Station Location #122"
192 | 38.92469,-76.978702,"Station Location #242"
193 | 38.934249,-76.981012,"Station Location #26"
194 | 38.933307,-76.97988,"Station Location #199"
195 | 38.932341,-76.979131,"Station Location #140"
196 | 38.929172,-76.972423,"Station Location #120"
197 | 38.930069,-76.965304,"Station Location #223"
198 | 38.931497,-76.966477,"Station Location #218"
199 | 38.934918,-76.965717,"Station Location #244"
200 | 38.934875,-76.967353,"Station Location #71"
201 | 38.936715,-76.970934,"Station Location #159"
202 | 38.939416,-76.976961,"Station Location #69"
203 | 38.941603,-76.976511,"Station Location #160"
204 | 38.95008,-76.988523,"Station Location #35"
205 | 38.955897,-76.992291,"Station Location #231"
206 | 38.95659,-76.993437,"Station Location #1"
207 | 38.955633,-76.998161,"Station Location #152"
208 | 38.960796,-77.000789,"Station Location #99"
209 | 38.962518,-77.00209,"Station Location #40"
210 | 38.96785,-77.008818,"Station Location #29"
211 | 38.968379,-77.010484,"Station Location #52"
212 | 38.96098,-77.017786,"Station Location #233"
213 | 38.958061,-77.013406,"Station Location #211"
214 | 38.956787,-77.008228,"Station Location #18"
215 | 38.955217,-77.018456,"Station Location #22"
216 | 38.955204,-77.018935,"Station Location #165"
217 | 38.952482,-77.021892,"Station Location #169"
218 | 38.95169,-77.024296,"Station Location #143"
219 | 38.954028,-77.022373,"Station Location #179"
220 | 38.958927,-77.029959,"Station Location #149"
221 | 38.960559,-77.022671,"Station Location #74"
222 | 38.963521,-77.019691,"Station Location #37"
223 | 38.964767,-77.021035,"Station Location #228"
224 | 38.966864,-77.020829,"Station Location #110"
225 | 38.967111,-77.021462,"Station Location #59"
226 | 38.971688,-77.028209,"Station Location #210"
227 | 38.974502,-77.020733,"Station Location #96"
228 | 38.980954,-77.024163,"Station Location #173"
229 | 38.980572,-77.029239,"Station Location #155"
230 | 38.983378,-77.029954,"Station Location #135"
231 | 38.984523,-77.032555,"Station Location #220"
232 | 38.985747,-77.031797,"Station Location #68"
233 | 38.98798,-77.044239,"Station Location #225"
234 | 38.980858,-77.054722,"Station Location #3"
235 | 38.976661,-77.055576,"Station Location #27"
236 | 38.968968,-77.055342,"Station Location #123"
237 | 38.967822,-77.05587,"Station Location #238"
238 | 38.96562,-77.060719,"Station Location #240"
239 | 38.965141,-77.063211,"Station Location #222"
240 | 38.968397,-77.074348,"Station Location #157"
241 | 38.962607,-77.077438,"Station Location #203"
242 | 38.953066,-77.072046,"Station Location #151"
243 | 38.956242,-77.078104,"Station Location #93"
244 | 38.95447,-77.083262,"Station Location #168"
--------------------------------------------------------------------------------
/Chapter 8/B04662_08_02/B04662_08_02server.R:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Packt Publishing
2 |
3 | # Introduction to R for Business Intelligence
4 | # Chapter 8, server.R file - Marketing Campaign Creator App
5 |
6 | # prior to the shiny server session block
7 | # any variables declared here will be shared
8 | # between all Shiny app users
9 | market <- read.csv("./data/Ch8_global_market_data.csv",
10 | check.names = FALSE)
11 |
12 | shinyServer(function(input, output, session) {
13 |
14 | clustered_dataset <- reactive({
15 |
16 | # append the cluster_id to a result dataframe
17 | # remember to leave the market data.frame alone
18 | # since it is shared between other Shiny user sessions
19 | result_dat <- market
20 |
21 | # rebuild the model with the user specified cluster count
22 | # because this code is inside a "reactive" function
23 | # it will always re-execute whenever the user
24 | # changes input$cluster_count or input$cluster_method
25 | if (input$cluster_method == "K-means") {
26 | kmeans_model <- kmeans(x = market[, c("age_scale", "inc_scale")],
27 | centers = input$cluster_count)
28 | result_dat$cluster_id <- as.factor(kmeans_model$cluster)
29 | } else {
30 | hierarchical_model <- hclust(dist(market[, c("age_scale", "inc_scale")]),
31 | method = "ward.D2")
32 | result_dat$cluster_id <- as.factor(cutree(hierarchical_model,
33 | input$cluster_count))
34 | }
35 |
36 | return(result_dat)
37 | })
38 |
39 | # create the cluster summary dataset
40 | cluster_summary_dataset <- reactive({
41 | # this will always re-evaluate whenver
42 | # clustered_dataset changes. This is
43 | # how reactive changes "bubble" through
44 | # the application
45 | summary <- clustered_dataset() %>%
46 | group_by(cluster_id) %>%
47 | summarise(min_age = min(age), median_age = median(age),
48 | max_age = max(age), median_inc = median(income),
49 | min_inc = min(income), max_inc = max(income)) %>%
50 | arrange(median_inc) %>%
51 | select("Median Age" = median_age, "Median Income" = median_inc,
52 | "Cluster Id" = cluster_id,
53 | "Min. Age" = min_age, "Max. Age" = max_age,
54 | "Min. Income" = min_inc, "Max. Income" = max_inc
55 | )
56 | return(summary)
57 | })
58 |
59 | # create all aspects of the table of data
60 | # it is recommended to use DT:: notation
61 | # so shiny is not confused with shiny::renderDataTable
62 | output$campaign_summary_table <- DT::renderDataTable({
63 |
64 | # create a datatable with a specific
65 | # set of configuration options
66 | d <- DT::datatable(cluster_summary_dataset(),
67 | options = list(
68 | deferRender = FALSE,
69 | # center all of the columns using the dt-center class
70 | # defined in our app-styling.css file
71 | columnDefs = list(list(className = "dt-center",
72 | targets = "_all")),
73 | autoWidth = FALSE,
74 | lengthChange = FALSE,
75 | searching = FALSE,
76 | paginate = FALSE,
77 | info = FALSE,
78 | ordering = FALSE
79 | ),
80 | filter = "none",
81 | selection = "none",
82 | class = "cell-border stripe",
83 | rownames = FALSE,
84 | escape = FALSE)
85 |
86 | # add formats to the columns for ease of interpretation
87 | d <- d %>%
88 | formatRound("Median Age", digits = 0) %>%
89 | formatCurrency(c("Median Income", "Min. Income", "Max. Income")) %>%
90 | formatStyle("Median Income", fontWeight = "bold",
91 | background = styleColorBar(data = c(0, 125000),
92 | color = "#d5fdd5"),
93 | backgroundSize = "100% 70%",
94 | backgroundRepeat = "no-repeat",
95 | backgroundPosition = "center")
96 | # return the datatable object to be rendered
97 | return(d)
98 | })
99 |
100 | # create a visual representation of the clusters
101 | output$cluster_viz <- renderPlot({
102 |
103 | # calculate cluster centers so we can
104 | # show a label at each center to denote
105 | # each cluster
106 | centers <- clustered_dataset() %>%
107 | group_by(cluster_id) %>%
108 | summarize(median_age = median(age),
109 | median_income = median(income)) %>%
110 | ungroup() %>%
111 | mutate(cluster_id = as.numeric(as.character(cluster_id)),
112 | label = paste("Cluster", cluster_id, "\nMedian Age:",
113 | median_age, "\nMedian Income:",
114 | dollar(round(median_income, 2)))) %>%
115 | arrange(cluster_id) %>%
116 | as.data.frame
117 |
118 | # calculate a total count of clusters to
119 | # display in the plot title
120 | cluster_count <- nrow(centers)
121 |
122 | # the plotting method will change
123 | # based upon the clustering method
124 | if (input$cluster_method == "Hierarchical") {
125 |
126 | # recompute the clusters
127 | # based on the user-specified
128 | # cluster count
129 | cent <- NULL
130 | for (k in 1:cluster_count) {
131 | cent <- rbind(cent, colMeans(clustered_dataset()[clustered_dataset()$cluster_id == k,
132 | c("age_scale",
133 | "inc_scale"),
134 | drop = FALSE]))
135 | }
136 | cut_tree <- hclust(dist(cent) ^ 2, method = "cen",
137 | members = table(clustered_dataset()$cluster_id))
138 |
139 | # convert the cut tree to a dendrogram to
140 | # prepare it for plotting and add
141 | # more informative labels
142 | dend <- cut_tree %>% as.dendrogram
143 | labels(dend) <- centers$label
144 |
145 | # using the ggdendro package
146 | # add styling to the dendrogram
147 | dend <- dend %>%
148 | set("branches_k_color",
149 | k = cluster_count,
150 | dendrogram_color_scheme[1:cluster_count] ) %>%
151 | set("branches_lwd", 1.2) %>%
152 | set("branches_lty", 1) %>%
153 | set("labels_colors",
154 | dendrogram_color_scheme[1:cluster_count]) %>%
155 | set("nodes_pch", 18)
156 |
157 | # convert the dendrogram to a ggplot
158 | # friendly version so we can style and add
159 | # labels via ggplot2 methods
160 | ggdend <- as.ggdend(dend)
161 |
162 | # push the color schemes over to
163 | # the text labels so they match up
164 | # with the dendrogram segments
165 | centers <- inner_join(centers,
166 | ggdend$segments %>%
167 | filter(!duplicated(xend), !is.na(col)) %>%
168 | select(xend,col), by = c("cluster_id" = "xend"))
169 |
170 | # create the plot of the dendrogram
171 | p <- ggplot(ggdend, labels = F) +
172 | # add the labels at each leaf
173 | geom_text(data = centers,
174 | aes(label = label, x = as.numeric(cluster_id), y = -.1,
175 | size = 4, lineheight = .8, color = col), hjust = 0) +
176 | # flip the axes and scale to fit the text
177 | coord_flip() +
178 | scale_y_reverse(limits = c(max(ggdend$segments$yend) + .15,
179 | min(ggdend$segments$yend) - 1.5)) +
180 | scale_x_reverse(limits = c(max(ggdend$segments$xend) + .5,
181 | min(ggdend$segments$yend) + .5)) +
182 | # add titling and other theme elements to make
183 | # more consistent with the K-means created plot
184 | ggtitle(paste(cluster_count, "- Cluster Model")) +
185 | theme_bw() +
186 | theme(line = element_blank(),
187 | axis.text.x = element_blank(),
188 | axis.text.y = element_blank(),
189 | axis.title.x = element_blank(),
190 | axis.title.y = element_blank(),
191 | axis.ticks = element_blank(),
192 | plot.title = element_text(face = "bold", size = 20,
193 | margin = margin(0, 0, 10, 0)))
194 |
195 | } else {
196 |
197 | # create the cluster plot to help
198 | # the user visualize their choice
199 | # for the total number of clusters
200 | p <- ggplot(clustered_dataset(), aes(x = age, y = income,
201 | color = cluster_id)) +
202 | geom_point() +
203 | geom_text(data = centers, aes(x = median_age,
204 | y = median_income,
205 | label = as.character(cluster_id)),
206 | color = "black",
207 | size = 16) +
208 | scale_colour_discrete(guide = FALSE) +
209 | scale_y_continuous(labels = dollar,
210 | breaks = pretty_breaks(n = 10)) +
211 | scale_x_continuous(breaks = pretty_breaks(n = 10)) +
212 | xlab("Age") +
213 | ylab("Income") +
214 | ggtitle(paste(cluster_count, "- Cluster Model")) +
215 | theme_bw() +
216 | theme(plot.title = element_text(face = "bold", size = 20,
217 | margin = margin(0, 0, 10, 0)),
218 | axis.title.x = element_text(margin = margin(10, 0, 0, 0)),
219 | axis.title.y = element_text(margin = margin(0, 10, 0, 0)))
220 | }
221 |
222 | # after creating the plot, print it so
223 | # that it is made visible to the UI
224 | print(p)
225 | })
226 |
227 | # create a dataset to display in a table
228 | # and download from
229 | table_data <- reactive({
230 | table_data <- clustered_dataset() %>%
231 | mutate(income_ptile_overall = round(rank(income)/length(income), 4)) %>%
232 | group_by(cluster_id) %>%
233 | mutate(income_ptile = round(rank(income)/length(income), 4),
234 | income = round(income,2)) %>%
235 | ungroup() %>%
236 | arrange(-income_ptile) %>%
237 | select(`First Name`, `Last Name`,
238 | `Email`, "Age" = age, "Income" = income,
239 | "Income %Tile within Cluster" = income_ptile,
240 | "Income %Tile Overall" = income_ptile_overall,
241 | "Cluster Id" = cluster_id)
242 |
243 | return(table_data)
244 | })
245 |
246 | # create the table using a variet of options
247 | # to configure the look and feel
248 | output$campaign_table <- DT::renderDataTable({
249 |
250 | d <- DT::datatable(table_data(), options = list(
251 | columnDefs = list(list(width = "150px", targets = 0),
252 | list(width = "50px", targets = c(3, 7)),
253 | list(width = "110px", targets = c(4, 5, 6)),
254 | list(className = "dt-center", targets = 3:7)),
255 | deferRender = TRUE, autoWidth = FALSE, lengthChange = FALSE,
256 | searching = TRUE, paginate = TRUE, pageLength = 25, info = TRUE,
257 | ordering = TRUE,
258 | # sort by cluster id initially
259 | order = list(list(7, "asc"))
260 | ),
261 | filter = "top",
262 | selection = "none",
263 | class = "cell-border stripe",
264 | rownames = FALSE,
265 | escape = FALSE
266 | )
267 |
268 | d <- d %>% formatCurrency("Income", digits = 0) %>%
269 | formatPercentage(c("Income %Tile within Cluster",
270 | "Income %Tile Overall"), digits = 1)
271 |
272 | return(d)
273 | })
274 |
275 | # provide a server-side method for handling user
276 | # downloads from the table of data
277 | output$downloadDataFromTable <- downloadHandler(
278 | filename = function() {
279 | paste0("CAMPAIGN_DATA_", format(Sys.Date(), "%Y-%m-%d"), ".csv")
280 | },
281 | content = function(file) {
282 | write.csv(table_data()[input$campaign_table_rows_all, ], file, row.names = FALSE)
283 | },
284 | contentType = "text/csv"
285 | )
286 |
287 | })
288 |
--------------------------------------------------------------------------------
/Chapter 7/data/Ch7_email_marketing_campaign.csv:
--------------------------------------------------------------------------------
1 | Consumer,Promotion,Opened Email,Clicked Email Link,Created Account,Paid for Membership
2 | 1,Free Month,N,N,N,N
3 | 2,10% off,N,N,N,N
4 | 3,Free Month,N,N,N,N
5 | 4,10% off,N,N,N,N
6 | 5,Free Month,N,N,N,N
7 | 6,10% off,N,N,N,N
8 | 7,Free Month,N,N,N,N
9 | 8,10% off,Y,N,N,N
10 | 9,Free Month,N,N,N,N
11 | 10,10% off,Y,Y,Y,Y
12 | 11,Free Month,N,N,N,N
13 | 12,10% off,N,N,N,N
14 | 13,Free Month,Y,Y,N,N
15 | 14,10% off,Y,N,N,N
16 | 15,Free Month,Y,Y,Y,N
17 | 16,10% off,Y,N,N,N
18 | 17,Free Month,Y,N,N,N
19 | 18,10% off,N,N,N,N
20 | 19,Free Month,N,N,N,N
21 | 20,10% off,N,N,N,N
22 | 21,Free Month,N,N,N,N
23 | 22,10% off,Y,Y,Y,Y
24 | 23,Free Month,Y,N,N,N
25 | 24,10% off,Y,Y,Y,N
26 | 25,Free Month,Y,N,N,N
27 | 26,10% off,N,N,N,N
28 | 27,Free Month,Y,N,N,N
29 | 28,10% off,N,N,N,N
30 | 29,Free Month,N,N,N,N
31 | 30,10% off,N,N,N,N
32 | 31,Free Month,N,N,N,N
33 | 32,10% off,Y,Y,Y,Y
34 | 33,Free Month,N,N,N,N
35 | 34,10% off,Y,N,N,N
36 | 35,Free Month,N,N,N,N
37 | 36,10% off,N,N,N,N
38 | 37,Free Month,N,N,N,N
39 | 38,10% off,N,N,N,N
40 | 39,Free Month,Y,Y,N,N
41 | 40,10% off,N,N,N,N
42 | 41,Free Month,N,N,N,N
43 | 42,10% off,N,N,N,N
44 | 43,Free Month,Y,Y,N,N
45 | 44,10% off,N,N,N,N
46 | 45,Free Month,Y,N,N,N
47 | 46,10% off,N,N,N,N
48 | 47,Free Month,Y,Y,Y,Y
49 | 48,10% off,N,N,N,N
50 | 49,Free Month,N,N,N,N
51 | 50,10% off,N,N,N,N
52 | 51,Free Month,N,N,N,N
53 | 52,10% off,N,N,N,N
54 | 53,Free Month,N,N,N,N
55 | 54,10% off,N,N,N,N
56 | 55,Free Month,Y,Y,Y,N
57 | 56,10% off,Y,Y,Y,Y
58 | 57,Free Month,N,N,N,N
59 | 58,10% off,Y,Y,Y,Y
60 | 59,Free Month,N,N,N,N
61 | 60,10% off,Y,Y,Y,Y
62 | 61,Free Month,N,N,N,N
63 | 62,10% off,N,N,N,N
64 | 63,Free Month,N,N,N,N
65 | 64,10% off,N,N,N,N
66 | 65,Free Month,Y,Y,Y,Y
67 | 66,10% off,N,N,N,N
68 | 67,Free Month,N,N,N,N
69 | 68,10% off,Y,Y,Y,Y
70 | 69,Free Month,N,N,N,N
71 | 70,10% off,N,N,N,N
72 | 71,Free Month,N,N,N,N
73 | 72,10% off,N,N,N,N
74 | 73,Free Month,N,N,N,N
75 | 74,10% off,Y,N,N,N
76 | 75,Free Month,N,N,N,N
77 | 76,10% off,N,N,N,N
78 | 77,Free Month,N,N,N,N
79 | 78,10% off,N,N,N,N
80 | 79,Free Month,N,N,N,N
81 | 80,10% off,Y,N,N,N
82 | 81,Free Month,Y,N,N,N
83 | 82,10% off,Y,Y,Y,Y
84 | 83,Free Month,Y,N,N,N
85 | 84,10% off,N,N,N,N
86 | 85,Free Month,N,N,N,N
87 | 86,10% off,N,N,N,N
88 | 87,Free Month,N,N,N,N
89 | 88,10% off,N,N,N,N
90 | 89,Free Month,N,N,N,N
91 | 90,10% off,N,N,N,N
92 | 91,Free Month,N,N,N,N
93 | 92,10% off,N,N,N,N
94 | 93,Free Month,N,N,N,N
95 | 94,10% off,N,N,N,N
96 | 95,Free Month,Y,Y,Y,N
97 | 96,10% off,Y,Y,Y,N
98 | 97,Free Month,N,N,N,N
99 | 98,10% off,N,N,N,N
100 | 99,Free Month,N,N,N,N
101 | 100,10% off,Y,Y,Y,Y
102 | 101,Free Month,N,N,N,N
103 | 102,10% off,N,N,N,N
104 | 103,Free Month,Y,N,N,N
105 | 104,10% off,Y,Y,Y,Y
106 | 105,Free Month,Y,N,N,N
107 | 106,10% off,N,N,N,N
108 | 107,Free Month,N,N,N,N
109 | 108,10% off,N,N,N,N
110 | 109,Free Month,Y,Y,Y,Y
111 | 110,10% off,N,N,N,N
112 | 111,Free Month,Y,N,N,N
113 | 112,10% off,N,N,N,N
114 | 113,Free Month,Y,N,N,N
115 | 114,10% off,N,N,N,N
116 | 115,Free Month,Y,N,N,N
117 | 116,10% off,N,N,N,N
118 | 117,Free Month,Y,Y,Y,Y
119 | 118,10% off,Y,Y,Y,N
120 | 119,Free Month,Y,Y,Y,Y
121 | 120,10% off,N,N,N,N
122 | 121,Free Month,N,N,N,N
123 | 122,10% off,N,N,N,N
124 | 123,Free Month,N,N,N,N
125 | 124,10% off,N,N,N,N
126 | 125,Free Month,N,N,N,N
127 | 126,10% off,N,N,N,N
128 | 127,Free Month,Y,Y,Y,Y
129 | 128,10% off,N,N,N,N
130 | 129,Free Month,Y,Y,Y,Y
131 | 130,10% off,N,N,N,N
132 | 131,Free Month,Y,N,N,N
133 | 132,10% off,N,N,N,N
134 | 133,Free Month,N,N,N,N
135 | 134,10% off,N,N,N,N
136 | 135,Free Month,N,N,N,N
137 | 136,10% off,N,N,N,N
138 | 137,Free Month,Y,Y,Y,N
139 | 138,10% off,N,N,N,N
140 | 139,Free Month,N,N,N,N
141 | 140,10% off,N,N,N,N
142 | 141,Free Month,Y,Y,Y,N
143 | 142,10% off,N,N,N,N
144 | 143,Free Month,Y,Y,N,N
145 | 144,10% off,N,N,N,N
146 | 145,Free Month,N,N,N,N
147 | 146,10% off,N,N,N,N
148 | 147,Free Month,N,N,N,N
149 | 148,10% off,N,N,N,N
150 | 149,Free Month,N,N,N,N
151 | 150,10% off,N,N,N,N
152 | 151,Free Month,Y,Y,N,N
153 | 152,10% off,N,N,N,N
154 | 153,Free Month,N,N,N,N
155 | 154,10% off,N,N,N,N
156 | 155,Free Month,N,N,N,N
157 | 156,10% off,Y,Y,N,N
158 | 157,Free Month,N,N,N,N
159 | 158,10% off,Y,N,N,N
160 | 159,Free Month,N,N,N,N
161 | 160,10% off,Y,N,N,N
162 | 161,Free Month,N,N,N,N
163 | 162,10% off,N,N,N,N
164 | 163,Free Month,N,N,N,N
165 | 164,10% off,N,N,N,N
166 | 165,Free Month,Y,Y,Y,Y
167 | 166,10% off,N,N,N,N
168 | 167,Free Month,N,N,N,N
169 | 168,10% off,Y,N,N,N
170 | 169,Free Month,N,N,N,N
171 | 170,10% off,N,N,N,N
172 | 171,Free Month,N,N,N,N
173 | 172,10% off,N,N,N,N
174 | 173,Free Month,N,N,N,N
175 | 174,10% off,N,N,N,N
176 | 175,Free Month,N,N,N,N
177 | 176,10% off,N,N,N,N
178 | 177,Free Month,Y,Y,Y,Y
179 | 178,10% off,N,N,N,N
180 | 179,Free Month,N,N,N,N
181 | 180,10% off,Y,N,N,N
182 | 181,Free Month,Y,N,N,N
183 | 182,10% off,N,N,N,N
184 | 183,Free Month,N,N,N,N
185 | 184,10% off,N,N,N,N
186 | 185,Free Month,N,N,N,N
187 | 186,10% off,N,N,N,N
188 | 187,Free Month,Y,Y,Y,Y
189 | 188,10% off,N,N,N,N
190 | 189,Free Month,Y,N,N,N
191 | 190,10% off,Y,Y,Y,Y
192 | 191,Free Month,N,N,N,N
193 | 192,10% off,Y,N,N,N
194 | 193,Free Month,N,N,N,N
195 | 194,10% off,N,N,N,N
196 | 195,Free Month,N,N,N,N
197 | 196,10% off,N,N,N,N
198 | 197,Free Month,N,N,N,N
199 | 198,10% off,N,N,N,N
200 | 199,Free Month,Y,N,N,N
201 | 200,10% off,N,N,N,N
202 | 201,Free Month,N,N,N,N
203 | 202,10% off,N,N,N,N
204 | 203,Free Month,Y,Y,Y,Y
205 | 204,10% off,N,N,N,N
206 | 205,Free Month,N,N,N,N
207 | 206,10% off,Y,Y,Y,Y
208 | 207,Free Month,N,N,N,N
209 | 208,10% off,N,N,N,N
210 | 209,Free Month,Y,N,N,N
211 | 210,10% off,Y,Y,Y,Y
212 | 211,Free Month,N,N,N,N
213 | 212,10% off,Y,Y,Y,Y
214 | 213,Free Month,N,N,N,N
215 | 214,10% off,Y,Y,Y,Y
216 | 215,Free Month,N,N,N,N
217 | 216,10% off,N,N,N,N
218 | 217,Free Month,N,N,N,N
219 | 218,10% off,Y,N,N,N
220 | 219,Free Month,N,N,N,N
221 | 220,10% off,N,N,N,N
222 | 221,Free Month,Y,N,N,N
223 | 222,10% off,N,N,N,N
224 | 223,Free Month,N,N,N,N
225 | 224,10% off,N,N,N,N
226 | 225,Free Month,N,N,N,N
227 | 226,10% off,N,N,N,N
228 | 227,Free Month,N,N,N,N
229 | 228,10% off,N,N,N,N
230 | 229,Free Month,Y,Y,Y,Y
231 | 230,10% off,N,N,N,N
232 | 231,Free Month,N,N,N,N
233 | 232,10% off,N,N,N,N
234 | 233,Free Month,Y,N,N,N
235 | 234,10% off,N,N,N,N
236 | 235,Free Month,N,N,N,N
237 | 236,10% off,Y,N,N,N
238 | 237,Free Month,N,N,N,N
239 | 238,10% off,N,N,N,N
240 | 239,Free Month,N,N,N,N
241 | 240,10% off,Y,Y,N,N
242 | 241,Free Month,Y,Y,N,N
243 | 242,10% off,Y,N,N,N
244 | 243,Free Month,Y,Y,N,N
245 | 244,10% off,Y,N,N,N
246 | 245,Free Month,N,N,N,N
247 | 246,10% off,N,N,N,N
248 | 247,Free Month,Y,Y,N,N
249 | 248,10% off,N,N,N,N
250 | 249,Free Month,Y,N,N,N
251 | 250,10% off,N,N,N,N
252 | 251,Free Month,Y,Y,Y,Y
253 | 252,10% off,N,N,N,N
254 | 253,Free Month,N,N,N,N
255 | 254,10% off,Y,N,N,N
256 | 255,Free Month,N,N,N,N
257 | 256,10% off,N,N,N,N
258 | 257,Free Month,N,N,N,N
259 | 258,10% off,N,N,N,N
260 | 259,Free Month,N,N,N,N
261 | 260,10% off,Y,Y,Y,Y
262 | 261,Free Month,N,N,N,N
263 | 262,10% off,N,N,N,N
264 | 263,Free Month,N,N,N,N
265 | 264,10% off,Y,N,N,N
266 | 265,Free Month,Y,Y,Y,Y
267 | 266,10% off,N,N,N,N
268 | 267,Free Month,Y,N,N,N
269 | 268,10% off,Y,N,N,N
270 | 269,Free Month,N,N,N,N
271 | 270,10% off,N,N,N,N
272 | 271,Free Month,Y,N,N,N
273 | 272,10% off,N,N,N,N
274 | 273,Free Month,N,N,N,N
275 | 274,10% off,N,N,N,N
276 | 275,Free Month,N,N,N,N
277 | 276,10% off,N,N,N,N
278 | 277,Free Month,Y,N,N,N
279 | 278,10% off,Y,Y,N,N
280 | 279,Free Month,N,N,N,N
281 | 280,10% off,N,N,N,N
282 | 281,Free Month,N,N,N,N
283 | 282,10% off,N,N,N,N
284 | 283,Free Month,N,N,N,N
285 | 284,10% off,Y,Y,Y,Y
286 | 285,Free Month,N,N,N,N
287 | 286,10% off,N,N,N,N
288 | 287,Free Month,N,N,N,N
289 | 288,10% off,N,N,N,N
290 | 289,Free Month,N,N,N,N
291 | 290,10% off,Y,N,N,N
292 | 291,Free Month,N,N,N,N
293 | 292,10% off,N,N,N,N
294 | 293,Free Month,N,N,N,N
295 | 294,10% off,Y,Y,Y,Y
296 | 295,Free Month,N,N,N,N
297 | 296,10% off,N,N,N,N
298 | 297,Free Month,N,N,N,N
299 | 298,10% off,N,N,N,N
300 | 299,Free Month,N,N,N,N
301 | 300,10% off,Y,N,N,N
302 | 301,Free Month,N,N,N,N
303 | 302,10% off,Y,Y,Y,Y
304 | 303,Free Month,N,N,N,N
305 | 304,10% off,Y,N,N,N
306 | 305,Free Month,N,N,N,N
307 | 306,10% off,N,N,N,N
308 | 307,Free Month,Y,Y,N,N
309 | 308,10% off,Y,N,N,N
310 | 309,Free Month,N,N,N,N
311 | 310,10% off,N,N,N,N
312 | 311,Free Month,Y,N,N,N
313 | 312,10% off,N,N,N,N
314 | 313,Free Month,Y,Y,Y,N
315 | 314,10% off,N,N,N,N
316 | 315,Free Month,Y,Y,Y,N
317 | 316,10% off,Y,Y,Y,N
318 | 317,Free Month,N,N,N,N
319 | 318,10% off,Y,Y,Y,Y
320 | 319,Free Month,N,N,N,N
321 | 320,10% off,Y,N,N,N
322 | 321,Free Month,N,N,N,N
323 | 322,10% off,N,N,N,N
324 | 323,Free Month,N,N,N,N
325 | 324,10% off,Y,N,N,N
326 | 325,Free Month,N,N,N,N
327 | 326,10% off,Y,N,N,N
328 | 327,Free Month,N,N,N,N
329 | 328,10% off,N,N,N,N
330 | 329,Free Month,N,N,N,N
331 | 330,10% off,N,N,N,N
332 | 331,Free Month,N,N,N,N
333 | 332,10% off,N,N,N,N
334 | 333,Free Month,N,N,N,N
335 | 334,10% off,N,N,N,N
336 | 335,Free Month,Y,N,N,N
337 | 336,10% off,N,N,N,N
338 | 337,Free Month,Y,Y,N,N
339 | 338,10% off,N,N,N,N
340 | 339,Free Month,N,N,N,N
341 | 340,10% off,Y,Y,N,N
342 | 341,Free Month,Y,Y,N,N
343 | 342,10% off,Y,N,N,N
344 | 343,Free Month,Y,N,N,N
345 | 344,10% off,N,N,N,N
346 | 345,Free Month,N,N,N,N
347 | 346,10% off,N,N,N,N
348 | 347,Free Month,N,N,N,N
349 | 348,10% off,Y,N,N,N
350 | 349,Free Month,Y,N,N,N
351 | 350,10% off,Y,Y,N,N
352 | 351,Free Month,N,N,N,N
353 | 352,10% off,Y,Y,Y,Y
354 | 353,Free Month,N,N,N,N
355 | 354,10% off,N,N,N,N
356 | 355,Free Month,N,N,N,N
357 | 356,10% off,N,N,N,N
358 | 357,Free Month,N,N,N,N
359 | 358,10% off,Y,N,N,N
360 | 359,Free Month,Y,Y,N,N
361 | 360,10% off,Y,Y,Y,N
362 | 361,Free Month,N,N,N,N
363 | 362,10% off,N,N,N,N
364 | 363,Free Month,Y,Y,N,N
365 | 364,10% off,N,N,N,N
366 | 365,Free Month,N,N,N,N
367 | 366,10% off,N,N,N,N
368 | 367,Free Month,N,N,N,N
369 | 368,10% off,N,N,N,N
370 | 369,Free Month,N,N,N,N
371 | 370,10% off,N,N,N,N
372 | 371,Free Month,N,N,N,N
373 | 372,10% off,N,N,N,N
374 | 373,Free Month,Y,Y,N,N
375 | 374,10% off,N,N,N,N
376 | 375,Free Month,Y,Y,Y,Y
377 | 376,10% off,N,N,N,N
378 | 377,Free Month,N,N,N,N
379 | 378,10% off,N,N,N,N
380 | 379,Free Month,Y,N,N,N
381 | 380,10% off,N,N,N,N
382 | 381,Free Month,N,N,N,N
383 | 382,10% off,N,N,N,N
384 | 383,Free Month,N,N,N,N
385 | 384,10% off,N,N,N,N
386 | 385,Free Month,N,N,N,N
387 | 386,10% off,N,N,N,N
388 | 387,Free Month,N,N,N,N
389 | 388,10% off,Y,Y,Y,Y
390 | 389,Free Month,N,N,N,N
391 | 390,10% off,N,N,N,N
392 | 391,Free Month,N,N,N,N
393 | 392,10% off,N,N,N,N
394 | 393,Free Month,Y,N,N,N
395 | 394,10% off,N,N,N,N
396 | 395,Free Month,Y,Y,Y,Y
397 | 396,10% off,N,N,N,N
398 | 397,Free Month,N,N,N,N
399 | 398,10% off,Y,Y,Y,Y
400 | 399,Free Month,N,N,N,N
401 | 400,10% off,N,N,N,N
402 | 401,Free Month,N,N,N,N
403 | 402,10% off,N,N,N,N
404 | 403,Free Month,Y,Y,N,N
405 | 404,10% off,N,N,N,N
406 | 405,Free Month,N,N,N,N
407 | 406,10% off,Y,N,N,N
408 | 407,Free Month,Y,N,N,N
409 | 408,10% off,N,N,N,N
410 | 409,Free Month,Y,Y,N,N
411 | 410,10% off,N,N,N,N
412 | 411,Free Month,Y,N,N,N
413 | 412,10% off,N,N,N,N
414 | 413,Free Month,N,N,N,N
415 | 414,10% off,N,N,N,N
416 | 415,Free Month,N,N,N,N
417 | 416,10% off,N,N,N,N
418 | 417,Free Month,N,N,N,N
419 | 418,10% off,N,N,N,N
420 | 419,Free Month,N,N,N,N
421 | 420,10% off,Y,N,N,N
422 | 421,Free Month,N,N,N,N
423 | 422,10% off,Y,N,N,N
424 | 423,Free Month,Y,N,N,N
425 | 424,10% off,N,N,N,N
426 | 425,Free Month,N,N,N,N
427 | 426,10% off,N,N,N,N
428 | 427,Free Month,N,N,N,N
429 | 428,10% off,N,N,N,N
430 | 429,Free Month,Y,Y,N,N
431 | 430,10% off,Y,Y,Y,Y
432 | 431,Free Month,Y,N,N,N
433 | 432,10% off,N,N,N,N
434 | 433,Free Month,N,N,N,N
435 | 434,10% off,N,N,N,N
436 | 435,Free Month,N,N,N,N
437 | 436,10% off,N,N,N,N
438 | 437,Free Month,N,N,N,N
439 | 438,10% off,N,N,N,N
440 | 439,Free Month,N,N,N,N
441 | 440,10% off,N,N,N,N
442 | 441,Free Month,N,N,N,N
443 | 442,10% off,N,N,N,N
444 | 443,Free Month,N,N,N,N
445 | 444,10% off,N,N,N,N
446 | 445,Free Month,Y,N,N,N
447 | 446,10% off,N,N,N,N
448 | 447,Free Month,N,N,N,N
449 | 448,10% off,Y,Y,Y,Y
450 | 449,Free Month,Y,N,N,N
451 | 450,10% off,N,N,N,N
452 | 451,Free Month,Y,Y,Y,Y
453 | 452,10% off,N,N,N,N
454 | 453,Free Month,N,N,N,N
455 | 454,10% off,N,N,N,N
456 | 455,Free Month,Y,Y,Y,Y
457 | 456,10% off,N,N,N,N
458 | 457,Free Month,N,N,N,N
459 | 458,10% off,N,N,N,N
460 | 459,Free Month,N,N,N,N
461 | 460,10% off,N,N,N,N
462 | 461,Free Month,N,N,N,N
463 | 462,10% off,N,N,N,N
464 | 463,Free Month,N,N,N,N
465 | 464,10% off,N,N,N,N
466 | 465,Free Month,Y,Y,N,N
467 | 466,10% off,N,N,N,N
468 | 467,Free Month,N,N,N,N
469 | 468,10% off,Y,N,N,N
470 | 469,Free Month,N,N,N,N
471 | 470,10% off,N,N,N,N
472 | 471,Free Month,Y,Y,N,N
473 | 472,10% off,N,N,N,N
474 | 473,Free Month,N,N,N,N
475 | 474,10% off,N,N,N,N
476 | 475,Free Month,N,N,N,N
477 | 476,10% off,Y,Y,Y,Y
478 | 477,Free Month,N,N,N,N
479 | 478,10% off,Y,Y,Y,Y
480 | 479,Free Month,N,N,N,N
481 | 480,10% off,N,N,N,N
482 | 481,Free Month,Y,Y,N,N
483 | 482,10% off,N,N,N,N
484 | 483,Free Month,Y,Y,Y,N
485 | 484,10% off,Y,Y,N,N
486 | 485,Free Month,N,N,N,N
487 | 486,10% off,N,N,N,N
488 | 487,Free Month,Y,N,N,N
489 | 488,10% off,Y,N,N,N
490 | 489,Free Month,N,N,N,N
491 | 490,10% off,Y,N,N,N
492 | 491,Free Month,Y,Y,N,N
493 | 492,10% off,Y,N,N,N
494 | 493,Free Month,N,N,N,N
495 | 494,10% off,Y,N,N,N
496 | 495,Free Month,N,N,N,N
497 | 496,10% off,Y,N,N,N
498 | 497,Free Month,N,N,N,N
499 | 498,10% off,N,N,N,N
500 | 499,Free Month,N,N,N,N
501 | 500,10% off,N,N,N,N
502 | 501,Free Month,N,N,N,N
503 | 502,10% off,N,N,N,N
504 | 503,Free Month,N,N,N,N
505 | 504,10% off,N,N,N,N
506 | 505,Free Month,N,N,N,N
507 | 506,10% off,N,N,N,N
508 | 507,Free Month,Y,Y,N,N
509 | 508,10% off,N,N,N,N
510 | 509,Free Month,Y,Y,N,N
511 | 510,10% off,N,N,N,N
512 | 511,Free Month,N,N,N,N
513 | 512,10% off,N,N,N,N
514 | 513,Free Month,N,N,N,N
515 | 514,10% off,N,N,N,N
516 | 515,Free Month,N,N,N,N
517 | 516,10% off,N,N,N,N
518 | 517,Free Month,N,N,N,N
519 | 518,10% off,N,N,N,N
520 | 519,Free Month,Y,Y,Y,N
521 | 520,10% off,N,N,N,N
522 | 521,Free Month,N,N,N,N
523 | 522,10% off,N,N,N,N
524 | 523,Free Month,N,N,N,N
525 | 524,10% off,N,N,N,N
526 | 525,Free Month,N,N,N,N
527 | 526,10% off,N,N,N,N
528 | 527,Free Month,Y,N,N,N
529 | 528,10% off,N,N,N,N
530 | 529,Free Month,N,N,N,N
531 | 530,10% off,Y,Y,N,N
532 | 531,Free Month,N,N,N,N
533 | 532,10% off,Y,N,N,N
534 | 533,Free Month,Y,N,N,N
535 | 534,10% off,N,N,N,N
536 | 535,Free Month,Y,Y,Y,Y
537 | 536,10% off,N,N,N,N
538 | 537,Free Month,Y,N,N,N
539 | 538,10% off,Y,Y,N,N
540 | 539,Free Month,Y,N,N,N
541 | 540,10% off,Y,N,N,N
542 | 541,Free Month,N,N,N,N
543 | 542,10% off,N,N,N,N
544 | 543,Free Month,Y,N,N,N
545 | 544,10% off,N,N,N,N
546 | 545,Free Month,N,N,N,N
547 | 546,10% off,N,N,N,N
548 | 547,Free Month,Y,Y,Y,Y
549 | 548,10% off,Y,N,N,N
550 | 549,Free Month,N,N,N,N
551 | 550,10% off,N,N,N,N
552 | 551,Free Month,Y,Y,N,N
553 | 552,10% off,N,N,N,N
554 | 553,Free Month,Y,N,N,N
555 | 554,10% off,N,N,N,N
556 | 555,Free Month,N,N,N,N
557 | 556,10% off,N,N,N,N
558 | 557,Free Month,N,N,N,N
559 | 558,10% off,Y,N,N,N
560 | 559,Free Month,N,N,N,N
561 | 560,10% off,Y,N,N,N
562 | 561,Free Month,Y,N,N,N
563 | 562,10% off,N,N,N,N
564 | 563,Free Month,N,N,N,N
565 | 564,10% off,N,N,N,N
566 | 565,Free Month,Y,Y,N,N
567 | 566,10% off,N,N,N,N
568 | 567,Free Month,N,N,N,N
569 | 568,10% off,N,N,N,N
570 | 569,Free Month,N,N,N,N
571 | 570,10% off,Y,N,N,N
572 | 571,Free Month,N,N,N,N
573 | 572,10% off,Y,Y,N,N
574 | 573,Free Month,Y,N,N,N
575 | 574,10% off,Y,Y,Y,Y
576 | 575,Free Month,Y,N,N,N
577 | 576,10% off,Y,N,N,N
578 | 577,Free Month,Y,N,N,N
579 | 578,10% off,Y,N,N,N
580 | 579,Free Month,Y,Y,N,N
581 | 580,10% off,N,N,N,N
582 | 581,Free Month,Y,Y,N,N
583 | 582,10% off,N,N,N,N
584 | 583,Free Month,N,N,N,N
585 | 584,10% off,Y,N,N,N
586 | 585,Free Month,Y,N,N,N
587 | 586,10% off,N,N,N,N
588 | 587,Free Month,N,N,N,N
589 | 588,10% off,Y,N,N,N
590 | 589,Free Month,N,N,N,N
591 | 590,10% off,N,N,N,N
592 | 591,Free Month,Y,Y,N,N
593 | 592,10% off,N,N,N,N
594 | 593,Free Month,N,N,N,N
595 | 594,10% off,N,N,N,N
596 | 595,Free Month,N,N,N,N
597 | 596,10% off,Y,Y,N,N
598 | 597,Free Month,N,N,N,N
599 | 598,10% off,N,N,N,N
600 | 599,Free Month,Y,Y,Y,Y
601 | 600,10% off,Y,Y,Y,Y
602 | 601,Free Month,Y,Y,Y,Y
603 | 602,10% off,Y,Y,Y,Y
604 | 603,Free Month,Y,N,N,N
605 | 604,10% off,N,N,N,N
606 | 605,Free Month,N,N,N,N
607 | 606,10% off,Y,Y,Y,Y
608 | 607,Free Month,N,N,N,N
609 | 608,10% off,N,N,N,N
610 | 609,Free Month,Y,N,N,N
611 | 610,10% off,Y,N,N,N
612 | 611,Free Month,N,N,N,N
613 | 612,10% off,N,N,N,N
614 | 613,Free Month,N,N,N,N
615 | 614,10% off,N,N,N,N
616 | 615,Free Month,Y,Y,N,N
617 | 616,10% off,N,N,N,N
618 | 617,Free Month,N,N,N,N
619 | 618,10% off,Y,N,N,N
620 | 619,Free Month,N,N,N,N
621 | 620,10% off,N,N,N,N
622 | 621,Free Month,N,N,N,N
623 | 622,10% off,Y,Y,Y,Y
624 | 623,Free Month,N,N,N,N
625 | 624,10% off,N,N,N,N
626 | 625,Free Month,N,N,N,N
627 | 626,10% off,Y,N,N,N
628 | 627,Free Month,N,N,N,N
629 | 628,10% off,N,N,N,N
630 | 629,Free Month,N,N,N,N
631 | 630,10% off,N,N,N,N
632 | 631,Free Month,Y,N,N,N
633 | 632,10% off,Y,N,N,N
634 | 633,Free Month,N,N,N,N
635 | 634,10% off,N,N,N,N
636 | 635,Free Month,N,N,N,N
637 | 636,10% off,Y,N,N,N
638 | 637,Free Month,N,N,N,N
639 | 638,10% off,N,N,N,N
640 | 639,Free Month,N,N,N,N
641 | 640,10% off,Y,N,N,N
642 | 641,Free Month,Y,Y,Y,Y
643 | 642,10% off,N,N,N,N
644 | 643,Free Month,N,N,N,N
645 | 644,10% off,N,N,N,N
646 | 645,Free Month,N,N,N,N
647 | 646,10% off,Y,N,N,N
648 | 647,Free Month,N,N,N,N
649 | 648,10% off,Y,N,N,N
650 | 649,Free Month,N,N,N,N
651 | 650,10% off,N,N,N,N
652 | 651,Free Month,N,N,N,N
653 | 652,10% off,Y,Y,Y,Y
654 | 653,Free Month,Y,N,N,N
655 | 654,10% off,Y,Y,Y,Y
656 | 655,Free Month,Y,N,N,N
657 | 656,10% off,N,N,N,N
658 | 657,Free Month,Y,N,N,N
659 | 658,10% off,N,N,N,N
660 | 659,Free Month,N,N,N,N
661 | 660,10% off,N,N,N,N
662 | 661,Free Month,N,N,N,N
663 | 662,10% off,N,N,N,N
664 | 663,Free Month,Y,Y,Y,Y
665 | 664,10% off,N,N,N,N
666 | 665,Free Month,N,N,N,N
667 | 666,10% off,Y,Y,N,N
668 | 667,Free Month,Y,Y,N,N
669 | 668,10% off,Y,N,N,N
670 | 669,Free Month,N,N,N,N
671 | 670,10% off,Y,N,N,N
672 | 671,Free Month,N,N,N,N
673 | 672,10% off,N,N,N,N
674 | 673,Free Month,N,N,N,N
675 | 674,10% off,N,N,N,N
676 | 675,Free Month,Y,Y,Y,Y
677 | 676,10% off,N,N,N,N
678 | 677,Free Month,N,N,N,N
679 | 678,10% off,Y,Y,Y,Y
680 | 679,Free Month,N,N,N,N
681 | 680,10% off,N,N,N,N
682 | 681,Free Month,N,N,N,N
683 | 682,10% off,N,N,N,N
684 | 683,Free Month,N,N,N,N
685 | 684,10% off,Y,Y,Y,Y
686 | 685,Free Month,N,N,N,N
687 | 686,10% off,N,N,N,N
688 | 687,Free Month,Y,Y,Y,N
689 | 688,10% off,Y,Y,Y,Y
690 | 689,Free Month,Y,Y,Y,Y
691 | 690,10% off,N,N,N,N
692 | 691,Free Month,N,N,N,N
693 | 692,10% off,N,N,N,N
694 | 693,Free Month,Y,N,N,N
695 | 694,10% off,N,N,N,N
696 | 695,Free Month,Y,Y,N,N
697 | 696,10% off,N,N,N,N
698 | 697,Free Month,N,N,N,N
699 | 698,10% off,N,N,N,N
700 | 699,Free Month,Y,Y,N,N
701 | 700,10% off,Y,Y,Y,Y
702 | 701,Free Month,N,N,N,N
703 | 702,10% off,N,N,N,N
704 | 703,Free Month,N,N,N,N
705 | 704,10% off,N,N,N,N
706 | 705,Free Month,Y,N,N,N
707 | 706,10% off,N,N,N,N
708 | 707,Free Month,Y,Y,N,N
709 | 708,10% off,N,N,N,N
710 | 709,Free Month,Y,Y,N,N
711 | 710,10% off,N,N,N,N
712 | 711,Free Month,Y,Y,Y,Y
713 | 712,10% off,Y,Y,Y,Y
714 | 713,Free Month,N,N,N,N
715 | 714,10% off,N,N,N,N
716 | 715,Free Month,Y,N,N,N
717 | 716,10% off,Y,N,N,N
718 | 717,Free Month,Y,Y,Y,N
719 | 718,10% off,N,N,N,N
720 | 719,Free Month,Y,N,N,N
721 | 720,10% off,N,N,N,N
722 | 721,Free Month,N,N,N,N
723 | 722,10% off,N,N,N,N
724 | 723,Free Month,Y,Y,N,N
725 | 724,10% off,N,N,N,N
726 | 725,Free Month,N,N,N,N
727 | 726,10% off,Y,N,N,N
728 | 727,Free Month,N,N,N,N
729 | 728,10% off,N,N,N,N
730 | 729,Free Month,Y,Y,Y,Y
731 | 730,10% off,Y,Y,Y,Y
732 | 731,Free Month,N,N,N,N
733 | 732,10% off,N,N,N,N
734 | 733,Free Month,N,N,N,N
735 | 734,10% off,Y,N,N,N
736 | 735,Free Month,Y,N,N,N
737 | 736,10% off,N,N,N,N
738 | 737,Free Month,Y,N,N,N
739 | 738,10% off,N,N,N,N
740 | 739,Free Month,Y,Y,N,N
741 | 740,10% off,N,N,N,N
742 | 741,Free Month,N,N,N,N
743 | 742,10% off,N,N,N,N
744 | 743,Free Month,N,N,N,N
745 | 744,10% off,Y,N,N,N
746 | 745,Free Month,N,N,N,N
747 | 746,10% off,N,N,N,N
748 | 747,Free Month,N,N,N,N
749 | 748,10% off,Y,Y,Y,N
750 | 749,Free Month,Y,N,N,N
751 | 750,10% off,N,N,N,N
752 | 751,Free Month,Y,Y,Y,Y
753 | 752,10% off,N,N,N,N
754 | 753,Free Month,Y,Y,Y,Y
755 | 754,10% off,N,N,N,N
756 | 755,Free Month,Y,Y,N,N
757 | 756,10% off,N,N,N,N
758 | 757,Free Month,N,N,N,N
759 | 758,10% off,N,N,N,N
760 | 759,Free Month,N,N,N,N
761 | 760,10% off,N,N,N,N
762 | 761,Free Month,N,N,N,N
763 | 762,10% off,N,N,N,N
764 | 763,Free Month,N,N,N,N
765 | 764,10% off,Y,Y,Y,N
766 | 765,Free Month,Y,Y,Y,Y
767 | 766,10% off,N,N,N,N
768 | 767,Free Month,Y,N,N,N
769 | 768,10% off,N,N,N,N
770 | 769,Free Month,Y,N,N,N
771 | 770,10% off,N,N,N,N
772 | 771,Free Month,Y,Y,N,N
773 | 772,10% off,N,N,N,N
774 | 773,Free Month,Y,Y,Y,Y
775 | 774,10% off,N,N,N,N
776 | 775,Free Month,N,N,N,N
777 | 776,10% off,N,N,N,N
778 | 777,Free Month,Y,Y,N,N
779 | 778,10% off,Y,N,N,N
780 | 779,Free Month,Y,N,N,N
781 | 780,10% off,N,N,N,N
782 | 781,Free Month,N,N,N,N
783 | 782,10% off,N,N,N,N
784 | 783,Free Month,Y,N,N,N
785 | 784,10% off,Y,N,N,N
786 | 785,Free Month,N,N,N,N
787 | 786,10% off,N,N,N,N
788 | 787,Free Month,N,N,N,N
789 | 788,10% off,Y,N,N,N
790 | 789,Free Month,Y,Y,N,N
791 | 790,10% off,N,N,N,N
792 | 791,Free Month,Y,Y,Y,Y
793 | 792,10% off,N,N,N,N
794 | 793,Free Month,Y,Y,N,N
795 | 794,10% off,Y,Y,Y,Y
796 | 795,Free Month,N,N,N,N
797 | 796,10% off,N,N,N,N
798 | 797,Free Month,Y,Y,N,N
799 | 798,10% off,N,N,N,N
800 | 799,Free Month,Y,N,N,N
801 | 800,10% off,N,N,N,N
802 | 801,Free Month,Y,Y,Y,Y
803 | 802,10% off,Y,N,N,N
804 | 803,Free Month,N,N,N,N
805 | 804,10% off,Y,Y,Y,N
806 | 805,Free Month,N,N,N,N
807 | 806,10% off,N,N,N,N
808 | 807,Free Month,N,N,N,N
809 | 808,10% off,N,N,N,N
810 | 809,Free Month,Y,N,N,N
811 | 810,10% off,Y,Y,Y,Y
812 | 811,Free Month,N,N,N,N
813 | 812,10% off,N,N,N,N
814 | 813,Free Month,N,N,N,N
815 | 814,10% off,Y,Y,Y,Y
816 | 815,Free Month,N,N,N,N
817 | 816,10% off,N,N,N,N
818 | 817,Free Month,N,N,N,N
819 | 818,10% off,N,N,N,N
820 | 819,Free Month,N,N,N,N
821 | 820,10% off,N,N,N,N
822 | 821,Free Month,N,N,N,N
823 | 822,10% off,N,N,N,N
824 | 823,Free Month,N,N,N,N
825 | 824,10% off,N,N,N,N
826 | 825,Free Month,N,N,N,N
827 | 826,10% off,N,N,N,N
828 | 827,Free Month,N,N,N,N
829 | 828,10% off,N,N,N,N
830 | 829,Free Month,Y,N,N,N
831 | 830,10% off,N,N,N,N
832 | 831,Free Month,Y,N,N,N
833 | 832,10% off,N,N,N,N
834 | 833,Free Month,N,N,N,N
835 | 834,10% off,N,N,N,N
836 | 835,Free Month,Y,Y,Y,Y
837 | 836,10% off,N,N,N,N
838 | 837,Free Month,N,N,N,N
839 | 838,10% off,Y,N,N,N
840 | 839,Free Month,N,N,N,N
841 | 840,10% off,N,N,N,N
842 | 841,Free Month,N,N,N,N
843 | 842,10% off,N,N,N,N
844 | 843,Free Month,Y,N,N,N
845 | 844,10% off,N,N,N,N
846 | 845,Free Month,N,N,N,N
847 | 846,10% off,N,N,N,N
848 | 847,Free Month,N,N,N,N
849 | 848,10% off,N,N,N,N
850 | 849,Free Month,N,N,N,N
851 | 850,10% off,N,N,N,N
852 | 851,Free Month,N,N,N,N
853 | 852,10% off,Y,Y,Y,Y
854 | 853,Free Month,Y,N,N,N
855 | 854,10% off,N,N,N,N
856 | 855,Free Month,N,N,N,N
857 | 856,10% off,N,N,N,N
858 | 857,Free Month,Y,Y,Y,Y
859 | 858,10% off,Y,N,N,N
860 | 859,Free Month,N,N,N,N
861 | 860,10% off,Y,Y,Y,Y
862 | 861,Free Month,N,N,N,N
863 | 862,10% off,N,N,N,N
864 | 863,Free Month,Y,Y,Y,Y
865 | 864,10% off,Y,N,N,N
866 | 865,Free Month,N,N,N,N
867 | 866,10% off,N,N,N,N
868 | 867,Free Month,N,N,N,N
869 | 868,10% off,Y,N,N,N
870 | 869,Free Month,N,N,N,N
871 | 870,10% off,N,N,N,N
872 | 871,Free Month,N,N,N,N
873 | 872,10% off,Y,N,N,N
874 | 873,Free Month,N,N,N,N
875 | 874,10% off,N,N,N,N
876 | 875,Free Month,N,N,N,N
877 | 876,10% off,N,N,N,N
878 | 877,Free Month,Y,Y,Y,Y
879 | 878,10% off,N,N,N,N
880 | 879,Free Month,Y,N,N,N
881 | 880,10% off,N,N,N,N
882 | 881,Free Month,N,N,N,N
883 | 882,10% off,N,N,N,N
884 | 883,Free Month,N,N,N,N
885 | 884,10% off,N,N,N,N
886 | 885,Free Month,N,N,N,N
887 | 886,10% off,Y,Y,N,N
888 | 887,Free Month,N,N,N,N
889 | 888,10% off,N,N,N,N
890 | 889,Free Month,Y,N,N,N
891 | 890,10% off,N,N,N,N
892 | 891,Free Month,Y,N,N,N
893 | 892,10% off,N,N,N,N
894 | 893,Free Month,Y,Y,Y,Y
895 | 894,10% off,Y,Y,Y,Y
896 | 895,Free Month,Y,N,N,N
897 | 896,10% off,Y,N,N,N
898 | 897,Free Month,N,N,N,N
899 | 898,10% off,N,N,N,N
900 | 899,Free Month,N,N,N,N
901 | 900,10% off,N,N,N,N
902 | 901,Free Month,N,N,N,N
903 | 902,10% off,Y,N,N,N
904 | 903,Free Month,Y,N,N,N
905 | 904,10% off,N,N,N,N
906 | 905,Free Month,N,N,N,N
907 | 906,10% off,Y,N,N,N
908 | 907,Free Month,N,N,N,N
909 | 908,10% off,N,N,N,N
910 | 909,Free Month,N,N,N,N
911 | 910,10% off,N,N,N,N
912 | 911,Free Month,N,N,N,N
913 | 912,10% off,N,N,N,N
914 | 913,Free Month,Y,Y,N,N
915 | 914,10% off,N,N,N,N
916 | 915,Free Month,Y,N,N,N
917 | 916,10% off,N,N,N,N
918 | 917,Free Month,N,N,N,N
919 | 918,10% off,N,N,N,N
920 | 919,Free Month,N,N,N,N
921 | 920,10% off,N,N,N,N
922 | 921,Free Month,Y,Y,N,N
923 | 922,10% off,N,N,N,N
924 | 923,Free Month,N,N,N,N
925 | 924,10% off,N,N,N,N
926 | 925,Free Month,Y,N,N,N
927 | 926,10% off,N,N,N,N
928 | 927,Free Month,Y,N,N,N
929 | 928,10% off,N,N,N,N
930 | 929,Free Month,Y,N,N,N
931 | 930,10% off,N,N,N,N
932 | 931,Free Month,N,N,N,N
933 | 932,10% off,Y,Y,N,N
934 | 933,Free Month,N,N,N,N
935 | 934,10% off,Y,N,N,N
936 | 935,Free Month,N,N,N,N
937 | 936,10% off,N,N,N,N
938 | 937,Free Month,N,N,N,N
939 | 938,10% off,N,N,N,N
940 | 939,Free Month,Y,N,N,N
941 | 940,10% off,N,N,N,N
942 | 941,Free Month,N,N,N,N
943 | 942,10% off,Y,N,N,N
944 | 943,Free Month,N,N,N,N
945 | 944,10% off,N,N,N,N
946 | 945,Free Month,Y,N,N,N
947 | 946,10% off,N,N,N,N
948 | 947,Free Month,Y,N,N,N
949 | 948,10% off,N,N,N,N
950 | 949,Free Month,N,N,N,N
951 | 950,10% off,N,N,N,N
952 | 951,Free Month,Y,Y,N,N
953 | 952,10% off,N,N,N,N
954 | 953,Free Month,N,N,N,N
955 | 954,10% off,Y,Y,Y,Y
956 | 955,Free Month,N,N,N,N
957 | 956,10% off,Y,N,N,N
958 | 957,Free Month,N,N,N,N
959 | 958,10% off,N,N,N,N
960 | 959,Free Month,Y,N,N,N
961 | 960,10% off,N,N,N,N
962 | 961,Free Month,Y,Y,N,N
963 | 962,10% off,N,N,N,N
964 | 963,Free Month,N,N,N,N
965 | 964,10% off,Y,Y,Y,Y
966 | 965,Free Month,N,N,N,N
967 | 966,10% off,N,N,N,N
968 | 967,Free Month,N,N,N,N
969 | 968,10% off,Y,N,N,N
970 | 969,Free Month,N,N,N,N
971 | 970,10% off,Y,N,N,N
972 | 971,Free Month,N,N,N,N
973 | 972,10% off,N,N,N,N
974 | 973,Free Month,Y,Y,Y,Y
975 | 974,10% off,N,N,N,N
976 | 975,Free Month,N,N,N,N
977 | 976,10% off,Y,N,N,N
978 | 977,Free Month,N,N,N,N
979 | 978,10% off,Y,Y,Y,Y
980 | 979,Free Month,N,N,N,N
981 | 980,10% off,N,N,N,N
982 | 981,Free Month,Y,N,N,N
983 | 982,10% off,N,N,N,N
984 | 983,Free Month,N,N,N,N
985 | 984,10% off,N,N,N,N
986 | 985,Free Month,N,N,N,N
987 | 986,10% off,N,N,N,N
988 | 987,Free Month,Y,N,N,N
989 | 988,10% off,N,N,N,N
990 | 989,Free Month,N,N,N,N
991 | 990,10% off,N,N,N,N
992 | 991,Free Month,N,N,N,N
993 | 992,10% off,N,N,N,N
994 | 993,Free Month,N,N,N,N
995 | 994,10% off,Y,N,N,N
996 | 995,Free Month,N,N,N,N
997 | 996,10% off,N,N,N,N
998 | 997,Free Month,Y,N,N,N
999 | 998,10% off,Y,N,N,N
1000 | 999,Free Month,N,N,N,N
1001 | 1000,10% off,N,N,N,N
1002 | 1001,Free Month,Y,N,N,N
1003 | 1002,10% off,N,N,N,N
1004 | 1003,Free Month,Y,Y,N,N
1005 | 1004,10% off,Y,N,N,N
1006 | 1005,Free Month,N,N,N,N
1007 | 1006,10% off,Y,Y,Y,Y
1008 | 1007,Free Month,N,N,N,N
1009 | 1008,10% off,N,N,N,N
1010 | 1009,Free Month,Y,N,N,N
1011 | 1010,10% off,N,N,N,N
1012 | 1011,Free Month,N,N,N,N
1013 | 1012,10% off,N,N,N,N
1014 | 1013,Free Month,N,N,N,N
1015 | 1014,10% off,N,N,N,N
1016 | 1015,Free Month,N,N,N,N
1017 | 1016,10% off,N,N,N,N
1018 | 1017,Free Month,Y,Y,Y,Y
1019 | 1018,10% off,N,N,N,N
1020 | 1019,Free Month,Y,N,N,N
1021 | 1020,10% off,N,N,N,N
1022 | 1021,Free Month,Y,N,N,N
1023 | 1022,10% off,N,N,N,N
1024 | 1023,Free Month,N,N,N,N
1025 | 1024,10% off,N,N,N,N
1026 | 1025,Free Month,N,N,N,N
1027 | 1026,10% off,N,N,N,N
1028 | 1027,Free Month,N,N,N,N
1029 | 1028,10% off,N,N,N,N
1030 | 1029,Free Month,N,N,N,N
1031 | 1030,10% off,N,N,N,N
1032 | 1031,Free Month,N,N,N,N
1033 | 1032,10% off,Y,N,N,N
1034 | 1033,Free Month,Y,N,N,N
1035 | 1034,10% off,N,N,N,N
1036 | 1035,Free Month,Y,Y,Y,N
1037 | 1036,10% off,Y,N,N,N
1038 | 1037,Free Month,N,N,N,N
1039 | 1038,10% off,N,N,N,N
1040 | 1039,Free Month,N,N,N,N
1041 | 1040,10% off,N,N,N,N
1042 | 1041,Free Month,N,N,N,N
1043 | 1042,10% off,N,N,N,N
1044 | 1043,Free Month,N,N,N,N
1045 | 1044,10% off,Y,N,N,N
1046 | 1045,Free Month,N,N,N,N
1047 | 1046,10% off,N,N,N,N
1048 | 1047,Free Month,N,N,N,N
1049 | 1048,10% off,N,N,N,N
1050 | 1049,Free Month,N,N,N,N
1051 | 1050,10% off,N,N,N,N
1052 | 1051,Free Month,Y,N,N,N
1053 | 1052,10% off,N,N,N,N
1054 | 1053,Free Month,N,N,N,N
1055 | 1054,10% off,N,N,N,N
1056 | 1055,Free Month,N,N,N,N
1057 | 1056,10% off,N,N,N,N
1058 | 1057,Free Month,N,N,N,N
1059 | 1058,10% off,Y,N,N,N
1060 | 1059,Free Month,Y,Y,Y,Y
1061 | 1060,10% off,Y,N,N,N
1062 | 1061,Free Month,N,N,N,N
1063 | 1062,10% off,N,N,N,N
1064 | 1063,Free Month,Y,N,N,N
1065 | 1064,10% off,N,N,N,N
1066 | 1065,Free Month,N,N,N,N
1067 | 1066,10% off,N,N,N,N
1068 | 1067,Free Month,N,N,N,N
1069 | 1068,10% off,N,N,N,N
1070 | 1069,Free Month,Y,N,N,N
1071 | 1070,10% off,N,N,N,N
1072 | 1071,Free Month,Y,Y,Y,N
1073 | 1072,10% off,Y,N,N,N
1074 | 1073,Free Month,N,N,N,N
1075 | 1074,10% off,N,N,N,N
1076 | 1075,Free Month,N,N,N,N
1077 | 1076,10% off,N,N,N,N
1078 | 1077,Free Month,N,N,N,N
1079 | 1078,10% off,N,N,N,N
1080 | 1079,Free Month,Y,N,N,N
1081 | 1080,10% off,Y,N,N,N
1082 | 1081,Free Month,N,N,N,N
1083 | 1082,10% off,Y,N,N,N
1084 | 1083,Free Month,N,N,N,N
1085 | 1084,10% off,Y,N,N,N
1086 | 1085,Free Month,Y,Y,N,N
1087 | 1086,10% off,N,N,N,N
1088 | 1087,Free Month,N,N,N,N
1089 | 1088,10% off,N,N,N,N
1090 | 1089,Free Month,Y,Y,N,N
1091 | 1090,10% off,N,N,N,N
1092 | 1091,Free Month,N,N,N,N
1093 | 1092,10% off,N,N,N,N
1094 | 1093,Free Month,N,N,N,N
1095 | 1094,10% off,N,N,N,N
1096 | 1095,Free Month,N,N,N,N
1097 | 1096,10% off,N,N,N,N
1098 | 1097,Free Month,Y,N,N,N
1099 | 1098,10% off,Y,N,N,N
1100 | 1099,Free Month,Y,Y,Y,Y
1101 | 1100,10% off,N,N,N,N
1102 | 1101,Free Month,N,N,N,N
1103 | 1102,10% off,N,N,N,N
1104 | 1103,Free Month,N,N,N,N
1105 | 1104,10% off,N,N,N,N
1106 | 1105,Free Month,Y,Y,Y,N
1107 | 1106,10% off,Y,Y,Y,Y
1108 | 1107,Free Month,N,N,N,N
1109 | 1108,10% off,N,N,N,N
1110 | 1109,Free Month,Y,Y,N,N
1111 | 1110,10% off,Y,Y,Y,Y
1112 | 1111,Free Month,Y,Y,Y,Y
1113 | 1112,10% off,Y,N,N,N
1114 | 1113,Free Month,N,N,N,N
1115 | 1114,10% off,N,N,N,N
1116 | 1115,Free Month,N,N,N,N
1117 | 1116,10% off,N,N,N,N
1118 | 1117,Free Month,Y,Y,Y,N
1119 | 1118,10% off,Y,N,N,N
1120 | 1119,Free Month,Y,N,N,N
1121 | 1120,10% off,Y,Y,Y,Y
1122 | 1121,Free Month,Y,Y,Y,Y
1123 | 1122,10% off,N,N,N,N
1124 | 1123,Free Month,N,N,N,N
1125 | 1124,10% off,N,N,N,N
1126 | 1125,Free Month,N,N,N,N
1127 | 1126,10% off,N,N,N,N
1128 | 1127,Free Month,Y,N,N,N
1129 | 1128,10% off,N,N,N,N
1130 | 1129,Free Month,N,N,N,N
1131 | 1130,10% off,N,N,N,N
1132 | 1131,Free Month,N,N,N,N
1133 | 1132,10% off,N,N,N,N
1134 | 1133,Free Month,Y,Y,N,N
1135 | 1134,10% off,N,N,N,N
1136 | 1135,Free Month,Y,N,N,N
1137 | 1136,10% off,Y,N,N,N
1138 | 1137,Free Month,N,N,N,N
1139 | 1138,10% off,Y,Y,Y,Y
1140 | 1139,Free Month,Y,Y,Y,N
1141 | 1140,10% off,Y,Y,N,N
1142 | 1141,Free Month,Y,Y,N,N
1143 | 1142,10% off,N,N,N,N
1144 | 1143,Free Month,N,N,N,N
1145 | 1144,10% off,N,N,N,N
1146 | 1145,Free Month,Y,Y,N,N
1147 | 1146,10% off,N,N,N,N
1148 | 1147,Free Month,N,N,N,N
1149 | 1148,10% off,N,N,N,N
1150 | 1149,Free Month,N,N,N,N
1151 | 1150,10% off,Y,N,N,N
1152 | 1151,Free Month,N,N,N,N
1153 | 1152,10% off,N,N,N,N
1154 | 1153,Free Month,N,N,N,N
1155 | 1154,10% off,Y,Y,Y,Y
1156 | 1155,Free Month,Y,N,N,N
1157 | 1156,10% off,N,N,N,N
1158 | 1157,Free Month,N,N,N,N
1159 | 1158,10% off,N,N,N,N
1160 | 1159,Free Month,N,N,N,N
1161 | 1160,10% off,Y,Y,Y,Y
1162 | 1161,Free Month,Y,N,N,N
1163 | 1162,10% off,N,N,N,N
1164 | 1163,Free Month,Y,Y,Y,Y
1165 | 1164,10% off,N,N,N,N
1166 | 1165,Free Month,N,N,N,N
1167 | 1166,10% off,N,N,N,N
1168 | 1167,Free Month,N,N,N,N
1169 | 1168,10% off,Y,Y,Y,Y
1170 | 1169,Free Month,Y,N,N,N
1171 | 1170,10% off,N,N,N,N
1172 | 1171,Free Month,Y,Y,Y,Y
1173 | 1172,10% off,N,N,N,N
1174 | 1173,Free Month,N,N,N,N
1175 | 1174,10% off,Y,Y,N,N
1176 | 1175,Free Month,N,N,N,N
1177 | 1176,10% off,N,N,N,N
1178 | 1177,Free Month,Y,N,N,N
1179 | 1178,10% off,N,N,N,N
1180 | 1179,Free Month,N,N,N,N
1181 | 1180,10% off,N,N,N,N
1182 | 1181,Free Month,Y,N,N,N
1183 | 1182,10% off,N,N,N,N
1184 | 1183,Free Month,N,N,N,N
1185 | 1184,10% off,Y,Y,N,N
1186 | 1185,Free Month,N,N,N,N
1187 | 1186,10% off,N,N,N,N
1188 | 1187,Free Month,N,N,N,N
1189 | 1188,10% off,Y,N,N,N
1190 | 1189,Free Month,Y,Y,Y,Y
1191 | 1190,10% off,N,N,N,N
1192 | 1191,Free Month,N,N,N,N
1193 | 1192,10% off,N,N,N,N
1194 | 1193,Free Month,Y,N,N,N
1195 | 1194,10% off,N,N,N,N
1196 | 1195,Free Month,N,N,N,N
1197 | 1196,10% off,N,N,N,N
1198 | 1197,Free Month,N,N,N,N
1199 | 1198,10% off,N,N,N,N
1200 | 1199,Free Month,Y,Y,Y,Y
1201 | 1200,10% off,N,N,N,N
1202 | 1201,Free Month,Y,N,N,N
1203 | 1202,10% off,N,N,N,N
1204 | 1203,Free Month,N,N,N,N
1205 | 1204,10% off,Y,Y,Y,N
1206 | 1205,Free Month,Y,Y,N,N
1207 | 1206,10% off,Y,Y,N,N
1208 | 1207,Free Month,Y,Y,N,N
1209 | 1208,10% off,N,N,N,N
1210 | 1209,Free Month,Y,N,N,N
1211 | 1210,10% off,Y,N,N,N
1212 | 1211,Free Month,Y,N,N,N
1213 | 1212,10% off,Y,N,N,N
1214 | 1213,Free Month,Y,Y,Y,Y
1215 | 1214,10% off,Y,N,N,N
1216 | 1215,Free Month,N,N,N,N
1217 | 1216,10% off,N,N,N,N
1218 | 1217,Free Month,N,N,N,N
1219 | 1218,10% off,N,N,N,N
1220 | 1219,Free Month,N,N,N,N
1221 | 1220,10% off,N,N,N,N
1222 | 1221,Free Month,Y,N,N,N
1223 | 1222,10% off,Y,N,N,N
1224 | 1223,Free Month,N,N,N,N
1225 | 1224,10% off,Y,Y,Y,Y
1226 | 1225,Free Month,N,N,N,N
1227 | 1226,10% off,N,N,N,N
1228 | 1227,Free Month,N,N,N,N
1229 | 1228,10% off,N,N,N,N
1230 | 1229,Free Month,N,N,N,N
1231 | 1230,10% off,N,N,N,N
1232 | 1231,Free Month,Y,Y,Y,Y
1233 | 1232,10% off,N,N,N,N
1234 | 1233,Free Month,N,N,N,N
1235 | 1234,10% off,N,N,N,N
1236 | 1235,Free Month,N,N,N,N
1237 | 1236,10% off,N,N,N,N
1238 | 1237,Free Month,N,N,N,N
1239 | 1238,10% off,N,N,N,N
1240 | 1239,Free Month,Y,N,N,N
1241 | 1240,10% off,Y,N,N,N
1242 | 1241,Free Month,N,N,N,N
1243 | 1242,10% off,N,N,N,N
1244 | 1243,Free Month,N,N,N,N
1245 | 1244,10% off,N,N,N,N
1246 | 1245,Free Month,Y,Y,Y,Y
1247 | 1246,10% off,N,N,N,N
1248 | 1247,Free Month,Y,N,N,N
1249 | 1248,10% off,N,N,N,N
1250 | 1249,Free Month,N,N,N,N
1251 | 1250,10% off,N,N,N,N
1252 | 1251,Free Month,N,N,N,N
1253 | 1252,10% off,Y,Y,Y,Y
1254 | 1253,Free Month,N,N,N,N
1255 | 1254,10% off,N,N,N,N
1256 | 1255,Free Month,N,N,N,N
1257 | 1256,10% off,N,N,N,N
1258 | 1257,Free Month,Y,Y,Y,Y
1259 | 1258,10% off,Y,Y,Y,Y
1260 | 1259,Free Month,Y,Y,N,N
1261 | 1260,10% off,Y,N,N,N
1262 | 1261,Free Month,N,N,N,N
1263 | 1262,10% off,Y,N,N,N
1264 | 1263,Free Month,Y,N,N,N
1265 | 1264,10% off,N,N,N,N
1266 | 1265,Free Month,N,N,N,N
1267 | 1266,10% off,N,N,N,N
1268 | 1267,Free Month,Y,N,N,N
1269 | 1268,10% off,Y,N,N,N
1270 | 1269,Free Month,Y,Y,Y,N
1271 | 1270,10% off,N,N,N,N
1272 | 1271,Free Month,N,N,N,N
1273 | 1272,10% off,Y,N,N,N
1274 | 1273,Free Month,N,N,N,N
1275 | 1274,10% off,Y,Y,Y,Y
1276 | 1275,Free Month,N,N,N,N
1277 | 1276,10% off,Y,Y,Y,Y
1278 | 1277,Free Month,Y,N,N,N
1279 | 1278,10% off,Y,Y,Y,Y
1280 | 1279,Free Month,N,N,N,N
1281 | 1280,10% off,Y,N,N,N
1282 | 1281,Free Month,Y,Y,N,N
1283 | 1282,10% off,N,N,N,N
1284 | 1283,Free Month,Y,N,N,N
1285 | 1284,10% off,Y,N,N,N
1286 | 1285,Free Month,N,N,N,N
1287 | 1286,10% off,N,N,N,N
1288 | 1287,Free Month,N,N,N,N
1289 | 1288,10% off,Y,Y,Y,Y
1290 | 1289,Free Month,N,N,N,N
1291 | 1290,10% off,N,N,N,N
1292 | 1291,Free Month,N,N,N,N
1293 | 1292,10% off,N,N,N,N
1294 | 1293,Free Month,Y,Y,Y,N
1295 | 1294,10% off,N,N,N,N
1296 | 1295,Free Month,Y,N,N,N
1297 | 1296,10% off,N,N,N,N
1298 | 1297,Free Month,Y,Y,N,N
1299 | 1298,10% off,N,N,N,N
1300 | 1299,Free Month,Y,Y,Y,Y
1301 | 1300,10% off,N,N,N,N
1302 | 1301,Free Month,Y,Y,Y,Y
1303 | 1302,10% off,Y,N,N,N
1304 | 1303,Free Month,Y,Y,Y,Y
1305 | 1304,10% off,N,N,N,N
1306 | 1305,Free Month,N,N,N,N
1307 | 1306,10% off,Y,N,N,N
1308 | 1307,Free Month,N,N,N,N
1309 | 1308,10% off,N,N,N,N
1310 | 1309,Free Month,N,N,N,N
1311 | 1310,10% off,N,N,N,N
1312 | 1311,Free Month,N,N,N,N
1313 | 1312,10% off,N,N,N,N
1314 | 1313,Free Month,N,N,N,N
1315 | 1314,10% off,N,N,N,N
1316 | 1315,Free Month,N,N,N,N
1317 | 1316,10% off,N,N,N,N
1318 | 1317,Free Month,N,N,N,N
1319 | 1318,10% off,N,N,N,N
1320 | 1319,Free Month,Y,N,N,N
1321 | 1320,10% off,Y,Y,Y,Y
1322 | 1321,Free Month,Y,N,N,N
1323 | 1322,10% off,Y,N,N,N
1324 | 1323,Free Month,N,N,N,N
1325 | 1324,10% off,N,N,N,N
1326 | 1325,Free Month,N,N,N,N
1327 | 1326,10% off,N,N,N,N
1328 | 1327,Free Month,N,N,N,N
1329 | 1328,10% off,Y,Y,Y,Y
1330 | 1329,Free Month,Y,Y,Y,N
1331 | 1330,10% off,N,N,N,N
1332 | 1331,Free Month,N,N,N,N
1333 | 1332,10% off,N,N,N,N
1334 | 1333,Free Month,Y,Y,N,N
1335 | 1334,10% off,Y,Y,Y,Y
1336 | 1335,Free Month,Y,N,N,N
1337 | 1336,10% off,N,N,N,N
1338 | 1337,Free Month,N,N,N,N
1339 | 1338,10% off,N,N,N,N
1340 | 1339,Free Month,Y,N,N,N
1341 | 1340,10% off,Y,N,N,N
1342 | 1341,Free Month,Y,N,N,N
1343 | 1342,10% off,N,N,N,N
1344 | 1343,Free Month,N,N,N,N
1345 | 1344,10% off,N,N,N,N
1346 | 1345,Free Month,N,N,N,N
1347 | 1346,10% off,N,N,N,N
1348 | 1347,Free Month,Y,Y,Y,Y
1349 | 1348,10% off,N,N,N,N
1350 | 1349,Free Month,N,N,N,N
1351 | 1350,10% off,N,N,N,N
1352 | 1351,Free Month,Y,N,N,N
1353 | 1352,10% off,Y,Y,N,N
1354 | 1353,Free Month,Y,Y,Y,N
1355 | 1354,10% off,N,N,N,N
1356 | 1355,Free Month,Y,Y,Y,N
1357 | 1356,10% off,N,N,N,N
1358 | 1357,Free Month,Y,N,N,N
1359 | 1358,10% off,N,N,N,N
1360 | 1359,Free Month,Y,Y,N,N
1361 | 1360,10% off,N,N,N,N
1362 | 1361,Free Month,N,N,N,N
1363 | 1362,10% off,N,N,N,N
1364 | 1363,Free Month,N,N,N,N
1365 | 1364,10% off,N,N,N,N
1366 | 1365,Free Month,Y,Y,Y,Y
1367 | 1366,10% off,N,N,N,N
1368 | 1367,Free Month,N,N,N,N
1369 | 1368,10% off,N,N,N,N
1370 | 1369,Free Month,N,N,N,N
1371 | 1370,10% off,N,N,N,N
1372 | 1371,Free Month,N,N,N,N
1373 | 1372,10% off,N,N,N,N
1374 | 1373,Free Month,N,N,N,N
1375 | 1374,10% off,N,N,N,N
1376 | 1375,Free Month,N,N,N,N
1377 | 1376,10% off,N,N,N,N
1378 | 1377,Free Month,N,N,N,N
1379 | 1378,10% off,Y,Y,N,N
1380 | 1379,Free Month,N,N,N,N
1381 | 1380,10% off,N,N,N,N
1382 | 1381,Free Month,N,N,N,N
1383 | 1382,10% off,Y,Y,Y,Y
1384 | 1383,Free Month,N,N,N,N
1385 | 1384,10% off,Y,Y,Y,Y
1386 | 1385,Free Month,Y,Y,Y,Y
1387 | 1386,10% off,N,N,N,N
1388 | 1387,Free Month,Y,Y,Y,Y
1389 | 1388,10% off,Y,N,N,N
1390 | 1389,Free Month,Y,Y,Y,Y
1391 | 1390,10% off,N,N,N,N
1392 | 1391,Free Month,Y,N,N,N
1393 | 1392,10% off,N,N,N,N
1394 | 1393,Free Month,N,N,N,N
1395 | 1394,10% off,Y,Y,Y,Y
1396 | 1395,Free Month,N,N,N,N
1397 | 1396,10% off,Y,Y,Y,Y
1398 | 1397,Free Month,N,N,N,N
1399 | 1398,10% off,Y,Y,Y,Y
1400 | 1399,Free Month,Y,Y,Y,Y
1401 | 1400,10% off,N,N,N,N
1402 | 1401,Free Month,N,N,N,N
1403 | 1402,10% off,Y,N,N,N
1404 | 1403,Free Month,N,N,N,N
1405 | 1404,10% off,N,N,N,N
1406 | 1405,Free Month,N,N,N,N
1407 | 1406,10% off,N,N,N,N
1408 | 1407,Free Month,N,N,N,N
1409 | 1408,10% off,N,N,N,N
1410 | 1409,Free Month,Y,N,N,N
1411 | 1410,10% off,Y,N,N,N
1412 | 1411,Free Month,Y,Y,Y,N
1413 | 1412,10% off,Y,N,N,N
1414 | 1413,Free Month,N,N,N,N
1415 | 1414,10% off,N,N,N,N
1416 | 1415,Free Month,N,N,N,N
1417 | 1416,10% off,Y,Y,Y,Y
1418 | 1417,Free Month,Y,N,N,N
1419 | 1418,10% off,N,N,N,N
1420 | 1419,Free Month,Y,N,N,N
1421 | 1420,10% off,N,N,N,N
1422 | 1421,Free Month,Y,N,N,N
1423 | 1422,10% off,Y,Y,Y,Y
1424 | 1423,Free Month,N,N,N,N
1425 | 1424,10% off,N,N,N,N
1426 | 1425,Free Month,Y,N,N,N
1427 | 1426,10% off,N,N,N,N
1428 | 1427,Free Month,N,N,N,N
1429 | 1428,10% off,Y,Y,Y,Y
1430 | 1429,Free Month,N,N,N,N
1431 | 1430,10% off,N,N,N,N
1432 | 1431,Free Month,Y,N,N,N
1433 | 1432,10% off,Y,Y,Y,Y
1434 | 1433,Free Month,N,N,N,N
1435 | 1434,10% off,Y,N,N,N
1436 | 1435,Free Month,N,N,N,N
1437 | 1436,10% off,N,N,N,N
1438 | 1437,Free Month,N,N,N,N
1439 | 1438,10% off,Y,Y,N,N
1440 | 1439,Free Month,Y,N,N,N
1441 | 1440,10% off,Y,N,N,N
1442 | 1441,Free Month,Y,Y,Y,N
1443 | 1442,10% off,Y,N,N,N
1444 | 1443,Free Month,Y,N,N,N
1445 | 1444,10% off,N,N,N,N
1446 | 1445,Free Month,Y,Y,Y,Y
1447 | 1446,10% off,N,N,N,N
1448 | 1447,Free Month,Y,N,N,N
1449 | 1448,10% off,N,N,N,N
1450 | 1449,Free Month,Y,N,N,N
1451 | 1450,10% off,N,N,N,N
1452 | 1451,Free Month,N,N,N,N
1453 | 1452,10% off,Y,Y,Y,Y
1454 | 1453,Free Month,N,N,N,N
1455 | 1454,10% off,N,N,N,N
1456 | 1455,Free Month,N,N,N,N
1457 | 1456,10% off,Y,N,N,N
1458 | 1457,Free Month,Y,N,N,N
1459 | 1458,10% off,Y,Y,Y,Y
1460 | 1459,Free Month,N,N,N,N
1461 | 1460,10% off,N,N,N,N
1462 | 1461,Free Month,Y,Y,N,N
1463 | 1462,10% off,Y,Y,Y,Y
1464 | 1463,Free Month,N,N,N,N
1465 | 1464,10% off,Y,Y,Y,Y
1466 | 1465,Free Month,N,N,N,N
1467 | 1466,10% off,N,N,N,N
1468 | 1467,Free Month,N,N,N,N
1469 | 1468,10% off,N,N,N,N
1470 | 1469,Free Month,N,N,N,N
1471 | 1470,10% off,N,N,N,N
1472 | 1471,Free Month,Y,Y,Y,Y
1473 | 1472,10% off,Y,N,N,N
1474 | 1473,Free Month,N,N,N,N
1475 | 1474,10% off,Y,N,N,N
1476 | 1475,Free Month,Y,N,N,N
1477 | 1476,10% off,N,N,N,N
1478 | 1477,Free Month,N,N,N,N
1479 | 1478,10% off,Y,N,N,N
1480 | 1479,Free Month,Y,N,N,N
1481 | 1480,10% off,Y,N,N,N
1482 | 1481,Free Month,N,N,N,N
1483 | 1482,10% off,N,N,N,N
1484 | 1483,Free Month,N,N,N,N
1485 | 1484,10% off,N,N,N,N
1486 | 1485,Free Month,Y,N,N,N
1487 | 1486,10% off,Y,N,N,N
1488 | 1487,Free Month,Y,N,N,N
1489 | 1488,10% off,N,N,N,N
1490 | 1489,Free Month,Y,Y,N,N
1491 | 1490,10% off,N,N,N,N
1492 | 1491,Free Month,N,N,N,N
1493 | 1492,10% off,N,N,N,N
1494 | 1493,Free Month,N,N,N,N
1495 | 1494,10% off,N,N,N,N
1496 | 1495,Free Month,Y,N,N,N
1497 | 1496,10% off,N,N,N,N
1498 | 1497,Free Month,N,N,N,N
1499 | 1498,10% off,N,N,N,N
1500 | 1499,Free Month,N,N,N,N
1501 | 1500,10% off,N,N,N,N
1502 | 1501,Free Month,N,N,N,N
1503 | 1502,10% off,N,N,N,N
1504 | 1503,Free Month,Y,N,N,N
1505 | 1504,10% off,N,N,N,N
1506 | 1505,Free Month,N,N,N,N
1507 | 1506,10% off,Y,N,N,N
1508 | 1507,Free Month,N,N,N,N
1509 | 1508,10% off,N,N,N,N
1510 | 1509,Free Month,Y,N,N,N
1511 | 1510,10% off,Y,Y,Y,Y
1512 | 1511,Free Month,N,N,N,N
1513 | 1512,10% off,N,N,N,N
1514 | 1513,Free Month,Y,Y,Y,Y
1515 | 1514,10% off,Y,Y,Y,Y
1516 | 1515,Free Month,Y,N,N,N
1517 | 1516,10% off,N,N,N,N
1518 | 1517,Free Month,N,N,N,N
1519 | 1518,10% off,N,N,N,N
1520 | 1519,Free Month,N,N,N,N
1521 | 1520,10% off,N,N,N,N
1522 | 1521,Free Month,N,N,N,N
1523 | 1522,10% off,N,N,N,N
1524 | 1523,Free Month,Y,N,N,N
1525 | 1524,10% off,N,N,N,N
1526 | 1525,Free Month,Y,Y,N,N
1527 | 1526,10% off,N,N,N,N
1528 | 1527,Free Month,N,N,N,N
1529 | 1528,10% off,N,N,N,N
1530 | 1529,Free Month,N,N,N,N
1531 | 1530,10% off,N,N,N,N
1532 | 1531,Free Month,N,N,N,N
1533 | 1532,10% off,Y,N,N,N
1534 | 1533,Free Month,N,N,N,N
1535 | 1534,10% off,N,N,N,N
1536 | 1535,Free Month,Y,Y,Y,Y
1537 | 1536,10% off,N,N,N,N
1538 | 1537,Free Month,Y,N,N,N
1539 | 1538,10% off,N,N,N,N
1540 | 1539,Free Month,N,N,N,N
1541 | 1540,10% off,N,N,N,N
1542 | 1541,Free Month,Y,Y,Y,Y
1543 | 1542,10% off,Y,N,N,N
1544 | 1543,Free Month,N,N,N,N
1545 | 1544,10% off,N,N,N,N
1546 | 1545,Free Month,Y,N,N,N
1547 | 1546,10% off,Y,N,N,N
1548 | 1547,Free Month,Y,Y,N,N
1549 | 1548,10% off,Y,Y,N,N
1550 | 1549,Free Month,N,N,N,N
1551 | 1550,10% off,N,N,N,N
1552 | 1551,Free Month,N,N,N,N
1553 | 1552,10% off,N,N,N,N
1554 | 1553,Free Month,N,N,N,N
1555 | 1554,10% off,N,N,N,N
1556 | 1555,Free Month,Y,N,N,N
1557 | 1556,10% off,N,N,N,N
1558 | 1557,Free Month,N,N,N,N
1559 | 1558,10% off,N,N,N,N
1560 | 1559,Free Month,Y,Y,N,N
1561 | 1560,10% off,N,N,N,N
1562 | 1561,Free Month,N,N,N,N
1563 | 1562,10% off,Y,N,N,N
1564 | 1563,Free Month,Y,N,N,N
1565 | 1564,10% off,N,N,N,N
1566 | 1565,Free Month,N,N,N,N
1567 | 1566,10% off,N,N,N,N
1568 | 1567,Free Month,N,N,N,N
1569 | 1568,10% off,N,N,N,N
1570 | 1569,Free Month,Y,N,N,N
1571 | 1570,10% off,N,N,N,N
1572 | 1571,Free Month,N,N,N,N
1573 | 1572,10% off,N,N,N,N
1574 | 1573,Free Month,Y,N,N,N
1575 | 1574,10% off,N,N,N,N
1576 | 1575,Free Month,N,N,N,N
1577 | 1576,10% off,Y,Y,Y,Y
1578 | 1577,Free Month,Y,Y,N,N
1579 | 1578,10% off,N,N,N,N
1580 | 1579,Free Month,N,N,N,N
1581 | 1580,10% off,N,N,N,N
1582 | 1581,Free Month,N,N,N,N
1583 | 1582,10% off,N,N,N,N
1584 | 1583,Free Month,Y,Y,Y,Y
1585 | 1584,10% off,N,N,N,N
1586 | 1585,Free Month,N,N,N,N
1587 | 1586,10% off,N,N,N,N
1588 | 1587,Free Month,N,N,N,N
1589 | 1588,10% off,N,N,N,N
1590 | 1589,Free Month,N,N,N,N
1591 | 1590,10% off,Y,N,N,N
1592 | 1591,Free Month,N,N,N,N
1593 | 1592,10% off,N,N,N,N
1594 | 1593,Free Month,N,N,N,N
1595 | 1594,10% off,N,N,N,N
1596 | 1595,Free Month,N,N,N,N
1597 | 1596,10% off,N,N,N,N
1598 | 1597,Free Month,N,N,N,N
1599 | 1598,10% off,N,N,N,N
1600 | 1599,Free Month,N,N,N,N
1601 | 1600,10% off,N,N,N,N
1602 | 1601,Free Month,N,N,N,N
1603 | 1602,10% off,Y,N,N,N
1604 | 1603,Free Month,N,N,N,N
1605 | 1604,10% off,N,N,N,N
1606 | 1605,Free Month,Y,N,N,N
1607 | 1606,10% off,Y,Y,Y,Y
1608 | 1607,Free Month,N,N,N,N
1609 | 1608,10% off,N,N,N,N
1610 | 1609,Free Month,N,N,N,N
1611 | 1610,10% off,N,N,N,N
1612 | 1611,Free Month,N,N,N,N
1613 | 1612,10% off,Y,N,N,N
1614 | 1613,Free Month,N,N,N,N
1615 | 1614,10% off,N,N,N,N
1616 | 1615,Free Month,Y,N,N,N
1617 | 1616,10% off,Y,Y,Y,Y
1618 | 1617,Free Month,N,N,N,N
1619 | 1618,10% off,Y,Y,Y,Y
1620 | 1619,Free Month,N,N,N,N
1621 | 1620,10% off,N,N,N,N
1622 | 1621,Free Month,Y,Y,Y,Y
1623 | 1622,10% off,N,N,N,N
1624 | 1623,Free Month,Y,Y,Y,Y
1625 | 1624,10% off,N,N,N,N
1626 | 1625,Free Month,N,N,N,N
1627 | 1626,10% off,N,N,N,N
1628 | 1627,Free Month,Y,N,N,N
1629 | 1628,10% off,N,N,N,N
1630 | 1629,Free Month,Y,N,N,N
1631 | 1630,10% off,Y,N,N,N
1632 | 1631,Free Month,Y,N,N,N
1633 | 1632,10% off,N,N,N,N
1634 | 1633,Free Month,Y,N,N,N
1635 | 1634,10% off,Y,Y,N,N
1636 | 1635,Free Month,N,N,N,N
1637 | 1636,10% off,Y,N,N,N
1638 | 1637,Free Month,N,N,N,N
1639 | 1638,10% off,N,N,N,N
1640 | 1639,Free Month,N,N,N,N
1641 | 1640,10% off,N,N,N,N
1642 | 1641,Free Month,N,N,N,N
1643 | 1642,10% off,N,N,N,N
1644 | 1643,Free Month,Y,Y,N,N
1645 | 1644,10% off,N,N,N,N
1646 | 1645,Free Month,N,N,N,N
1647 | 1646,10% off,Y,N,N,N
1648 | 1647,Free Month,N,N,N,N
1649 | 1648,10% off,Y,N,N,N
1650 | 1649,Free Month,N,N,N,N
1651 | 1650,10% off,N,N,N,N
1652 | 1651,Free Month,Y,N,N,N
1653 | 1652,10% off,N,N,N,N
1654 | 1653,Free Month,N,N,N,N
1655 | 1654,10% off,Y,N,N,N
1656 | 1655,Free Month,N,N,N,N
1657 | 1656,10% off,Y,Y,N,N
1658 | 1657,Free Month,N,N,N,N
1659 | 1658,10% off,N,N,N,N
1660 | 1659,Free Month,N,N,N,N
1661 | 1660,10% off,N,N,N,N
1662 | 1661,Free Month,N,N,N,N
1663 | 1662,10% off,Y,N,N,N
1664 | 1663,Free Month,N,N,N,N
1665 | 1664,10% off,N,N,N,N
1666 | 1665,Free Month,N,N,N,N
1667 | 1666,10% off,Y,Y,N,N
1668 | 1667,Free Month,N,N,N,N
1669 | 1668,10% off,Y,N,N,N
1670 | 1669,Free Month,Y,Y,Y,Y
1671 | 1670,10% off,N,N,N,N
1672 | 1671,Free Month,N,N,N,N
1673 | 1672,10% off,N,N,N,N
1674 | 1673,Free Month,N,N,N,N
1675 | 1674,10% off,N,N,N,N
1676 | 1675,Free Month,N,N,N,N
1677 | 1676,10% off,N,N,N,N
1678 | 1677,Free Month,Y,N,N,N
1679 | 1678,10% off,N,N,N,N
1680 | 1679,Free Month,N,N,N,N
1681 | 1680,10% off,Y,Y,N,N
1682 | 1681,Free Month,N,N,N,N
1683 | 1682,10% off,N,N,N,N
1684 | 1683,Free Month,N,N,N,N
1685 | 1684,10% off,N,N,N,N
1686 | 1685,Free Month,N,N,N,N
1687 | 1686,10% off,Y,Y,Y,Y
1688 | 1687,Free Month,N,N,N,N
1689 | 1688,10% off,Y,Y,Y,Y
1690 | 1689,Free Month,N,N,N,N
1691 | 1690,10% off,N,N,N,N
1692 | 1691,Free Month,N,N,N,N
1693 | 1692,10% off,N,N,N,N
1694 | 1693,Free Month,N,N,N,N
1695 | 1694,10% off,Y,N,N,N
1696 | 1695,Free Month,Y,N,N,N
1697 | 1696,10% off,N,N,N,N
1698 | 1697,Free Month,Y,Y,Y,Y
1699 | 1698,10% off,Y,Y,Y,Y
1700 | 1699,Free Month,Y,N,N,N
1701 | 1700,10% off,N,N,N,N
1702 | 1701,Free Month,N,N,N,N
1703 | 1702,10% off,Y,Y,N,N
1704 | 1703,Free Month,N,N,N,N
1705 | 1704,10% off,N,N,N,N
1706 | 1705,Free Month,Y,N,N,N
1707 | 1706,10% off,N,N,N,N
1708 | 1707,Free Month,N,N,N,N
1709 | 1708,10% off,N,N,N,N
1710 | 1709,Free Month,Y,N,N,N
1711 | 1710,10% off,N,N,N,N
1712 | 1711,Free Month,N,N,N,N
1713 | 1712,10% off,N,N,N,N
1714 | 1713,Free Month,N,N,N,N
1715 | 1714,10% off,N,N,N,N
1716 | 1715,Free Month,N,N,N,N
1717 | 1716,10% off,Y,N,N,N
1718 | 1717,Free Month,Y,Y,Y,Y
1719 | 1718,10% off,Y,N,N,N
1720 | 1719,Free Month,Y,N,N,N
1721 | 1720,10% off,Y,N,N,N
1722 | 1721,Free Month,N,N,N,N
1723 | 1722,10% off,N,N,N,N
1724 | 1723,Free Month,N,N,N,N
1725 | 1724,10% off,N,N,N,N
1726 | 1725,Free Month,N,N,N,N
1727 | 1726,10% off,N,N,N,N
1728 | 1727,Free Month,N,N,N,N
1729 | 1728,10% off,N,N,N,N
1730 | 1729,Free Month,Y,N,N,N
1731 | 1730,10% off,N,N,N,N
1732 | 1731,Free Month,Y,Y,Y,N
1733 | 1732,10% off,N,N,N,N
1734 | 1733,Free Month,Y,N,N,N
1735 | 1734,10% off,N,N,N,N
1736 | 1735,Free Month,Y,Y,Y,Y
1737 | 1736,10% off,Y,Y,Y,Y
1738 | 1737,Free Month,Y,N,N,N
1739 | 1738,10% off,N,N,N,N
1740 | 1739,Free Month,Y,Y,N,N
1741 | 1740,10% off,N,N,N,N
1742 | 1741,Free Month,N,N,N,N
1743 | 1742,10% off,N,N,N,N
1744 | 1743,Free Month,Y,Y,Y,Y
1745 | 1744,10% off,N,N,N,N
1746 | 1745,Free Month,Y,Y,N,N
1747 | 1746,10% off,N,N,N,N
1748 | 1747,Free Month,N,N,N,N
1749 | 1748,10% off,N,N,N,N
1750 | 1749,Free Month,N,N,N,N
1751 | 1750,10% off,N,N,N,N
1752 | 1751,Free Month,N,N,N,N
1753 | 1752,10% off,N,N,N,N
1754 | 1753,Free Month,N,N,N,N
1755 | 1754,10% off,Y,N,N,N
1756 | 1755,Free Month,N,N,N,N
1757 | 1756,10% off,N,N,N,N
1758 | 1757,Free Month,N,N,N,N
1759 | 1758,10% off,N,N,N,N
1760 | 1759,Free Month,N,N,N,N
1761 | 1760,10% off,Y,Y,Y,Y
1762 | 1761,Free Month,Y,N,N,N
1763 | 1762,10% off,N,N,N,N
1764 | 1763,Free Month,N,N,N,N
1765 | 1764,10% off,N,N,N,N
1766 | 1765,Free Month,Y,Y,Y,N
1767 | 1766,10% off,N,N,N,N
1768 | 1767,Free Month,Y,Y,Y,Y
1769 | 1768,10% off,N,N,N,N
1770 | 1769,Free Month,Y,N,N,N
1771 | 1770,10% off,N,N,N,N
1772 | 1771,Free Month,N,N,N,N
1773 | 1772,10% off,N,N,N,N
1774 | 1773,Free Month,N,N,N,N
1775 | 1774,10% off,N,N,N,N
1776 | 1775,Free Month,N,N,N,N
1777 | 1776,10% off,Y,Y,Y,Y
1778 | 1777,Free Month,Y,N,N,N
1779 | 1778,10% off,Y,N,N,N
1780 | 1779,Free Month,Y,N,N,N
1781 | 1780,10% off,N,N,N,N
1782 | 1781,Free Month,Y,N,N,N
1783 | 1782,10% off,Y,Y,Y,Y
1784 | 1783,Free Month,N,N,N,N
1785 | 1784,10% off,N,N,N,N
1786 | 1785,Free Month,N,N,N,N
1787 | 1786,10% off,Y,N,N,N
1788 | 1787,Free Month,N,N,N,N
1789 | 1788,10% off,Y,Y,Y,Y
1790 | 1789,Free Month,N,N,N,N
1791 | 1790,10% off,Y,N,N,N
1792 | 1791,Free Month,N,N,N,N
1793 | 1792,10% off,Y,Y,Y,Y
1794 | 1793,Free Month,N,N,N,N
1795 | 1794,10% off,N,N,N,N
1796 | 1795,Free Month,N,N,N,N
1797 | 1796,10% off,N,N,N,N
1798 | 1797,Free Month,N,N,N,N
1799 | 1798,10% off,N,N,N,N
1800 | 1799,Free Month,N,N,N,N
1801 | 1800,10% off,N,N,N,N
1802 | 1801,Free Month,N,N,N,N
1803 | 1802,10% off,N,N,N,N
1804 | 1803,Free Month,Y,N,N,N
1805 | 1804,10% off,N,N,N,N
1806 | 1805,Free Month,Y,Y,N,N
1807 | 1806,10% off,N,N,N,N
1808 | 1807,Free Month,N,N,N,N
1809 | 1808,10% off,Y,Y,Y,Y
1810 | 1809,Free Month,N,N,N,N
1811 | 1810,10% off,Y,Y,Y,Y
1812 | 1811,Free Month,N,N,N,N
1813 | 1812,10% off,N,N,N,N
1814 | 1813,Free Month,Y,Y,N,N
1815 | 1814,10% off,N,N,N,N
1816 | 1815,Free Month,N,N,N,N
1817 | 1816,10% off,N,N,N,N
1818 | 1817,Free Month,Y,N,N,N
1819 | 1818,10% off,N,N,N,N
1820 | 1819,Free Month,Y,N,N,N
1821 | 1820,10% off,Y,N,N,N
1822 | 1821,Free Month,Y,Y,N,N
1823 | 1822,10% off,Y,Y,Y,Y
1824 | 1823,Free Month,N,N,N,N
1825 | 1824,10% off,N,N,N,N
1826 | 1825,Free Month,Y,Y,N,N
1827 | 1826,10% off,N,N,N,N
1828 | 1827,Free Month,N,N,N,N
1829 | 1828,10% off,N,N,N,N
1830 | 1829,Free Month,Y,N,N,N
1831 | 1830,10% off,N,N,N,N
1832 | 1831,Free Month,N,N,N,N
1833 | 1832,10% off,Y,N,N,N
1834 | 1833,Free Month,Y,Y,Y,Y
1835 | 1834,10% off,Y,N,N,N
1836 | 1835,Free Month,N,N,N,N
1837 | 1836,10% off,Y,Y,Y,Y
1838 | 1837,Free Month,Y,N,N,N
1839 | 1838,10% off,N,N,N,N
1840 | 1839,Free Month,N,N,N,N
1841 | 1840,10% off,Y,N,N,N
1842 | 1841,Free Month,Y,Y,Y,Y
1843 | 1842,10% off,N,N,N,N
1844 | 1843,Free Month,N,N,N,N
1845 | 1844,10% off,N,N,N,N
1846 | 1845,Free Month,Y,Y,N,N
1847 | 1846,10% off,N,N,N,N
1848 | 1847,Free Month,Y,N,N,N
1849 | 1848,10% off,N,N,N,N
1850 | 1849,Free Month,N,N,N,N
1851 | 1850,10% off,N,N,N,N
1852 | 1851,Free Month,Y,Y,N,N
1853 | 1852,10% off,Y,N,N,N
1854 | 1853,Free Month,N,N,N,N
1855 | 1854,10% off,N,N,N,N
1856 | 1855,Free Month,N,N,N,N
1857 | 1856,10% off,Y,Y,Y,Y
1858 | 1857,Free Month,Y,N,N,N
1859 | 1858,10% off,N,N,N,N
1860 | 1859,Free Month,Y,N,N,N
1861 | 1860,10% off,N,N,N,N
1862 | 1861,Free Month,N,N,N,N
1863 | 1862,10% off,N,N,N,N
1864 | 1863,Free Month,Y,Y,Y,Y
1865 | 1864,10% off,N,N,N,N
1866 | 1865,Free Month,N,N,N,N
1867 | 1866,10% off,Y,Y,Y,Y
1868 | 1867,Free Month,N,N,N,N
1869 | 1868,10% off,N,N,N,N
1870 | 1869,Free Month,N,N,N,N
1871 | 1870,10% off,Y,N,N,N
1872 | 1871,Free Month,N,N,N,N
1873 | 1872,10% off,Y,N,N,N
1874 | 1873,Free Month,N,N,N,N
1875 | 1874,10% off,Y,Y,Y,Y
1876 | 1875,Free Month,Y,N,N,N
1877 | 1876,10% off,N,N,N,N
1878 | 1877,Free Month,Y,N,N,N
1879 | 1878,10% off,N,N,N,N
1880 | 1879,Free Month,Y,N,N,N
1881 | 1880,10% off,N,N,N,N
1882 | 1881,Free Month,N,N,N,N
1883 | 1882,10% off,N,N,N,N
1884 | 1883,Free Month,Y,Y,Y,N
1885 | 1884,10% off,N,N,N,N
1886 | 1885,Free Month,N,N,N,N
1887 | 1886,10% off,Y,N,N,N
1888 | 1887,Free Month,N,N,N,N
1889 | 1888,10% off,N,N,N,N
1890 | 1889,Free Month,N,N,N,N
1891 | 1890,10% off,N,N,N,N
1892 | 1891,Free Month,Y,N,N,N
1893 | 1892,10% off,N,N,N,N
1894 | 1893,Free Month,N,N,N,N
1895 | 1894,10% off,N,N,N,N
1896 | 1895,Free Month,N,N,N,N
1897 | 1896,10% off,Y,Y,Y,Y
1898 | 1897,Free Month,N,N,N,N
1899 | 1898,10% off,N,N,N,N
1900 | 1899,Free Month,N,N,N,N
1901 | 1900,10% off,N,N,N,N
1902 | 1901,Free Month,N,N,N,N
1903 | 1902,10% off,N,N,N,N
1904 | 1903,Free Month,N,N,N,N
1905 | 1904,10% off,N,N,N,N
1906 | 1905,Free Month,Y,Y,N,N
1907 | 1906,10% off,Y,N,N,N
1908 | 1907,Free Month,Y,Y,Y,N
1909 | 1908,10% off,Y,Y,N,N
1910 | 1909,Free Month,Y,Y,Y,Y
1911 | 1910,10% off,N,N,N,N
1912 | 1911,Free Month,N,N,N,N
1913 | 1912,10% off,N,N,N,N
1914 | 1913,Free Month,Y,Y,N,N
1915 | 1914,10% off,N,N,N,N
1916 | 1915,Free Month,N,N,N,N
1917 | 1916,10% off,N,N,N,N
1918 | 1917,Free Month,Y,Y,Y,N
1919 | 1918,10% off,N,N,N,N
1920 | 1919,Free Month,N,N,N,N
1921 | 1920,10% off,N,N,N,N
1922 | 1921,Free Month,N,N,N,N
1923 | 1922,10% off,Y,N,N,N
1924 | 1923,Free Month,N,N,N,N
1925 | 1924,10% off,N,N,N,N
1926 | 1925,Free Month,Y,N,N,N
1927 | 1926,10% off,Y,Y,Y,Y
1928 | 1927,Free Month,Y,N,N,N
1929 | 1928,10% off,N,N,N,N
1930 | 1929,Free Month,Y,N,N,N
1931 | 1930,10% off,N,N,N,N
1932 | 1931,Free Month,N,N,N,N
1933 | 1932,10% off,N,N,N,N
1934 | 1933,Free Month,Y,Y,Y,Y
1935 | 1934,10% off,Y,N,N,N
1936 | 1935,Free Month,N,N,N,N
1937 | 1936,10% off,N,N,N,N
1938 | 1937,Free Month,Y,N,N,N
1939 | 1938,10% off,N,N,N,N
1940 | 1939,Free Month,Y,Y,Y,Y
1941 | 1940,10% off,N,N,N,N
1942 | 1941,Free Month,N,N,N,N
1943 | 1942,10% off,N,N,N,N
1944 | 1943,Free Month,N,N,N,N
1945 | 1944,10% off,N,N,N,N
1946 | 1945,Free Month,N,N,N,N
1947 | 1946,10% off,Y,N,N,N
1948 | 1947,Free Month,Y,N,N,N
1949 | 1948,10% off,Y,N,N,N
1950 | 1949,Free Month,Y,Y,Y,N
1951 | 1950,10% off,Y,Y,Y,Y
1952 | 1951,Free Month,Y,Y,Y,N
1953 | 1952,10% off,Y,N,N,N
1954 | 1953,Free Month,Y,Y,N,N
1955 | 1954,10% off,N,N,N,N
1956 | 1955,Free Month,Y,N,N,N
1957 | 1956,10% off,Y,N,N,N
1958 | 1957,Free Month,N,N,N,N
1959 | 1958,10% off,Y,Y,Y,Y
1960 | 1959,Free Month,Y,N,N,N
1961 | 1960,10% off,N,N,N,N
1962 | 1961,Free Month,Y,N,N,N
1963 | 1962,10% off,N,N,N,N
1964 | 1963,Free Month,N,N,N,N
1965 | 1964,10% off,N,N,N,N
1966 | 1965,Free Month,N,N,N,N
1967 | 1966,10% off,N,N,N,N
1968 | 1967,Free Month,Y,Y,N,N
1969 | 1968,10% off,N,N,N,N
1970 | 1969,Free Month,Y,N,N,N
1971 | 1970,10% off,N,N,N,N
1972 | 1971,Free Month,N,N,N,N
1973 | 1972,10% off,N,N,N,N
1974 | 1973,Free Month,N,N,N,N
1975 | 1974,10% off,Y,N,N,N
1976 | 1975,Free Month,N,N,N,N
1977 | 1976,10% off,Y,N,N,N
1978 | 1977,Free Month,Y,Y,Y,Y
1979 | 1978,10% off,N,N,N,N
1980 | 1979,Free Month,Y,N,N,N
1981 | 1980,10% off,N,N,N,N
1982 | 1981,Free Month,N,N,N,N
1983 | 1982,10% off,N,N,N,N
1984 | 1983,Free Month,N,N,N,N
1985 | 1984,10% off,N,N,N,N
1986 | 1985,Free Month,N,N,N,N
1987 | 1986,10% off,N,N,N,N
1988 | 1987,Free Month,Y,Y,N,N
1989 | 1988,10% off,N,N,N,N
1990 | 1989,Free Month,N,N,N,N
1991 | 1990,10% off,N,N,N,N
1992 | 1991,Free Month,N,N,N,N
1993 | 1992,10% off,Y,Y,N,N
1994 | 1993,Free Month,Y,N,N,N
1995 | 1994,10% off,N,N,N,N
1996 | 1995,Free Month,Y,Y,Y,N
1997 | 1996,10% off,N,N,N,N
1998 | 1997,Free Month,N,N,N,N
1999 | 1998,10% off,N,N,N,N
2000 | 1999,Free Month,N,N,N,N
2001 | 2000,10% off,N,N,N,N
--------------------------------------------------------------------------------