Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Mastering Python Data Visualization
Mastering Python Data Visualization

Mastering Python Data Visualization: Generate effective results in a variety of visually appealing charts using the plotting packages in Python

eBook
£22.99 £32.99
Paperback
£41.99
Subscription
Free Trial
Renews at £16.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Mastering Python Data Visualization

Chapter 2. Data Analysis and Visualization

Most visualization stories begin with some question that is oriented towards a topic where the data is being either explored or collected. The question contains the premise to the story and leads us to the point at which the data takes an expedition over the storyline. Such data expeditions that start with a question, for example, How many Ebola deaths were reported in the year 2014? are implemented by a group of people by collaborating with each other. The role of data communicators should be to create an information experience that transforms how their audiences think about their story.

The key parts of the story relate to the process of placing the visualization in a meaningful context. The context provides knowledge that answers questions such as the following:

  • Is there sufficient data?
  • Is there a time frame within which this data exists?
  • Which associable events around the globe will influence this data?

To reiterate, it is important to...

Why does visualization require planning?

The whole process of visualization involves people with different skill sets and domain expertise. Data wranglers diligently collect data and analyze it. Mathematicians and statisticians understand the visual design principles and communicate their data using those principles. Designers or artists (in some cases, frontend developers) have the skills necessary for visualization, while business analysts look out for things like customer behavioral patterns, outliers, or a sudden unusual trend. However, it always starts with either acquiring or gathering data, and with the following steps:

  • Acquire or gather data from an external source, a website, or from a file on a disk
  • Parse and filter data using programming methods to parse, clean, and reduce the data
  • Analyze and refine to remove noise and unnecessary dimensions and find patterns
  • Represent and interact to present the data in ways that are more accessible and understandable

How much of this process is...

The Ebola example

To illustrate the steps mentioned in the previous section and how they lead to an understandable visualization, let us consider the question we had earlier, that is, How many Ebola deaths were reported in the year 2014? This particular question leads to very specific data, which is usually maintained by the World Health Organization (http://www.who.int/en/) or Humanitarian Data Exchange (https://hdx.rwlabs.org). The original source of this data is the World Health Organization (WHO), but the Humanitarian Data Exchange (HDX) is the contributor. Please note, however, that we shall have all the data, along with the Python source code examples for this book, available at a single place.

The data contains information about the spread of the Ebola disease in Guinea, Liberia, Mali, Nigeria, Senegal, Sierra Leone, Spain, United Kingdom, and the United States of America.

The contributor URL for this information is https://data.hdx.rwlabs.org/dataset/ebola-cases-2014/.

The contents...

A sports example

To illustrate another example, and how a specific visualization method works better than another, let us consider a different question: What are the top five record touchdowns by quarterbacks in American Football as of Feb 2015? The original source of data for this are the Len Dawson NFL and AFL Statistics. (Data source: http://www.pro-football-reference.com/players/D/DawsLe00.htm.)

The data contains information about the top 22 quarterbacks: Peyton Manning, Brett Favre, Dan Marino, Drew Brees, Tom Brady, Frank Tarkenton, John Elway, Warren Moon, John Unitas, Vinny Testaverda, Joe Montana, Dave Krieg, Eli Manning, Sonny Jurgensen, Dan Fouts, Philip Rivers, Ben Roethlisberger, Drew Bledsoe, Boomer Esiason, John Hadle, Tittle, and Tony Romo:

A sports example

Before we think of a visualization method, a little bit of analysis needs to be done. These quarterbacks had played in different time periods. For example, Brett Favre played from 1991 to 2010, and Dan Marino played from 1983 to 1999. The...

Creating interesting stories with data

Data visualization regularly promotes its ability to reveal stories with data, and in some cases, reveal the not so trivial stories visually. In the recent past, journalists have been integrating visualizations more into their narratives, often helping us better understand their stories. In the commercial world, there are few that grasp the ways in which data can be associated with a meaningful story that appeals both emotionally and intelligently to the audience. As Rudyard Kipling wrote, If history were taught in the form of stories, it would never be forgotten; a similar thought applies to data. We should, therefore, understand that data would be understood and remembered better if presented in the right way.

Why are stories so important?

There are many tools and methods of visualization that we have today: bar and pie charts, tables, line graphs, bubble charts, scatter plots, and so on—the list is long. However, with these tools, the focus...

Perception and presentation methods

In the past, data size and variety did not impose much of a challenge; therefore, perceiving and analyzing data was straightforward. Today there are large quantities of data in innumerable fields, and visualization can provide valuable assistance to humans for perceiving and interacting with visualization of the data. Human factors contribute significantly to the whole visualization process in order to better understand data and aid in decision-making tasks.

Visualization techniques can be categorized into two areas:

  • Scientific visualization: This involves scientific data with an inherent physical entity
  • Information visualization: This involves abstract data (spatial or non-spatial)

Most visualization systems are designed so that humans and computers can cooperate, each performing the following tasks:

  • Visually representing data to enhance data analysis
  • Visually displaying models, interpretations of data, ideas, hypotheses, and insight
  • Helping users to improve...

Why does visualization require planning?


The whole process of visualization involves people with different skill sets and domain expertise. Data wranglers diligently collect data and analyze it. Mathematicians and statisticians understand the visual design principles and communicate their data using those principles. Designers or artists (in some cases, frontend developers) have the skills necessary for visualization, while business analysts look out for things like customer behavioral patterns, outliers, or a sudden unusual trend. However, it always starts with either acquiring or gathering data, and with the following steps:

  • Acquire or gather data from an external source, a website, or from a file on a disk

  • Parse and filter data using programming methods to parse, clean, and reduce the data

  • Analyze and refine to remove noise and unnecessary dimensions and find patterns

  • Represent and interact to present the data in ways that are more accessible and understandable

How much of this process...

The Ebola example


To illustrate the steps mentioned in the previous section and how they lead to an understandable visualization, let us consider the question we had earlier, that is, How many Ebola deaths were reported in the year 2014? This particular question leads to very specific data, which is usually maintained by the World Health Organization (http://www.who.int/en/) or Humanitarian Data Exchange (https://hdx.rwlabs.org). The original source of this data is the World Health Organization (WHO), but the Humanitarian Data Exchange (HDX) is the contributor. Please note, however, that we shall have all the data, along with the Python source code examples for this book, available at a single place.

The data contains information about the spread of the Ebola disease in Guinea, Liberia, Mali, Nigeria, Senegal, Sierra Leone, Spain, United Kingdom, and the United States of America.

The contributor URL for this information is https://data.hdx.rwlabs.org/dataset/ebola-cases-2014/.

The contents...

A sports example


To illustrate another example, and how a specific visualization method works better than another, let us consider a different question: What are the top five record touchdowns by quarterbacks in American Football as of Feb 2015? The original source of data for this are the Len Dawson NFL and AFL Statistics. (Data source: http://www.pro-football-reference.com/players/D/DawsLe00.htm.)

The data contains information about the top 22 quarterbacks: Peyton Manning, Brett Favre, Dan Marino, Drew Brees, Tom Brady, Frank Tarkenton, John Elway, Warren Moon, John Unitas, Vinny Testaverda, Joe Montana, Dave Krieg, Eli Manning, Sonny Jurgensen, Dan Fouts, Philip Rivers, Ben Roethlisberger, Drew Bledsoe, Boomer Esiason, John Hadle, Tittle, and Tony Romo:

Before we think of a visualization method, a little bit of analysis needs to be done. These quarterbacks had played in different time periods. For example, Brett Favre played from 1991 to 2010, and Dan Marino played from 1983 to 1999. The...

Creating interesting stories with data


Data visualization regularly promotes its ability to reveal stories with data, and in some cases, reveal the not so trivial stories visually. In the recent past, journalists have been integrating visualizations more into their narratives, often helping us better understand their stories. In the commercial world, there are few that grasp the ways in which data can be associated with a meaningful story that appeals both emotionally and intelligently to the audience. As Rudyard Kipling wrote, If history were taught in the form of stories, it would never be forgotten; a similar thought applies to data. We should, therefore, understand that data would be understood and remembered better if presented in the right way.

Why are stories so important?

There are many tools and methods of visualization that we have today: bar and pie charts, tables, line graphs, bubble charts, scatter plots, and so on—the list is long. However, with these tools, the focus is on data...

Left arrow icon Right arrow icon

Description

Python has a handful of open source libraries for numerical computations involving optimization, linear algebra, integration, interpolation, and other special functions using array objects, machine learning, data mining, and plotting. Pandas have a productive environment for data analysis. These libraries have a specific purpose and play an important role in the research into diverse domains including economics, finance, biological sciences, social science, health care, and many more. The variety of tools and approaches available within Python community is stunning, and can bolster and enhance visual story experiences. This book offers practical guidance to help you on the journey to effective data visualization. Commencing with a chapter on the data framework, which explains the transformation of data into information and eventually knowledge, this book subsequently covers the complete visualization process using the most popular Python libraries with working examples. You will learn the usage of Numpy, Scipy, IPython, MatPlotLib, Pandas, Patsy, and Scikit-Learn with a focus on generating results that can be visualized in many different ways. Further chapters are aimed at not only showing advanced techniques such as interactive plotting; numerical, graphical linear, and non-linear regression; clustering and classification, but also in helping you understand the aesthetics and best practices of data visualization. The book concludes with interesting examples such as social networks, directed graph examples in real-life, data structures appropriate for these problems, and network analysis. By the end of this book, you will be able to effectively solve a broad set of data analysis problems.

What you will learn

  • Gather, cleanse, access, and map data to a visual framework
  • Recognize which visualization method is applicable and learn best practices for data visualization
  • Get acquainted with reader-driven narratives and author-driven narratives and the principles of perception
  • Understand why Python is an effective tool to be used for numerical computation much like MATLAB, and explore some interesting data structures that come with it
  • Explore with various visualization choices how Python can be very useful in computation in the field of finance and statistics
  • Get to know why Python is the second choice after Java, and is used frequently in the field of machine learning
  • Compare Python with other visualization approaches using Julia and a JavaScript-based framework such as D3.js
  • Discover how Python can be used in conjunction with NoSQL such as Hive to produce results efficiently in a distributed environment

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 27, 2015
Length: 372 pages
Edition : 1st
Language : English
ISBN-13 : 9781783988334
Vendor :
Anaconda
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Oct 27, 2015
Length: 372 pages
Edition : 1st
Language : English
ISBN-13 : 9781783988334
Vendor :
Anaconda
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£16.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
£169.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts
£234.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 115.97
Mastering Python Data Visualization
£41.99
Python Data Visualization Cookbook (Second Edition)
£36.99
Python Machine Learning
£36.99
Total £ 115.97 Stars icon
Banner background image

Table of Contents

10 Chapters
1. A Conceptual Framework for Data Visualization Chevron down icon Chevron up icon
2. Data Analysis and Visualization Chevron down icon Chevron up icon
3. Getting Started with the Python IDE Chevron down icon Chevron up icon
4. Numerical Computing and Interactive Plotting Chevron down icon Chevron up icon
5. Financial and Statistical Models Chevron down icon Chevron up icon
6. Statistical and Machine Learning Chevron down icon Chevron up icon
7. Bioinformatics, Genetics, and Network Models Chevron down icon Chevron up icon
8. Advanced Visualization Chevron down icon Chevron up icon
A. Go Forth and Explore Visualization Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(4 Ratings)
5 star 50%
4 star 50%
3 star 0%
2 star 0%
1 star 0%
Math Review Nov 17, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have not completely read the book yet, I liked the examples in sports and Monte Carlo Simulations.
Amazon Verified review Amazon
Oleg Okun Dec 06, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As its title says, this book is about exploration of data visualization in Python. The author approaches to this task by not only featuring the available Python functionality to visualize data, but by putting it into the context of "visualization of information for knowledge inference". In his words, this means not the visualization per se, but knowledge discovery aimed visualization which is the integral part of data science related projects. With this goal in mind, the author conveys readers through a number of real-world stories (taken from finance, sports, bioinformatics, natural language processing) accompanied by plots of various kinds.As a Python distribution, Anaconda is chosen as it includes many pre-installed packages. As any knowledge discovery assumes data processing and analysis, the discussion is also on numpy, scipy, matplotlib, scikit-learn, NetworkX, bokeh, IPython, plotly and a few others less commonly known packages as well as on their application to the book main topic.The book presumes some background knowledge of Python from readers and therefore it is best suitable for those who have exposure to Python programming but wants to acquire data visualization skills, meaning the typical job titles of a data analyst or a data engineer.
Amazon Verified review Amazon
yoalieh Dec 09, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I liked this book, though it's not easy to be loved.I'd liked the introduction a lot, as the author talked about data visualization as a discipline, and gave some tips and ideas of diferent kind of visualizations (There's is a lot more than graph bars and scatterplots it seems, ;) ). It tries to be discipline-agnostic by using many real life examples from many disciplines. I think this can bring inspiration when in need of a way to present information hard to explain.After that, when talking about Python, it gives an overview about Python versions and libraries which can simplify the process of creating good visualizations. Finally, almost all examples are based in Conda, but still other things are used. This can cause a bit of confussion, but I see it as one of the potential of this book, as it can be used as reference to create good visualizations in different workflows, and serves as a reference about which libraries can be used for a special kind of visualization if it's not covered by one of them.The examples in further chapters are very good, and I loved when it talks about Numpy, simulation, or advanced data structures, all of which can be used to create better visualization, or even the part talking about drawing graphs.Don't expect this book to be a cookbook, it's more like a big notebook of a professional in charge of creating a LOT of visualizations for different fields. I think it lacks a bit of more explaining on some specfic examples or libraries, but that would require a lot more books to fit them. Also, a very good level of Python understanding, and documentation for each library in use is not only recommended, but a must.
Amazon Verified review Amazon
Amazon Customer Dec 12, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
[Disclaimer: Packt Publishing asked me to review the book in light of my Github public profile. I was given complete editorial freedom and NOT compensated in anyway for the review however]Overall, I enjoyed this book, although I suspect it's real value will become apparent when I return to it over the next few years when faced with visualising tricky datasets. Broadly, Kirthi Raman covers three areas: Introducing visualisation as an activity itself (he considers it a form of story telling), several Python tools for visualisation and analytic techniques that can drive the visualisation/modelling process. I particularly like that a plethora of approaches are encouraged, so that if you find one isn’t suited to what you’re doing, there are always plenty other to consider. As someone who uses Python on a daily basis to both model and visualise a variety of data sources, Raman's book is an important addition to my professional library.Where I find the book lacking is in providing a clear path to applying the array of techniques and packages suggested. To be clear, there are good code examples for almost every visualisation/analytic technique (the financial models are particularly well explained), but I would have liked more explanation/worked examples of going from a raw dataset to a professional visualisation.Another minor criticism is that it is quite ambitious in its scope (there are whole journals devoted to some of the modelling techniques covered in a few pages), but by making the reader aware of these approaches, the reader can always read further.To end on a practical note, I like that the publisher makes the book available in multiple formats, including Kindle and DRM-free PDF. This is very practical for reading (and using) the book over multiple devices. I would recommend a colour display though, so as to enjoy the full effect of the many visualisation examples.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.