Book Image

Practical Data Analysis - Second Edition

By : Hector Cuesta, Dr. Sampath Kumar
Book Image

Practical Data Analysis - Second Edition

By: Hector Cuesta, Dr. Sampath Kumar

Overview of this book

Beyond buzzwords like Big Data or Data Science, there are a great opportunities to innovate in many businesses using data analysis to get data-driven products. Data analysis involves asking many questions about data in order to discover insights and generate value for a product or a service. This book explains the basic data algorithms without the theoretical jargon, and you’ll get hands-on turning data into insights using machine learning techniques. We will perform data-driven innovation processing for several types of data such as text, Images, social network graphs, documents, and time series, showing you how to implement large data processing with MongoDB and Apache Spark.
Table of Contents (21 chapters)
Practical Data Analysis - Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface

Statistical analysis


We can easily find information, such as the number of friends and individual data of each one, from our Facebook graph. However, there are many answers that we can't get directly from the site, for example, male to female ratio or How many of my friends are Republicans?, or who is my best friend?; these questions can be easily answered with a few lines of code and some basic statistical analysis. In this chapter, we will start with the male to female ratio, because we already have the gender value in the .gdf file.

Tip

For simplicity in the code examples, we will split the friends.gdf file into two CSV files—one for the nodes (nodes.csv) and one for the links (links.csv).

Male to female ratio

In this example, we will use the gender value of the nodes.csv file and get the male to female ratio in a pie chart visualization.

The nodes.csv file will look like this:

nodedef>name VARCHAR,label VARCHAR,gender VARCHAR,locale VARCHAR,agerank INT 
23917067,Jorge,male,en_US,106...