The set of data for culpeper

Assignment Help Basic Computer Science
Reference no: EM13983713

The data will be given to you in a file that is in a comma separated format. We will be using the commas to determine where each piece of the input starts and begins. Samples of the data will be given below. After you read in all the data for a station you will output a summary for that station. There are three types of data that will be included and so there will be three types of summaries. Details on those will be below

Input

Below is a sample for a few of the weather stations. A complete list of the stations will be attached.

STATION,STATION_NAME,ELEVATION,LATITUDE,LONGITUDE,DATE,TPCP,Missing,Consecutive Missing,MNTM,Missing,Consecutive Missing
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20150101,23,0,0,-9999,0,0
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20150201,722,0,0,-9999,0,0
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20150301,211,0,0,-9999,0,0
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20150401,1198,0,0,-9999,0,0
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20150501,671,0,0,-9999,0,0
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20150601,647,0,0,-9999,0,0
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20150701,768,0,0,-9999,0,0
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20150801,112,0,0,-9999,0,0
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20150901,1592,0,0,-9999,0,0
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20151001,20,0,0,-9999,0,0
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20151101,296,0,0,-9999,0,0
GHCND:US1VACP0007,CULPEPER 6.1 W VA US,177.7,38.4595,-78.1136,20151201,193,0,0,-9999,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20150101,799,0,0,12,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20150201,563,0,0,-12,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20150301,998,0,0,67,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20150401,1183,0,0,142,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20150501,614,0,0,208,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20150601,1585,0,0,237,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20150701,965,0,0,248,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20150801,249,0,0,238,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20150901,1459,0,0,219,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20151001,1225,0,0,140,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20151101,614,0,0,113,0,0
GHCND:USC00442009,CORBIN VA US,67.1,38.2022,-77.3747,20151201,97,0,0,89,13,7
GHCND:USC00440187,AMELIA 4 SW VA US,105.2,37.3451,-77.9781,20150101,814,0,0,23,4,1
GHCND:USC00440187,AMELIA 4 SW VA US,105.2,37.3451,-77.9781,20150201,941,0,0,-7,3,1
GHCND:USC00440187,AMELIA 4 SW VA US,105.2,37.3451,-77.9781,20150301,1065,0,0,75,5,1
GHCND:USC00440187,AMELIA 4 SW VA US,105.2,37.3451,-77.9781,20150401,1086,0,0,148,1,1
GHCND:USC00440187,AMELIA 4 SW VA US,105.2,37.3451,-77.9781,20150501,329,0,0,206,0,0
GHCND:USC00440187,AMELIA 4 SW VA US,105.2,37.3451,-77.9781,20150601,1880,0,0,244,1,1
GHCND:USC00440187,AMELIA 4 SW VA US,105.2,37.3451,-77.9781,20150701,929,0,0,249,4,2
GHCND:USC00440187,AMELIA 4 SW VA US,105.2,37.3451,-77.9781,20150801,694,0,0,242,3,1

The sample above shows all three of the types of input that will be found in our tests. All the input will start with a header line like the one at the top of the input and it should be ignored. Let me explain each of the columns in the data

  1. STATION - this is the official station identification. We won't be displaying this.
  2. STATION_NAME - this is the name for the station. In our summary, we will be displaying this.
  3. ELEVATION - this is the elevation for the station. We will be displaying this.
  4. LATITUDE - this is the latitude of the station. We will be displaying this.
  5. LONGITUDE - this is the longitude of the station. We will be displaying this.
  6. DATE - this is the date for the reading. We won't be displaying this.
  7. TPCP - this is the total precipitation recorded by the station in tenths of a millimeter. We will be displaying this but it will be converted to inches.
  8. Missing - this is a number representing how many days in the month there was missing data. We will not be displaying this data.
  9. Consecutive - this is a number of consecutive days when the precipitation was not recorded. We will not be displaying this data.
  10. MNTM - this is the mean temperature recorded by the station. -9999 indicates it wasn't recorded. If it was recorded it is in Celsius.  It is recorded in tenths of a degree.  So for example 12 is really 1.2 degrees Celsius. We will be displaying this in Fahrenheit. If a station shows -9999 then we will use 0 for that report.
  11. Missing - this is a number representing how many days in the month there was missing data. We will not be displaying this data.
  12. Consecutive - this is a number of consecutive days when the temperature was not recorded. We will not be displaying this data.

The set of data for Culpeper is what I'm calling good data. It has most of the data but it is missing temperature data. That is represented by the -9999. It has all 12 months of data and so we would display this data. See the output below.

The set of data for Corbin is what I'm call all good data. It has all of the data recorded for it, including the temperature and it has all 12 months of data. See the output below.

The set of data for Amelia is what I'm calling bad data because it only has 8 months worth of data. Any set of data that is fewer than 12 months is "bad data". See the output below.

Output

If your program were run with the input above this is what the output should be:

STATION_NAME    ELEVATION   LATITUDE    LONGITUDE   TPCP    MNTM
CULPEPER 6.1 W VA US    177.7   38.4595 -78.1136    2.11713 0
CORBIN VA US    67.1    38.2022 -77.3747    3.396   57.515
AMELIA 4 SW VA US:  too few readings

NOTE: All the data in the output is TAB separated. Failure to separate each item on the line with a tab will most likely result in a project that scores very badly because my test code will use the tabs to break apart each line. There is NO tab at the end of the line, just an endl or newline character.

Requirements

Below is a set of requirements you must adhere to:

  1. You must prototype the functionvoid weatherSummary( string inputfile, string outputfile );in a file nameProject2.hPlease pay attention to the spelling and capitalization.
  2. You may not store the data in an array, vector, etc. as you read it in. Simply process it as you go.
  3. You may not use the STL or other code libraries outside of the ones we've used in examples, e.g. string, iostream, iomanip, etc.
  4. The use of global variables is prohibited. Pass your variables into your functions.
  5. You must write at least two additional functions. That's a total of at least 3 functions.
  6. Follow the style guidelines posted in Canvas.
  7. This is an individual assignment, you may not get any unauthorized assistance.

Procedure

Many times I'm asked how to get started. For this project I'd start by reading in the data and the simply printing it back out. That way you'll know that you are reading in the data correctly. Once you can do that, then I would work on figuring out when the weather station data switched from one station to the next. Once you've got that, then you'll know that you can compute the average for any station that is given.

I would write a function for reading in the data and displaying the data. I would also write a function for converting the precipitation from millimeters to inches and one for converting Celsius to Fahrenheit.

Testing

For this project I have ten tests that use the following pattern:

  1. All Good Data 1 set
  2. Good data no temp data 1 set
  3. Not enough data 1 set
  4. More than 1 set of all good data
  5. More than 1 set of data missing temp
  6. More than 1 set of not enough data
  7. Random amounts of all 3 sets of data
  8. Random amounts of all 3 sets of data
  9. Random amounts of all 3 sets of data
  10. Random amounts of all 3 sets of data

Reference no: EM13983713

Questions Cloud

Times between eruptions of the old faithful geyser : Get the data on eruption times and waiting times between eruptions of the Old Faithful geyser from the website. Estimate the mean waiting time and give a standard error for the estimate. Also, give a 90 percent con?dence interval for the mean wai..
Problem regarding the exponential distribution with mean : Let Z1, Z2,... be iid random variables with density f . Suppose that P(Zi > 0) = 1 and that λ = limx↓0 f (x) > 0. Let Xn = n min{Z1,..., Zn}. Show that Xn """ Z where Z has an exponential distribution with mean 1/λ.
Administrator of the contoso corporation : You are administrator of the Contoso Corporation. You installed a cluster of computers that need to use the same service account for the Widget application/services. What solution would you use?
Find the mean of x-find the standard deviation of x : Suppose we generate a random variable X in the following way. First we ?ip a fair coin. If the coin is heads, take X to have a Unif(0,1) distribution. If the coin is tails, take X to have a Unif(3,4) distribution.
The set of data for culpeper : The data will be given to you in a file that is in a comma separated format. We will be using the commas to determine where each piece of the input starts and begins. Samples of the data will be given below. After you read in all the data for a stati..
Origin of the real line and moves : A particle starts at the origin of the real line and moves along the line in jumps of one unit. For each jump the probability is p that the particle will jump one unit to the left and the probability is 1-p that the particle will jump one unit to th..
Define the bases for competition in the market : Based on the perceptual map, define the bases for competition in the market. Are there any strategic groups - how well-positioned is Emergent with its proposed attribute levels?
Discuss theimportance of the future : Read the article by Wagner titled "Top 10 Disappearing Futures" located in the ABI/Inform database of the CSU OnlineLibrary. Choose one of the disappearing futures and write a paper at least two pages in length discussing it. Discuss theimportance of..
Histogram of y and compare it to the pdf : Generate a vector x = (x1,..., x10,000) con- sisting of 10,000 random standard Normals. Let y = (y1,..., y10,000) where yi = exi . Draw a histogram of y and compare it to the pdf you found in part (a).

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Understanding of computer hardware

The purpose of this assignment is for you to test your understanding of computer hardware, compatible architecture, and system requirements. You will design your own computer by selecting parts from the website NewEgg.com. You will be given a budget ..

  What effect does font selection have on readability

What effect does font selection have on readability and the viewer's perception and How does the use of font further or hinder the intended message?

  Class templates are typically used to replace overloaded

1.How would you overload the comparison operators == and !=? What is the format to overload these operators? 2. Class templates are typically used to replace overloaded functions. Can you compare the two?

  We will compare the performance of a vector processor

In this problem, we will compare the performance of a vector processor with a hybrid system that contains a scalar processor and a GPU-based coprocessor.

  Management information systems

Management Information Systems

  Explain johnson-johnson-s approach for it infrastructure

Discuss Johnson & Johnson's Approach ro providing an IT infrastructure to support its one-face-to-the-customer strategy?

  What is the difference between zero copy

What is the difference between zero copy forwarding and kernel bypassing?

  What are the advantages of flash memory over hard disk

1. what are the advantages of flash memory over hard disk storage? what are the advantages of hard disk over flash

  Sunshine machine works has expanded its infrastructure

Since you are responsible for IT Services and want to keep the systems and network functioning effectively, you will want to identify activities which would be permitted and which activities would be prohibited. Management will take your policy..

  Define a class called blogentry

Define a class called BlogEntry that could be used to store an entry for a Web log. The class should have instance variables to store the poster's username, text of the entry, and the date of the entry using the Date class.

  Automata theory involves the study of mathematical objects

Automata theory involves the study of mathematical objects called automata and the computational problems that can be solved using them. Context-free grammar provides us with mathematical techniques of building phases in a language from other bloc..

  Software developer development and improvement

This assignment consists of two (2) sections: an improvement plan and a PowerPoint presentation. You must submit the two (2) sections as separate files for the completion of this assignment.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd