Data Science for Sensory and Consumer Scientists
Preface
Who Should Read This Book?
How Is This Book Structured
How To Use This Book
Acknowledgements
Preface
1
Bienvenue!
Why Data Science for Sensory and Consumer Science?
Core principles in Sensory and Consumer Science
Computational Sensory Science
Apéritifs
2
Getting Started
2.1
Introduction to R
2.1.1
What is R?
2.1.2
Why Learning R (or any Programming Language)?
2.1.3
Why R?
2.1.4
Why RStudio/Posit?
2.1.5
Installing R and RStudio
2.2
Getting Started in R
2.2.1
Conventions
2.2.2
Install and Load Packages
2.2.3
First Analysis in R
2.2.4
R Scripts
2.2.5
Create a Local Project
2.3
Further tips on
how to read this book?
2.3.1
Introduction to the
{magrittr}
and the notion of
pipes
2.3.2
Calling Variables
2.3.3
Printing vs. Saving results
2.3.4
Running code and handling errors
2.4
Version Control / Git and GitHub
2.4.1
Git
2.4.2
GitHub
Hors d’Oeuvres
3
Why Data Science?
3.1
History and Definition
3.2
Benefits of Data Science
3.2.1
Reproducible Research
3.2.2
Standardized Reporting
3.3
Data Scientific Workflow
3.3.1
Data Collection
3.3.2
Data Preparation
3.3.3
Data Analysis
3.3.4
Value Delivery
3.4
How to Learn Data Science
3.5
Cautions: Don’t that Everybody Does
4
Data Manipulation
4.1
Why Manipulating Data?
4.2
Tidying Data
4.2.1
Simple Manipulations
4.2.2
Reshaping Data
4.2.3
Transformation that Alters the Data
4.2.4
Combining Data from Different Sources
5
Data Visualization
5.1
Introduction
5.2
Design Principles
5.3
Table Making
5.3.1
Introduction to
{flextable}
5.3.2
Introdution to
{gt}
5.4
Chart Making
5.4.1
Philosophy of
{ggplot2}
5.4.2
Getting started with
{ggplot2}
5.4.3
Common Charts
5.4.4
Miscealleneous
5.4.5
Few Additional Tips and Tricks
6
Automated Reporting
6.1
What and why Automated Reporting?
6.2
Integrating reports within analyses scripts
6.2.1
Excel
6.2.2
PowerPoint
6.2.3
Word
6.2.4
Notes on applying corporate branding
6.3
Integrating analyses scripts within your reporting tool
6.3.1
What is
{rmarkdown}
6.3.2
Starting with {rmarkdown}
6.3.3
{rmarkdown}
through a Simple Example
6.3.4
Creating a document using
{knitr}
6.3.5
Example of applications
6.4
To go further…
Bon Appétit
7
Example Project: The Biscuit Study
7.1
Objective of the Test
7.2
Products
7.3
Consumer test
7.3.1
Participants
7.3.2
Test design
7.4
Sensory descriptive analysis data
8
Data Collection
8.1
Designs of sensory (DoE) experiments
8.1.1
General approach
8.1.2
Crossover designs
8.1.3
Balanced incomplete block designs (BIBD)
8.1.4
Incomplete designs for hedonic tests: Sensory informed designs
8.2
Product-related designs
8.2.1
Factorial designs
8.2.2
Mixture designs
8.2.3
Screening designs
8.2.4
Sensory informed designs
8.3
Execute
8.4
Import
8.4.1
Importing Structured Excel File
8.4.2
Importing Unstructured Excel File
8.4.3
Importing Data Stored in Multiple Sheets
9
Data Preparation
9.1
Introduction
9.2
Inspect
9.2.1
Data Inspection
9.2.2
Missing Data
9.2.3
Design Inspection
9.3
Clean
9.3.1
Handling Data Type
9.3.2
Converting between Types
10
Data Analysis
10.1
Sensory Data
10.2
Demographic and Questionnaire Data
10.2.1
Demographic Data: Frequency and Proportion
10.2.2
Eating behavior traits: TFEQ data
10.3
Consumer Data
10.4
Combining Sensory and Consumer Data
10.4.1
Internal Preference Mapping
10.4.2
Consumers Clustering
10.4.3
Drivers of Liking
10.4.4
External Preference Mapping
11
Value Delivery
11.1
How to Communicate?
11.2
Exploratory, Explanatory and Predictive Analysis
11.3
Audience Awareness
11.3.1
Technical Audience
11.3.2
Management
11.3.3
General Interest
11.4
Methods to Communicate
11.4.1
Consider the Mechanism
11.4.2
Pick the Correct Format
11.5
Storytelling
11.6
Reformulate
Haute Cuisine
12
Machine Learning
12.1
Introduction
12.2
Machine Learning Methods
12.2.1
Unsupervised learning
12.2.2
Supervised learning
12.2.3
Practical Guide to Machine Learning
13
Text Analysis
13.1
Introduction to Natural Language Processing
13.2
Application of Text Analysis in Sensory and Consumer Science
13.2.1
Text analysis as way to describe products
13.2.2
Objectives of Text Analysis
13.2.3
Classical
text analysis
workflow
13.2.4
Warnings
13.3
Illustration using Sorting Task Data
13.3.1
Data Pre-processing
13.3.2
Introduction to working with strings (
{stringr}
)
13.3.3
Tokenization
13.3.4
Simple Transformations
13.3.5
Splitting further the tokens
13.3.6
Stopwords
13.3.7
Stemming and Lemmatization
13.4
Text Analysis
13.4.1
Raw Frequencies and Visualization
13.4.2
Bigrams,
n
-grams
13.4.3
Word Embedding
13.4.4
Sentiment Analysis
13.5
To go further…
14
Dashboards
14.1
Objectives
14.2
Introduction to Shiny through an Example
14.2.1
What is a Shiny application?
14.2.2
Starting with Shiny
14.2.3
Illustration
14.2.4
Deploying the Application
14.3
To go further…
14.3.1
Personalizing and Tuning your application
14.3.2
Upgrading Tables
14.3.3
Building Dashboard
14.3.4
Interactive Graphics
14.3.5
Interactive Documents
14.3.6
Documentation and Books
Digestifs
15
Conclusion and Next Steps
15.1
Other Recommended Resources
15.2
Useful R Packages
Bibliography
Published with bookdown
Data Science for Sensory and Consumer Scientists
Preface
To Luca