Beginning Python Visualization
aceydacey writes "Sometimes a picture is worth a thousand words. Beginning Python Visualization: Creating Visual Transformation Scripts, published in February 2009 by Apress, shows how Python and its related tools can be used to easily and effectively turn raw data into visual representations that communicate effectively. The author is Shai Vaingast, a professional engineer and engineering manager who needed to train scientists and engineers to do this kind of programming work. He was looking for a tutorial and reference work, and unable to find a suitable text, wound up writing his first book. He writes in the easy and clear style of someone comfortable and engaged with the subject matter." Keep reading for the rest of aceydacey's review.
Beginning Python Visualization: Crafting Visual Transformation Scripts
author
Shai Vaingast
pages
363
publisher
Apress
rating
9/10
reviewer
aceydacey
ISBN
1430218436
summary
learn how to process, organize, and visualize data from various sources using the Python language
The book uses several very specific examples that illustrate general principles.
The first example is using GPS data. By using Python one can extract data from GPS receivers and enter it into the computer and manipulate it to do what one wants including creating graphs and charts. In this section he shows how to use CSV, comma separated values, as a most useful file format. He shows show to extract data from real world GPS devices and import it via serial ports and the PySerial module. It would be easy for the reader to duplicate and extend this project.
The heart of the book is coverage of useful examples utilizing MatPlotLib, NumPy and SciPy. These related tools are easy to use and fully integrated with Python. MatPlotLib is for plotting data and graphs, including interactive graphs and image files. NumPy is a powerful math library comparable to commercial tools like MatLab, and SciPy extends NumPy to for the sciences. Examples are numerous and include signal analysis using Fourier transforms.
There is also a section on Image Processing using PIL, the Python Imaging Library. This is used for relatively simple image cropping and sizing and also for bit by bit image processing. Interpolation and curve fitting are also well covered. For anyone wanting an introduction to graphical analysis of statistical data, this would be an excellent resource.
The author is obviously a professional in this field. He has a knack for good organizational style and a pragmatic approach to the work. In the book he says "Most of the time, research is organized chaos. The emphasis, however, should be on organized, not chaos." A real value I got from the book is a better understanding of data files, format, and organization as well as methods and guidelines for selecting file formats and storing and organizing data to enable fast and efficient data processing. It is obvious that this book was written by a practicing engineer.
The theme of the book is that Python can be an all purpose environment for data manipulation and visualization, using nothing but free and open source tools that are easily integrated and scriptable without using multiple programming languages. The book should be an invaluable tool for scientists and engineers but it is also easily accessible to anyone interested in math and data analysis. There is no need for an advanced math background. While, as a matter of full disclosure, I have undergraduate degrees in Math and Physics, I feel the book should be easily accessible to anyone with a solid high school math background who is seriously interested in the subject. The book contains a short introductory tutorial on the basics of Python so anyone familiar with programming in any language should be fine.
The book is an easy read from front to back, and I am sure it will also be a good reference resource for the future. The writing style is very clear and unforced and I found surprisingly few errors. While the Python world has a surplus of introductory and general books, books covering this kind of specific domain are especially welcome, and we could use more on other topics by competent authors.
At 363 pages the book is a surprisingly fast read. Its methodology is to use specific, short code examples to make all the key points. Most of the code samples are well selected, short and written in clear, concise Python. This is not the kind of book that overwhelms you with massive amounts of code. Either the book was well edited or else it was written by an exceptionally lucid thinker, or both.
So, if you want to learn how to process, organize, and visualize data from various sources using the Python language, I recommend this book to you. I have also posted a podcast of an interview with the author at Python411
You can purchase Beginning Python Visualization: Crafting Visual Transformation Scripts from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
The first example is using GPS data. By using Python one can extract data from GPS receivers and enter it into the computer and manipulate it to do what one wants including creating graphs and charts. In this section he shows how to use CSV, comma separated values, as a most useful file format. He shows show to extract data from real world GPS devices and import it via serial ports and the PySerial module. It would be easy for the reader to duplicate and extend this project.
The heart of the book is coverage of useful examples utilizing MatPlotLib, NumPy and SciPy. These related tools are easy to use and fully integrated with Python. MatPlotLib is for plotting data and graphs, including interactive graphs and image files. NumPy is a powerful math library comparable to commercial tools like MatLab, and SciPy extends NumPy to for the sciences. Examples are numerous and include signal analysis using Fourier transforms.
There is also a section on Image Processing using PIL, the Python Imaging Library. This is used for relatively simple image cropping and sizing and also for bit by bit image processing. Interpolation and curve fitting are also well covered. For anyone wanting an introduction to graphical analysis of statistical data, this would be an excellent resource.
The author is obviously a professional in this field. He has a knack for good organizational style and a pragmatic approach to the work. In the book he says "Most of the time, research is organized chaos. The emphasis, however, should be on organized, not chaos." A real value I got from the book is a better understanding of data files, format, and organization as well as methods and guidelines for selecting file formats and storing and organizing data to enable fast and efficient data processing. It is obvious that this book was written by a practicing engineer.
The theme of the book is that Python can be an all purpose environment for data manipulation and visualization, using nothing but free and open source tools that are easily integrated and scriptable without using multiple programming languages. The book should be an invaluable tool for scientists and engineers but it is also easily accessible to anyone interested in math and data analysis. There is no need for an advanced math background. While, as a matter of full disclosure, I have undergraduate degrees in Math and Physics, I feel the book should be easily accessible to anyone with a solid high school math background who is seriously interested in the subject. The book contains a short introductory tutorial on the basics of Python so anyone familiar with programming in any language should be fine.
The book is an easy read from front to back, and I am sure it will also be a good reference resource for the future. The writing style is very clear and unforced and I found surprisingly few errors. While the Python world has a surplus of introductory and general books, books covering this kind of specific domain are especially welcome, and we could use more on other topics by competent authors.
At 363 pages the book is a surprisingly fast read. Its methodology is to use specific, short code examples to make all the key points. Most of the code samples are well selected, short and written in clear, concise Python. This is not the kind of book that overwhelms you with massive amounts of code. Either the book was well edited or else it was written by an exceptionally lucid thinker, or both.
So, if you want to learn how to process, organize, and visualize data from various sources using the Python language, I recommend this book to you. I have also posted a podcast of an interview with the author at Python411
You can purchase Beginning Python Visualization: Crafting Visual Transformation Scripts from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
are book reviews news?
You must wait a little bit before using this resource; please try again later.
Is this like "visualizing whirled peas"?
Every time you call tech support, a little kitten dies.
A great way to set yourself up with a Python-based analysis environment is a tool amalgamation called Python(x,y). I don't use it myself since my setup predates the project, but it has all the major tools I know and love.
And for those of you who want statistical and graphing capabilities lacking there, know that you can communicate back and forth with an instance of GNU R, using rpy2.
My favorite way to visualize Python is the DVD set. The Holy Grail is still my favorite, although Life of Brian is a close second.
most of the people think that python GUI ends up with
import tk
and that's not correct at all, if you're among these people, you should read this book... good luck!
Read and Comment at my BLOG
!!!
Ben Fry's Visualizing Data using the Processing environment seems like it's addressing a similar topic... wonder if Vaingast didn't know about it or if he found something unsuitable about it...
Tweet, tweet.
realXtend open source virtual world platform can be programmed in Python, I made a test to visualize email inbox as a terrain.
I've used Python extensively to do (Information) Visualizations, and found the language to be very handy for getting started quickly. I used NumPy a bit, but I mainly offloaded all the heavy display work to OpenGL. I'm surprised that I don't see anything about using Python to develop interactive Visualization techniques, which should be a top priority in 'most' visualizations. (some can do without, but some are built around interaction) Perhaps that would be a good topic for continuing this series =)
"Sometimes a picture is worth a thousand words". And then we get a review with no pictures. Just links to other stuff. And a link to an audio file - sorry, I mean 'PodCast' - which also won't have any pictures, or text I can search, or examples I can cut n paste.
It's like a review of Playboy without at least one carefully cropped picture, coupled with a taped interview with one of the bunnies.
I like matplotlib and scipy but I have lots of problems with memory not being freed when making and closing a lot of plots. It might be something I'm doing though, so I'm curious if the book discusses this.
Useful? Not in an international environment. English CSV uses commas as the name implies, but export a .csv from French excel and it uses semicolons.
I hate CSVs. Mr noob author, may I introduce my good friend Mr tab?
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
There's a fairly new project called Cairoplot that creates charts and plots using Python and Cairo. It's not meant to do number-crunching like some of the other tools mentioned, but it creates great-looking charts.
(Disclaimer: I've done a little bit of development on Cairoplot, trying to get it more LaTeX-friendly)
See http://blenderartists.org/forum/showthread.php?t=157085 for an immersive 3D system activity visualization built using Python.
Does it say anything about 3D Visualization of data? a very handy tool is VPython.
This book is awesome, it helped me really get into python. As a Computer Eng student I really wanted to get into Python but never had a good outlet, finally thanks to this book I've been able to go in head first and feel this will really help me to get going.
If you have geographic data, Google Earth is a great output viewer. It is easy to use Python to write a KML file.
Yes, I know commas are part of the CSV acronym but seriously they suck. A lot of the data I've worked with over the years (names, addresses, etc) was usually bound to have some records with embedded commas in the field values thus generating import exceptions.
I learned early on to use tabs for any CSV exports I had to create. And Excel has no problem interpreting tab-delimited files.
Yes, matplotlib is pretty powerful, but they don't have a version for python 2.6 yet. You need to install it yourself :(
Lazy developers, 2.6 has been out for ages...
1337
Best Slashdot Co