Question: Data: You are given a large data set for analysis. For this term s project, the data set is daily weather for Denver Colorado during
Data: You are given a large data set for analysis. For this terms project, the data set is daily weather
for Denver Colorado during the period of June through April The data is included in
the link for this project as a text file and an excel file. The excel file is mainly for Mac users who are
having issues with txt files from Canvas. Mac users can export the excel file as a text file. The data
set has columns. The columns are:
Month, Day, Year, precipitationinches snowinches snow depthinches max temp, min temp, Obs
temp
The month, day and year are integer values. The remaining values are floating point numbers. The
temperatures are in degrees Fahrenheit. The observed temperature is the temperature measured at
noon of that day. The maximum and minimum temperatures were the maximum and minimum recorded
during the day.
Your code can expect these columns of data from any weather station, but an arbitrary number of
rows.
Analysis: Your code should be able to perform the following analyses.
Find the total precipitation or snow per year, for a specified range of years.
Find the average precipitation P snowfall S snowpack SP max temp XT min temp NT
or observed temp OT per year, for a specified range of years.
Find the maximum or minimum P S SP XT NT or OT per year, for a specified range of years.
Extra Credit: Find the total, average, max or min for any given month within a year. For
example, find the average maximum temperature in the month of July for each of the years
through worth points
Some additional points: Some things to consider while you are planning your code. Think through
these things BEFORE you start your top level design.
There are dates missing in the data set these are days that no data was taken for unknown
reasons Therefore, you cannot just assume that every January has days, etc. You will need
to store the months, years and perhaps days as arrays to use for reference to determine the date
that any data points were taken.
You should give thought about how to store your data arrays. For example, do you want to store
everything in array, and use pointers to get a data set. Should you store dates separate from
data? Should you use a struct to store data? Do you want to develop a class object that stores
and processes data? Give thought on how you want to store and access your data before
designing any functions.
Give thought as to how you will input data requested and how this will affect the processing of
data.
Give thought as to how you will write out your data for matlab. Do you want a matlab script for
ever special case? Or do you want to write a second file that gives directives to Matlab as to
what it is plotting the first file would be the data file
Do you want your user to be able to create more than data set per run.
Give thought as to how you will determine a given quantity per year, or a given quantity per
month for extra credit.
Procedure:
Toplevel design: Create a toplevel design for your code that describes the overall process.
You are asked to write your main C program so that it reads like your toplevel design. Draw
your toplevel design BEFORE you start designing your functions.
Function design: List all the functions that you need for your code. Then, design each function
using the same process that we have been using in class. That is identify the input data and
types needed. Identify the output data and types needed and determine how the data is to be
returned to the user. From this write your function declaration. Finally, identify what is needed
in the body of the program and how it will be laid out. Then, write your function definition.
Some functions that you will need are:
a Read in the data set. This requires reading in a data set that has columns, but is of
unknown length. Before designing this function, you need to decide how you will store
this data.
b Average per a given period. This function should be able to find the average value from an
array per year, or over a specified month within a year. The function should return an array of
average values. Ask yourself, how you will pass the arrays of dates and the specific data set you
want to this function.
c Maximum or minimum per a given period. This function should be able to find the
maximum, or minimum, value from an array per year, or over a specified month within a year.
The function should return an array of max or min values. Again, ask yourself, how you will pass
the arrays of dates and the specific data set you want to this function.
d Data Out. This function should write out the data set requested to be read in by a matlab script
for plotting.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
