Haskell Data Analysis Cookbook
Table of Contents
Haskell Data Analysis Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. The Hunt for Data
Introduction
Harnessing data from various sources
How to do it...
News
Private
Academic
Nonprofits
The United States government
Accumulating text data from a file path
Getting ready
How to do it...
How it works...
See also
Catching I/O code faults
How to do itâŚ
How it worksâŚ
There's moreâŚ
Keeping and representing data from a CSV file
Getting ready
How to do it...
How it works...
Examining a JSON file with the aeson package
Getting ready
How to do it...
How it works...
There's moreâŚ
Reading an XML file using the HXT package
Getting ready
How to do it...
How it works...
Capturing table rows from an HTML page
Getting ready
How to do it...
How it works...
Understanding how to perform HTTP GET requests
Getting ready
How to do it...
How it worksâŚ
See alsoâŚ
Learning how to perform HTTP POST requests
Getting ready
How to do it...
How it works...
See also
Traversing online directories for data
Getting ready
How to do it...
How it works...
Using MongoDB queries in Haskell
Getting ready
How to do it...
How it works...
See also
Reading from a remote MongoDB server
Getting ready
How to do it...
See also
Exploring data from a SQLite database
Getting ready
How to do itâŚ
2. Integrity and Inspection
Introduction
Trimming excess whitespace
How to do it...
How it works...
There's moreâŚ
Ignoring punctuation and specific characters
How to do it...
There's more...
Coping with unexpected or missing input
Getting ready
How to do it...
How it works...
There's more...
See also
Validating records by matching regular expressions
Getting ready
How to do it...
How it works...
See also
Lexing and parsing an e-mail address
Getting ready
How to do itâŚ
How it worksâŚ
Deduplication of nonconflicting data items
Getting ready
How to do it...
How it works...
There's more...
See also
Deduplication of conflicting data items
Getting ready
How to do it...
How it works...
There's more...
See also
Implementing a frequency table using Data.List
How to do it...
How it works...
See also
Implementing a frequency table using Data.MultiSet
Getting ready
How to do it...
How it works...
See also
Computing the Manhattan distance
Getting ready
How to do it...
See also
Computing the Euclidean distance
Getting ready
How to do it...
See also
Comparing scaled data using the Pearson correlation coefficient
How to do it...
How it works...
Comparing sparse data using cosine similarity
How to do it...
See also
3. The Science of Words
Introduction
Displaying a number in another base
How to do it...
How it works...
See also
Reading a number from another base
How to do it...
How it works...
See also
Searching for a substring using Data.ByteString
How to do it...
How it works...
There's more...
See also
Searching a string using the Boyer-Moore-Horspool algorithm
How to do it...
How it works...
There's more...
See also
Searching a string using the Rabin-Karp algorithm
Getting ready
How to do it...
How it works...
See also
Splitting a string on lines, words, or arbitrary tokens
Getting ready
How to do it...
Finding the longest common subsequence
Getting ready
How to do it...
How it works...
Computing a phonetic code
Getting ready
How to do it...
How it works...
There's more...
Computing the edit distance
Getting ready
How to do it...
How it works...
See also
Computing the Jaro-Winkler distance between two strings
Getting ready
How to do it...
See also
Finding strings within one-edit distance
Getting ready
How to do it...
There's more...
See also
Fixing spelling mistakes
Getting ready
How to do it...
How it works...
There's more...
See also
4. Data Hashing
Introduction
Hashin...