Book Image

Learning NumPy Array

By : Ivan Idris
Book Image

Learning NumPy Array

By: Ivan Idris

Overview of this book

Table of Contents (14 chapters)
Learning NumPy Array
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Analyzing wind direction


Wind is the movement of air due to the difference in atmospheric pressure. The KNMI De Bilt data file has a column for the vector mean wind direction in degrees (360 = north, 90 = east, 180 = south, 270 = west, 0 = calm/variable). We will plot a histogram of that data and compute the corresponding average temperature for each wind direction. It seems reasonable to expect that the direction from which the wind originates influences temperature. In other words, some locations tend to be warmer or colder, so air emanating from there will be warmer or colder, respectively. The Netherlands, as you may know, doesn't have any mountains, so we don't have to take that into account. We do have to remind ourselves of the proximity of the North Sea. The Netherlands has a moderate maritime climate with southwestern winds. We can study the wind direction information with the following procedure:

  1. We will load the wind direction and average temperatures into NumPy arrays. Wind direction...