Librería Portfolio Librería Portfolio

Búsqueda avanzada

TIENE EN SU CESTA DE LA COMPRA

0 productos

en total 0,00 €

STATISTICAL DATA CLEANING WITH APPLICATIONS IN R
Título:
STATISTICAL DATA CLEANING WITH APPLICATIONS IN R
Subtítulo:
Autor:
VAN DER LOO, M
Editorial:
JOHN WILEY
Año de edición:
2018
Materia
ESTADISTICA
ISBN:
978-1-118-89715-7
Páginas:
320
69,95 €

 

Sinopsis

A comprehensive guide to automated statistical data cleaning

The production of clean data is a complex and time-consuming process that requires both technical know-how and statistical expertise. Statistical Data Cleaning brings together a wide range of techniques for cleaning textual, numeric or categorical data. This book examines technical data cleaning methods relating to data representation and data structure. A prominent role is given to statistical data validation, data cleaning based on predefined restrictions, and data cleaning strategy.

Key features:
* Focuses on the automation of data cleaning methods, including both theory and applications written in R.
* Enables the reader to design data cleaning processes for either one-off analytical purposes or for setting up production systems that clean data on a regular basis.
* Explores statistical techniques for solving issues such as incompleteness, contradictions and outliers, integration of data cleaning components and quality monitoring.
* Supported by an accompanying website featuring data and R code.

This book enables data scientists and statistical analysts working with data to deepen their understanding of data cleaning as well as to upgrade their practical data cleaning skills. It can also be used as material for a course in data cleaning and analyses.



Foreword xi

About the Companion Website xiii

1 Data Cleaning 1

1.1 The Statistical Value Chain 1

1.1.1 Raw Data 2

1.1.2 Input Data 2

1.1.3 Valid Data 3

1.1.4 Statistics 3

1.1.5 Output 3

1.2 Notation and Conventions Used in this Book 3

2 A Brief Introduction to R 5

2.1 R on the Command Line 5

2.1.1 Getting Help and Learning R 6

2.2 Vectors 7

2.2.1 Computing with Vectors 9

2.2.2 Arrays and Matrices 10

2.3 Data Frames 11

2.3.1 The Formula-Data Interface 12

2.3.2 Selecting Rows and Columns; Boolean Operators 12

2.3.3 Selection with Indices 13

2.3.4 Data Frame Manipulation:The dplyr Package 14

2.4 Special Values 15

2.4.1 Missing Values 17

2.5 Getting Data into and out of R 18

2.5.1 File Paths in R 19

2.5.2 Formats Provided by Packages 20

2.5.3 Reading Data from a Database 20

2.5.4 Working with Data External to R 21

2.6 Functions 21

2.6.1 Using Functions 22

2.6.2 Writing Functions 22

2.7 Packages Used in this Book 23

3 Technical Representation of Data 27

3.1 Numeric Data 28

3.1.1 Integers 28

3.1.2 Integers in R 30

3.1.3 Real Numbers 31

3.1.4 Double Precision Numbers 31

3.1.5 The Concept of Machine Precision 33

3.1.6 Consequences ofWorking with Floating Point Numbers 34

3.1.7 Dealing with the Consequences 35

3.1.8 Numeric Data in R 37

3.2 Text Data 38

3.2.1 Terminology and Encodings 38

3.2.2 Unicode 39

3.2.3 Some Popular Encodings 40

3.2.4 Textual Data in R: Objects of Class Character 43

3.2.5 Encoding in R 44

3.2.6 Reading andWriting of Data with Non-Local Encoding 46

3.2.7 Detecting Encoding 48

3.2.8 Collation and Sorting 49

3.3 Times and Dates 50

3.3.1 AIT, UTC, and POSIX Seconds Since the Epcoch 50

3.3.2 Time and Date Notation 52

3.3.3 Time and Date Storage in R 54

3.3.4 Time and Date Conversion in R 55

3.3.5 Leap Days, Time Zones, and Daylight Saving Times 57

3.4 Notes on Locale Settings 58

4 Data Structure 61

4.1 Introduction 61

4.2 Tabular Data 61

4.2.1 data.frame 61

4.2.2 Databases 62

4.2.3 dplyr 64

4.3 Matrix Data 65

4.4 Time Series 66

4.5 Graph Data 68

4.6 Web Data 69

4.6.1 Web Scraping 69

4.6.2 Web API 70

4.7 Other Data 72

4.8 Tidying Tabular Data 72

4.8.1 Variable Per Column 74

4.8.2 Single Observation Stored in Multiple Tables 75

5 Cleaning Text Data 77

5.1 Character Normalization 78

5.1.1 Encoding Conversion and Unicode Normalization 78

5.1.2 Character Conversion and Transliteration 80

5.2 Pattern Matching with Regular Expressions 81

5.2.1 Basic Regular Expressions 82

5.2.2 Practical Regular Expressions 85

5.2.3 Generating Regular Expressions in R 92

5.3 Common String Processing Tasks in R 93

5.4 Approximate Text Matching 98

5.4.1 String Metrics 100

5.4.2 String Metrics and Approximate Text Matching in R 109

6 Data Validation 119

6.1 Introduction 119

6.2 A First Look at the validate Package 120

6.2.1 Quick Checks with check_that 120

6.2.2 The BasicWorkflow: validator and confront 122

6.2.3 A Little Background on validate and DSLs 124

6.3 Defining Data Validation 125

6.3.1 Formal Definition of Data Validation 126

6.3.2 Operations on Validation Functions 128

6.3.3 Validation and Missing Values 130

6.3.4 Structure of Validation Functions 131

6.3.5 Demarcating Validation Rules in validate 132

6.4 A Formal Typology of Data Validation Functions 134

6.4.1 A Closer Look at Measurement 134

6.4.2 Classification of Validation Rules 135

6.5 Validating Data with the validate Package 137

6.5.1 Validation Rules in the Console and the validator Object 137

6.5.2 Validating in the Pipeline 139

6.5.3 Raising Errors orWarnings 140

6.5.4 Tolerance for Testing Linear Equalities 140

6.5.5 Setting and Resetting Options 141

6.5.6 Importing and Exporting Validation Rules from and to File 142

6.5.7 Checking Variable Types and Metadata 145

6.5.8 Checking Value Ranges and Code Lists 146

6.5.9 Checking In-Record Consistency Rules 146

6.5.10 Checking Cross-Record Validation Rules 148

6.5.11 Checking Functional Dependencies 149

6.5.12 Cross-Dataset Validation 150

6.5.13 Macros, Variable Groups, Keys 152

6.5.14 Analyzing Output: validation Objects 152

6.5.15 Output Dimensionality and Output Selection 155

7 Localizing Errors in Data Records 157

7.1 Error Localization 157

7.2 Error Localization with R 160

7.2.1 The Errorlocate Package 160

7.3 Error Localization as MIP-Problem 163

7.3.1 Error Localization and Mixed-Integer Programming 163

7.3.2 Linear Restrictions 164

7.3.3 Categorical Restrictions 165

7.3.4 Mixed-Type Restrictions 167

7.4 Numerical Stability Issues 170

7.4.1 A Short Overview of MIP Solving 170

7.4.2 Scaling Numerical Records 172

7.4.3 Setting NumericalThreshold Values 173

7.5 Practical Issues 174

7.5.1 Setting ReliabilityWeights 174

7.5.2 Simplifying Conditional Validation Rules 176

7.6 Conclusion 180

8 Rule Set Maintenance and Simplification 183

8.1 Quality of Validation Rules 183

8.1.1 Completeness 183

8.1.2 Superfluous Rules and Infeasibility 184

8.2 Rules in the Language of Logic 184

8.2.1 Using Logic to Rewrite Rules 185

8.3 Rule Set Issues 186

8.3.1 Infeasible Rule Set 186

8.3.2 Fixed Value 187

8.3.3 Redundant Rule 188

8.3.4 Nonrelaxing Clause 189

8.3.5 Nonconstraining Clause 189

8.4 Detection and Simplification Procedure 190

8.4.1 Mixed-Integer Programming 190

8.4.2 Detecting Feasibility 191

8.4.3 Findin