失效链接处理 |
Beginning_Python_Visualization__Crafting_Visual_Transformation_Scripts PDF 下载
本站整理下载:
提取码:52n7
相关截图:
主要内容:
As an engineer, I work with data all the time. I parse log files, analyze data, estimate values,
and compare the results with theory. Things don’t always add up. So I double-check my analysis, perform more calculations, or run simulations to better understand the results. I refer to
previous work because the ideas are similar or sometimes because they’re dissimilar. I look at
the graphs and realize I’m missing some crucial information. So I add the missing data, but it’s
noisy and needs filtering. Eventually, I realize my implementation of the algorithm is poor or
that there is a better algorithm with better results, and so back to square one. It’s an iterative
process: tweak, test, tweak again until I’m satisfied with the results.
Those are the tasks surrounding research and development (R&D) work. And to be honest,
there’s no systematic method. Most of the time, research is organized chaos. The emphasis,
however, should be on organized, not chaos. Data should be analyzed and presented in a
clear and coherent manner. Sources for graphs well understood and verified to be accurate.
Algorithms tested and proven to be working as intended. The system should be flexible. Introducing new ideas and challenging previous methods should be easy and testing new ideas on
current data fast and efficient.
In this book I will attempt to address all the topics associated with data processing and
visualization: managing files and directories, reading files of varying formats, performing
signal processing and numerical analysis in a high-level programming language similar to
MATLAB and GNU-Octave, and teaching you Python, a rich and powerful programming language, along the way.
In a nutshell, Beginning Python Visualization deals with the processing, analysis, manipulation, and visualization of data using the Python programming language. The book covers the
following:
1
2 CHAPTER 1 N NAVIGATING THE WORLD OF DATA VISUALIZATION
s &UNDAMENTALSOFTHE0YTHONPROGRAMMINGLANGUAGEREQUIREDFORDATAANALYSISAND
visualization
s $ATAFILESFORMATANDORGANIZATIONASWELLASMETHODSANDGUIDELINESFORSELECTINGFILE
formats and storing and organizing data to enable fast, efficient data processing
s 2EADILYAVAILABLE0YTHONPACKAGESFORNUMERICALANALYSISSIGNALANDIMAGEPROCESSING
graphing and plotting, and more
Gathering Data
We spend a considerable time recording and analyzing data. Data is stored in various formats
depending on the tools used to collect it, the nature of the data (e.g., pictures vs. sampled
analog data), the application that will later process the data, and personal preferences. Data
files are of varying sizes; some are very large, others are smaller but in larger quantities. Data
ORGANIZATIONADDSANOTHERLEVELOFCOMPLEXITY&ILESCANBESTOREDINDIRECTORIESACCORDINGTO
date, grouped together in one big directory or in a database, or adhere to a different scheme
altogether. Typically, the number of data files or the amount of data per file is too large to
allow skimming or browsing with an editor or viewer. Methods and tools are required to find
the data and analyze it to produce meaningful results.
Case Study: GPS Data
You just got a USB GPS receiver for your birthday! You’d like to analyze GPS data and find out
how often you exceed the speed limit and how much time you spend in traffic. You’d like to
track data over a year, or even longer.
Some hardware background: most USB GPS receivers behave as serial ports (this is also
true for Bluetooth GPS devices). What this means is that once a GPS is connected, and assuming it’s installed properly, reading GPS data is as simple as opening the COM port associated
with the GPS and reading the values. GPS values are typically clear text values: numbers and
text. Of course, if you’re planning on recording data from your car, it would make a lot of sense
to hook it up to a laptop rather than a desktop.
7EWOULDLIKETORECORDANALYZEANDVISUALIZETHE'03DATAIN0YTHON&IRSTTHINGSFIRST
recording GPS data.
NNote If you wish to follow along with the remainder of the chapter by means of issuing the commands
yourself and viewing the results, you might first want to refer to Chapter 2 and set up Python on your system.
That being said, it’s not necessary, and you can follow along to get an understanding of the book and its
purpose. In fact, I encourage you to come back to this chapter and read it again after you’ve had more experience with Python.
Python is an interpreted programming language. What this means is each command
is first read and then executed, in contrast to compiled programming languages, where the
entire program is evaluated (compiled) and then executed. One of the important features of
CHAPTER 1 N
|