Market segmentation
Market-segementation.Rmd
Overview
This document will guide readers through how to reproduce the results presented in the article Interactively Visualizing Multivariate Market Segmentation Using the R Package Lionfish submitted to the Austrian Journal of Statistics.
General note
All scripts are designed to be run from top to bottom. If you only want to run parts of the scripts you will have to make sure that init_inv() is run before using any lionfish function!
Preparation
In order to run reproduce all results you will have to
install lionfish,
install the development version of tourr,
and download and unzip the repository.
Installation of lionfish
You can install the development version of lionfish from github with:
install.packages("remotes")
remotes::install_github("mmedl94/lionfish")
Make sure you have git installed. You can download and install git from https://git-scm.com/downloads.
Complications may arise when installing and accessing the Python backend of this package. If you run into any, please don’t refrain from opening an issue!
Installation of the development version of tourr
Please install remotes and then install tourr from github.
install.packages("remotes")
remotes::install_github("ggobi/tourr")
Introduction
Figures 1, 2 and 3 shown in the introduction can be reproduced by running /scripts/intro.R
Interactive interface for partitioning
Figure 4 was produced using manual graphical editing, but only aims to give an overview on the GUI anyways.
Austrian Vacation Activities dataset
Please don’t forget to set the working directory to the downloaded repo when working with /scripts/load_snapshots.R.
Figure 5 can be reproduced by running /scripts/austrian_tourism.R
Figures 6 and 7 can be reproduced by running /scripts/austrian_tourism_clustering.R
Figure 8 can be reproduced by loading the contents of /saves/aut_saves/init as shown in /scripts/load_snapshots.R. The corresponding display is on the top left. Subplots 8 A-F can be reproduced by highlighting the respective cluster and desaturating the others by clicking the color boxes of the respective clusters in the menu on the left. The blendout threshold was set to 0.1.
Figure 9 can be reproduced by loading the contents of /saves/aut_saves/init as shown in /scripts/load_snapshots.R. The blendout threshold was set to 0.1.
Figure 10 can be reproduced by loading the contents of /saves/aut_saves/before as shown in /scripts/load_snapshots.R. The blendout threshold was set to 0.1.
Figure 11 can be reproduced by loading the contents of /saves/aut_saves/after as shown in /scripts/load_snapshots.R. The blendout threshold was set to 0.1.
Australian Vacation Activities dataset
Figure 12 can be reproduced by running /scripts/austrian_tourism_clustering.R
Figures 13 can be reproduced by loading the contents of /saves/aus_saves/before as shown in /scripts/load_snapshots.R.
Figures 14 can be reproduced by loading the contents of /saves/aus_saves/after as shown in /scripts/load_snapshots.R.
Tourist risk taking dataset
Figure 15 can be reproduced by loading the contents of /saves/risk_saves/final_projeciton_risk as shown in /scripts/load_snapshots.R.
Figure 16 can be reproduced by clicking the on the dropdown menu on the bottom left, selecting “Guided tour - LDA - regroup” and then pressing the “Run tour” button below the dropdown menu.
Figure 17 can be reproduced by loading the contents of /saves/risk_saves/regrouped_risk as shown in /scripts/load_snapshots.R.