ebook img

Learning Python Data Visualization: Master how to build dynamic HTML5-ready SVG charts using Python and the pygal library PDF

212 Pages·2014·5.77 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Learning Python Data Visualization: Master how to build dynamic HTML5-ready SVG charts using Python and the pygal library

www.it-ebooks.info Learning Python Data Visualization Master how to build dynamic HTML5-ready SVG charts using Python and the pygal library Chad Adams BIRMINGHAM - MUMBAI www.it-ebooks.info Learning Python Data Visualization Copyright © 2014 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: August 2014 Production reference: 1180814 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78355-333-4 www.packtpub.com Cover image by Sabine Mehlstäubl ([email protected]) www.it-ebooks.info Credits Author Project Coordinator Chad Adams Neha Thakur Reviewers Proofreaders Aniket Maithani Simran Bhogal Atmaram Shetye Maria Gould Giuseppe Vettigli Ameesha Green Ron Zacharski Indexers Hemangini Bari Commissioning Editor Akram Hussain Tejal Soni Priya Subramani Acquisition Editor Joanne Fitzpatrick Production Coordinator Shantanu Zagade Content Development Editor Parita Khedekar Cover Work Shantanu Zagade Technical Editor Venu Manthena Copy Editors Janbal Dharmaraj Insiya Morbiwala Sayanee Mukherjee Aditya Nair Deepa Nambiar Stuti Srivastava www.it-ebooks.info About the Author Chad Adams is a web and mobile software developer based in Raymore, Missouri, where he works as a mobile frontend architect creating visually appealing application software for iOS, Windows Phone, and the Web. He also creates project build systems for large development teams using programming languages such as Python and C#. He has a B.F.A. in Commercial Art and a Microsoft certification in HTML5, JavaScript, and CSS3. He has also spoken at conferences on topics that include Windows Phone development and Google Dart. In his off hours, Chad enjoys relaxing at his home and spending time with his wife, Heather, and son, Leo. www.it-ebooks.info About the Reviewers Aniket Maithani is a budding engineer and is currently pursuing a B.Tech in Computer Science and Engineering from Amity University. He is primarily interested in contributing to open source projects and believes in the FOSS/FLOSS ideology. He has been working in the field of embedded systems and open hardware for the last two years. Apart from coding and hacking around with regular stuff, he loves to play the guitar and write on his blog. He can be reached at [email protected]. There are a few people I would like to thank for helping me out. Firstly, my dad, who introduced me to the world of computers! Also, I would like to thank my professor Mr. Manoj Baliyan and my senior Mr. Anuvrat Parashar, who introduced me to the world of Python and its awesomeness. I would also like to thank my mentor, Satyakaam Goswami for always guiding me. Lastly, God Almighty for his kind grace and blessings. Atmaram Shetye is a Computer Science and Engineering Graduate from Goa University. Having worked in a variety of companies, from start-ups to large multinational enterprises, he is a strong supporter of polyglot programming. He has spent most of his time programming in Python, while also using C, Objective-C, C++, and JavaScript at work. His areas of interest include artificial intelligence and machine learning. He is currently working as a Principal Software Engineer at CA Technologies, Bangalore. www.it-ebooks.info Giuseppe Vettigli is a data scientist who has worked in the research industry and academia for many years. His work is focused on the development of machine learning models and applications to utilize information from structured and unstructured data. He also writes about scientific computing and data visualization in Python on his blog at http://glowingpython.blogspot.com. Ron Zacharski completed a PhD in Computer Science at the University of Minnesota, focusing on artificial intelligence and computational linguistics. He is the author of the free online Python-based book, A Programmer's Guide to Data Mining: The Ancient Art of the Numerati (http://www.guidetodatamining.com). He is an Associate Professor of Computer Science at the University of Mary Washington. Ron is a novice Zen Buddhist monk. www.it-ebooks.info www.PacktPub.com Support files, eBooks, discount offers, and more You might want to visit www.PacktPub.com for support files and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub. com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why subscribe? • Fully searchable across every book published by Packt • Copy and paste, print and bookmark content • On demand and accessible via web browser Free access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. www.it-ebooks.info www.it-ebooks.info Table of Contents Preface 1 Chapter 1: Setting Up Your Development Environment 7 Introduction 7 Setting up Python on Windows 7 Installation 9 Exploring the Python installation in Windows 15 Python editors 20 Setting up Python on Mac OS X 25 Setting up Python on Ubuntu 31 Summary 34 Chapter 2: Python Refresher 35 Python basics 35 Importing modules and libraries 40 Input and output 42 Generating an image 45 Creating SVG graphics using svgwrite 48 For Windows users using VSPT 48 For Eclipse or other editors on Windows 50 For Eclipse on Mac and Linux 50 Summary 59 Chapter 3: Getting Started with pygal 61 Why use pygal? 61 Installing pygal using pip 64 Installing pygal using Python Tools for Visual Studio 66 Building a line chart 67 Stacked line charts 69 Simple bar charts 71 www.it-ebooks.info

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.