The file akaroawindgusts.txt contains hourly maximum wind gusts speeds at the Akaroa Electronic weather station (Ews) through February 2014. Inspect it in any halfway decent text editor (not Microsoft Notepad, but Wing will do) so you can see which column contains the wind speed data, how many rows to skip, and what the column separator (delimiter) is. Then write a function plot_wind gust _histogram(filename) that reads a file in that format and plots a histogram of the peak wind gust speeds. The graph you get should look like the one below. Wind gusts from akaroawindgusts.txt 250 200 150 100 50 10 20 30 40 50 60 70 80 90 100 110 120 130 140 Wind gust speed (km/h) Notes: • The bins are all 10 km/h wide, starting at 0 - 10 and finishing at 130 - 140. You must set these bins explicitly. • It is not a density plot - the vertical axis displays a count of how many records were in each bin. You will have to explicitly set x ticks every 10 km/h. • Your function is not permitted to use any loops, if statements, or list comprehensions. • Your plot should have the title "Wind gusts from (filename}" (where (filename} is the given filename), x-label "Wind gust speed (km/h)", and y-label "Count". • We won't check the colour of your graph. (However, if you'd like your graph to exactly match the image above, the colour is set to "blue". You can find details on how to change the colour later in this module under 'More cool matplotlib stuff'.) • Do not include a call to plot_wind_gust_histogram - the tests will call your function. Count

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
The file akaroawindgusts.txt contains hourly maximum wind gusts speeds at the Akaroa Electronic weather station (Ews) through February 2014. Inspect it in
any halfway decent text editor (not Microsoft Notepad, but Wing will do) so you can see which column contains the wind speed data, how many rows to skip,
and what the column separator (delimiter) is. Then write a function plot_ wind gust histogram(filename) that reads a file in that format and plots a histogram
of the peak wind gust speeds. The graph you get should look like the one below.
Wind gusts from akaroawindgusts.txt
250
200
150
100
50
0 10
20 30
40
50 60 70
80
90 100 110 120 130 140
Wind gust speed (km/h)
Notes:
• The bins are all 10 km/h wide, starting at 0 10 and finishing at 130 - 140. You must set these bins explicitly.
• It is not a density plot - the vertical axis displays a count of how many records were in each bin.
• You will have to explicitly set x ticks every 10 km/h.
• Your function is not permitted to use any loops, if statements, or list comprehensions.
• Your plot should have the title "Wind gusts from {filename}" (where (filename} is the given filename), x-label "Wind gust speed (km/h)", and y-label "Count".
• We won't check the colour of your graph. (However, if you'd like your graph to exactly match the image above, the colour is set to "blue". You can find
details on how to change the colour later in this module under 'More cool matplotlib stuff.)
• Do not include a call to plot_wind_gust_histogram - the tests will call your function.
Count
Transcribed Image Text:The file akaroawindgusts.txt contains hourly maximum wind gusts speeds at the Akaroa Electronic weather station (Ews) through February 2014. Inspect it in any halfway decent text editor (not Microsoft Notepad, but Wing will do) so you can see which column contains the wind speed data, how many rows to skip, and what the column separator (delimiter) is. Then write a function plot_ wind gust histogram(filename) that reads a file in that format and plots a histogram of the peak wind gust speeds. The graph you get should look like the one below. Wind gusts from akaroawindgusts.txt 250 200 150 100 50 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 Wind gust speed (km/h) Notes: • The bins are all 10 km/h wide, starting at 0 10 and finishing at 130 - 140. You must set these bins explicitly. • It is not a density plot - the vertical axis displays a count of how many records were in each bin. • You will have to explicitly set x ticks every 10 km/h. • Your function is not permitted to use any loops, if statements, or list comprehensions. • Your plot should have the title "Wind gusts from {filename}" (where (filename} is the given filename), x-label "Wind gust speed (km/h)", and y-label "Count". • We won't check the colour of your graph. (However, if you'd like your graph to exactly match the image above, the colour is set to "blue". You can find details on how to change the colour later in this module under 'More cool matplotlib stuff.) • Do not include a call to plot_wind_gust_histogram - the tests will call your function. Count
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY