Skip to content

Instantly share code, notes, and snippets.

@desrtfx
Last active January 3, 2016 11:09
Show Gist options
  • Save desrtfx/8454213 to your computer and use it in GitHub Desktop.
Save desrtfx/8454213 to your computer and use it in GitHub Desktop.
WeatherAnalysis assignment Takes weatherdata from a CSV file and calculates average, max, min of temperature, rain, snow, humidity, wind
/**The DataPoint class represents a single weather data entry
*
*
* @author desrtfx
*
*/
public class DataPoint {
private int year;
private int month;
private double temperature;
private double rainfall;
private double snowfall;
private double humidity;
private double wind;
/** Default constructor
* Initializes a new DataPoint with 0 values for every member variable
*/
public DataPoint() {
year = 0;
month = 0;
temperature = 0.0;
rainfall = 0.0;
snowfall = 0.0;
humidity = 0.0;
wind = 0.0;
}
/**Constructor for parsed weatherdata
* @param year
* @param month
* @param temperature
* @param rainfall
* @param snowfall
* @param humidity
* @param wind
*/
public DataPoint(int year, int month, double temperature, double rainfall,
double snowfall, double humidity, double wind) {
this.year = year;
this.month = month;
this.temperature = temperature;
this.rainfall = rainfall;
this.snowfall = snowfall;
this.humidity = humidity;
this.wind = wind;
}
/**Constructor for String weatherdata
* @param year
* @param month
* @param temperature
* @param rainfall
* @param snowfall
* @param humidity
* @param wind
*/
public DataPoint(String year, String month, String temperature, String rainfall,
String snowfall, String humidity, String wind) {
this.year = Integer.parseInt(year);
this.month = Integer.parseInt(month);
this.temperature = Double.parseDouble(temperature);
this.rainfall = Double.parseDouble(rainfall);
this.snowfall = Double.parseDouble(snowfall);
this.humidity = Double.parseDouble(humidity);
this.wind = Double.parseDouble(wind);
}
/**Constructor for weatherData as String Array
* @param weatherData
*/
public DataPoint(String[] weatherData) {
if (weatherData.length == 7) {
year = Integer.parseInt(weatherData[0]);
month = Integer.parseInt(weatherData[1]);
temperature = Double.parseDouble(weatherData[2]);
rainfall = Double.parseDouble(weatherData[3]);
snowfall = Double.parseDouble(weatherData[4]);
humidity = Double.parseDouble(weatherData[5]);
wind = Double.parseDouble(weatherData[6]);
}
else {
throw(new RuntimeException("Invalid length of weather data."));
}
}
/**Constructor with weatherdata as String (as read from file)
* @param weatherData
*/
public DataPoint(String weatherData) {
String[] theData = weatherData.split(",");
if (theData.length == 7) {
year = Integer.parseInt(theData[0]);
month = Integer.parseInt(theData[1]);
temperature = Double.parseDouble(theData[2]);
rainfall = Double.parseDouble(theData[3]);
snowfall = Double.parseDouble(theData[4]);
humidity = Double.parseDouble(theData[5]);
wind = Double.parseDouble(theData[6]);
}
else {
throw(new RuntimeException("Invalid length of weather data."));
}
}
/**
* @return the year
*/
public int getYear() {
return year;
}
/**
* @param year the year to set
*/
public void setYear(int year) {
this.year = year;
}
/**
* @return the month
*/
public int getMonth() {
return month;
}
/**
* @param month the month to set
*/
public void setMonth(int month) {
this.month = month;
}
/**
* @return the temperature
*/
public double getTemperature() {
return temperature;
}
/**
* @param temperature the temperature to set
*/
public void setTemperature(double temperature) {
this.temperature = temperature;
}
/**
* @return the rainfall
*/
public double getRainfall() {
return rainfall;
}
/**
* @param rainfall the rainfall to set
*/
public void setRainfall(double rainfall) {
this.rainfall = rainfall;
}
/**
* @return the snowfall
*/
public double getSnowfall() {
return snowfall;
}
/**
* @param snowfall the snowfall to set
*/
public void setSnowfall(double snowfall) {
this.snowfall = snowfall;
}
/**
* @return the humidity
*/
public double getHumidity() {
return humidity;
}
/**
* @param humidity the humidity to set
*/
public void setHumidity(double humidity) {
this.humidity = humidity;
}
/**
* @return the wind
*/
public double getWind() {
return wind;
}
/**
* @param wind the wind to set
*/
public void setWind(double wind) {
this.wind = wind;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return String
.format("DataPoint [year=%s, month=%s, temperature=%s, rainfall=%s, snowfall=%s, humidity=%s, wind=%s]",
year, month, temperature, rainfall, snowfall, humidity,
wind);
}
}
import java.util.ArrayList;
/**
* Class DataPoints holds an ArrayList for the actual weatherData
* The ArrayList is of type DataPoint to store the parsed weatherData
*
* Methods for easy adding and calculations exist
*
* @author desrtfx
*
*/
public class DataPoints {
// The actual data list
private ArrayList<DataPoint> dataPoints;
// Default constructor, initialise the ArrayList
public DataPoints() {
dataPoints = new ArrayList<DataPoint>();
}
// Add a DataPoint to the ArrayList
public void add(DataPoint dataPoint) {
dataPoints.add(dataPoint);
}
// Add a DataPoint passed as String Array to the ArrayList
public void add(String[] weatherData) {
dataPoints.add(new DataPoint(weatherData));
}
// Add a DataPoint passed as String to the ArrayList
public void add(String weatherData) {
dataPoints.add(new DataPoint(weatherData));
}
// Add a DataPoint split into the individual values to the ArrayList
public void add(int year, int month, double temperature, double rainfall,
double snowfall, double humidity, double wind) {
dataPoints.add(new DataPoint(year, month, temperature, rainfall, snowfall, humidity, wind));
}
// Return the ArrayList
public ArrayList<DataPoint> getDataPoints() {
return this.dataPoints;
}
// Return a certain DataPoint from the ArrayList
public DataPoint getDataPoint(int index) {
return dataPoints.get(index);
}
// Calculate and return the average Temperature
public double getAverageTemperature() {
double avg = 0.0;
for(DataPoint d:dataPoints) {
avg += d.getTemperature();
}
avg /= dataPoints.size();
return avg;
}
// Calculate and return the maximum Temperature
public double getMaxTemperature() {
double max = Double.MIN_VALUE;
for(DataPoint d:dataPoints) {
if (max < d.getTemperature()) {
max = d.getTemperature();
}
}
return max;
}
// Calculate and return the minimum Temperature
public double getMinTemperature() {
double min = Double.MAX_VALUE;
for(DataPoint d:dataPoints) {
if (min > d.getTemperature()) {
min = d.getTemperature();
}
}
return min;
}
// Calculate and return the average Rainfall
public double getAverageRainfall() {
double avg = 0.0;
for(DataPoint d:dataPoints) {
avg += d.getRainfall();
}
avg /= dataPoints.size();
return avg;
}
// Calculate and return the maximum Rainfall
public double getMaxRainfall() {
double max = Double.MIN_VALUE;
for(DataPoint d:dataPoints) {
if (max < d.getRainfall()) {
max = d.getRainfall();
}
}
return max;
}
// Calculate and return the minimum Rainfall
public double getMinRainfall() {
double min = Double.MAX_VALUE;
for(DataPoint d:dataPoints) {
if (min > d.getRainfall()) {
min = d.getRainfall();
}
}
return min;
}
// Calculate and return the average Snowfall
public double getAverageSnowfall() {
double avg = 0.0;
for(DataPoint d:dataPoints) {
avg += d.getSnowfall();
}
avg /= dataPoints.size();
return avg;
}
// Calculate and return the maximum Snowfall
public double getMaxSnowfall() {
double max = Double.MIN_VALUE;
for(DataPoint d:dataPoints) {
if (max < d.getSnowfall()) {
max = d.getSnowfall();
}
}
return max;
}
// Calculate and return the minimum Snowfall
public double getMinSnowfall() {
double min = Double.MAX_VALUE;
for(DataPoint d:dataPoints) {
if (min > d.getSnowfall()) {
min = d.getSnowfall();
}
}
return min;
}
// Calculate and return the average Humidity
public double getAverageHumidity() {
double avg = 0.0;
for(DataPoint d:dataPoints) {
avg += d.getHumidity();
}
avg /= dataPoints.size();
return avg;
}
// Calculate and return the maximum Humidity
public double getMaxHumidity() {
double max = Double.MIN_VALUE;
for(DataPoint d:dataPoints) {
if (max < d.getHumidity()) {
max = d.getHumidity();
}
}
return max;
}
// Calculate and return the minimum Humidity
public double getMinHumidity() {
double min = Double.MAX_VALUE;
for(DataPoint d:dataPoints) {
if (min > d.getHumidity()) {
min = d.getHumidity();
}
}
return min;
}
// Calculate and return the average Wind
public double getAverageWind() {
double avg = 0.0;
for(DataPoint d:dataPoints) {
avg += d.getWind();
}
avg /= dataPoints.size();
return avg;
}
// Calculate and return the maximum Wind
public double getMaxWind() {
double max = Double.MIN_VALUE;
for(DataPoint d:dataPoints) {
if (max < d.getWind()) {
max = d.getWind();
}
}
return max;
}
// Calculate and return the minimum Wind
public double getMinWind() {
double min = Double.MAX_VALUE;
for(DataPoint d:dataPoints) {
if (min > d.getWind()) {
min = d.getWind();
}
}
return min;
}
// return the size of the ArrayList - number of DataPoints
public int size() {
return dataPoints.size();
}
}
1946 1 5.7 0.6 16 108.1 31.5
1946 2 8.2 3.5 6 111.8 71
1946 3 8.8 2 9 32.9 102.9
1946 4 14.1 6.3 0 29.2 150.5
1946 5 13.9 6 0 60.7 143.6
1946 6 17.1 9.5 0 85.3 178.9
1946 7 20.3 12.8 0 63.9 170.7
1946 8 18.2 11.1 0 110.2 130.1
1946 9 17 10.7 0 113 98
1946 10 11.7 7.5 0 32 47.5
1946 11 10.2 5.8 0 158.2 22.5
1946 12 5.8 1.3 6 80.4 45.3
1947 1 3.7 0 16 85.4 34.8
1947 2 -0.6 -3.5 28 69 18.5
1947 3 5.3 0.2 14 141.4 58.5
1947 4 11.9 5 0 88.5 142
1947 5 18.2 8.5 0 56.8 151.3
1947 6 19.8 11.7 0 68.4 168.6
1947 7 20.6 13.6 0 32.8 116.7
1947 8 23.9 13.3 0 12.7 239
1947 9 18.8 11.1 0 35.5 145.5
1947 10 14.6 8.2 0 14 83.1
1947 11 9.8 4.7 5 72.6 89.2
1947 12 7.6 3.4 6 94 22.8
1948 1 7.2 2.6 1 165.3 32.4
1948 2 6.5 2.3 8 59 34.8
1948 3 12.4 4 2 26.1 131.2
1948 4 12.9 4.9 0 42.1 154.7
1948 5 15.9 6.5 0 38.4 216.8
1948 6 16.9 9.7 0 72.5 151.8
1948 7 19.7 11.7 0 24.2 171.6
1948 8 18.5 11.5 0 118.9 108
1948 9 16.7 10.8 0 37.4 101
1948 10 13.4 7.2 0 37.1 78.3
1948 11 10.6 4.9 3 28 62.9
1948 12 7.9 3 5 87.6 33
1949 1 7.8 3 3 34.4 48
1949 2 8.9 2.8 5 38.4 96
1949 3 7.2 1.9 8 32.5 90.3
1949 4 13.7 6 0 66.4 148.3
1949 5 15.6 6.7 0 41 225.2
1949 6 20.2 9.9 0 13.3 227.1
1949 7 21.6 12.7 0 114.8 170.4
1949 8 21.1 12.5 0 41.6 181
1949 9 19.9 12.3 0 28 126.9
1949 10 14.5 8.1 1 84.2 92.7
1949 11 8.9 4 1 112.9 46.8
1949 12 8 3.3 0 105.7 35
1950 1 6.4 2.3 9 35.7 15.8
1950 2 8 1.8 5 147.9 65.6
1950 3 11.4 4 1 25.5 114.2
1950 4 10.7 3.4 1 78 141.4
1950 5 13.9 6.8 0 38.9 112.7
1950 6 21.1 11.4 0 28.4 248.8
1950 7 19.9 12.2 0 43.1 184.2
1950 8 19.8 11.8 0 84.6 160.9
1950 9 16.1 9.6 0 87.1 106.4
1950 10 12.6 7 0 35.4 90.5
1950 11 8.1 3.3 2 119.3 34.5
1950 12 3.2 -0.3 16 50.6 36.1
1951 1 5.9 1.6 8 68.8 41.7
1951 2 5.7 1 2 92.4 41.1
1951 3 6.5 0.9 7 102.5 75.7
1951 4 10.3 3.4 0 31.8 146.1
1951 5 13 5.8 0 100.6 118.2
1951 6 17.9 9.4 0 14.7 206.8
1951 7 20.6 12.3 0 32.9 184.9
1951 8 18.4 11.2 0 133.1 143.7
1951 9 17.7 10.7 0 45.1 113.5
1951 10 13.5 6.5 0 23.7 96.3
1951 11 10.6 6 0 199.2 50.9
1951 12 8.2 2.6 4 92.9 38.8
1952 1 5 0.7 7 89.9 52.9
1952 2 6.4 0.9 11 19.7 60.5
1952 3 9 3.5 5 57 61.8
1952 4 13.7 5.4 0 40.8 140.7
1952 5 17.6 9 0 74.4 173.9
1952 6 18.4 10.3 0 37.4 192.8
1952 7 19.9 12.9 0 32.6 137.4
1952 8 19.9 12 0 37 160.3
1952 9 13.7 8.1 0 70 77.3
1952 10 11.8 6.2 0 124.6 94.2
1952 11 6.6 2.3 5 50.7 55.5
1952 12 5.9 1.5 7 60.4 39.5
1953 1 6.4 2.4 3 21.2 26.3
1953 2 7.3 2.6 6 54.8 40.2
1953 3 10.6 2 8 47.8 82.4
1953 4 11 3.4 0 59.9 128.9
1953 5 17.4 8.5 0 61.4 180
1953 6 17.8 10.7 0 49.5 108.7
1953 7 19.4 12 0 66.1 184.4
1953 8 20.2 12.4 0 79.6 180.9
1953 9 18 10.3 0 34.8 142.8
1953 10 13.3 6.5 0 50.3 68.2
1953 11 11.2 6.3 0 44 39.7
1953 12 8.8 5 0 28.8 24.2
1954 1 5.3 1 11 70.2 27.5
1954 2 4.3 -0.2 11 74.5 40.5
1954 3 8.6 2.4 3 61.4 90.4
1954 4 11.7 4.1 0 7.6 120.4
1954 5 14.9 7.4 0 93.8 104.4
1954 6 16.4 9.9 0 57.2 117.5
1954 7 17.4 10.9 0 49.2 126.9
1954 8 17.7 11 0 166.7 98.8
1954 9 16.4 9 0 58 161.4
1954 10 14.9 9.2 0 78.7 80.5
1954 11 9.6 4.1 0 170.7 48
1954 12 8.8 4.3 2 95.8 31.5
1955 1 4.8 0.5 12 60 31.7
1955 2 3.5 -0.9 17 69.2 55
1955 3 6.5 -0.1 17 88.1 106.5
1955 4 13.5 5.9 0 19 137
1955 5 12.9 5.7 0 85.5 181.5
1955 6 17.2 9.3 0 85.9 121.8
1955 7 22.9 12.8 0 30.8 231.4
1955 8 22 13.5 0 19.3 139.2
1955 9 18.4 11 0 18.4 150.6
1955 10 13.3 6.5 2 60.4 130.3
1955 11 9.7 5.2 0 67.2 30.8
1955 12 8.1 2.9 6 96.4 32.7
1956 1 6.2 1.5 7 154 38.8
1956 2 3.1 -1.8 21 30.5 37.2
1956 3 9.1 2.3 6 26.4 85.2
1956 4 10.3 2.7 1 63.5 110.7
1956 5 16.8 7.7 0 11.2 231.6
1956 6 16.5 9.4 0 82.1 148.1
1956 7 18.7 12.4 0 141.7 121.8
1956 8 16.6 10.2 0 146.1 112.1
1956 9 17.6 10.7 0 83.4 98.4
1956 10 12.9 6.9 0 33.1 98.4
1956 11 8.8 4.4 2 21.4 34.7
1956 12 7.7 3.7 6 107.9 17.9
1957 1 8.1 2.9 5 44.8 28.9
1957 2 8 2 4 78.8 75.1
1957 3 12.2 5.8 0 58.2 68.8
1957 4 12.3 4.8 0 2.2 106.9
1957 5 14.6 6.3 0 27.3 160.7
1957 6 20.5 10.1 0 31.8 275.7
1957 7 19.5 12.9 0 83.2 112.3
1957 8 18.2 12 0 117.2 106.3
1957 9 15.3 9.6 0 98.8 111.4
1957 10 14.1 7.7 0 41.6 80.9
1957 11 8.7 4.9 1 61.3 41.4
1957 12 7.2 2.2 9 88.3 26
1958 1 6.2 1.1 13 86.4 45.2
1958 2 7.2 1.6 10 121.7 62.6
1958 3 6.1 0.8 16 49.9 82.9
1958 4 11.4 3.8 2 19.7 126.3
1958 5 15.5 7.4 0 71.4 151.9
1958 6 17.2 9.7 0 126.6 95
1958 7 19.5 12.2 0 144.6 161
1958 8 19.6 12.2 0 65.9 119.8
1958 9 18.5 11.7 0 85.8 93.1
1958 10 13.9 7.7 0 66.8 91.2
1958 11 9.2 4.4 1 15.6 44.9
1958 12 6.8 2.7 3 110 14.3
1959 1 4.7 -0.2 18 89.7 68.2
1959 2 7.6 2.7 5 2.2 49.7
1959 3 10 4.3 0 38.4 72.7
1959 4 13.2 5.9 0 88.5 139.2
1959 5 17.5 8 0 26.7 194.6
1959 6 20 10.9 0 30.7 227.8
1959 7 22.2 13.1 0 33.5 215.8
1959 8 22.4 13.2 0 18.8 201.4
1959 9 20 10.6 0 0.6 146.2
1959 10 16.4 8.3 0 57.4 108.2
1959 11 9.3 4.5 2 106 36.6
1959 12 8 3.4 0 116.8 18.1
1960 1 6.2 1.9 6 137.7 23.7
1960 2 6.5 1.2 11 77.9 55.4
1960 3 8 3.1 1 52.1 44.9
1960 4 13.4 5.5 0 38.9 147.8
1960 5 17.6 8.8 0 46.4 166.2
1960 6 21.7 11.5 0 41.4 261.8
1960 7 19.1 11.4 0 64.8 131.3
1960 8 19.1 11.4 0 80.6 143.2
1960 9 16.8 9.9 0 108.7 111.4
1960 10 12.4 7.5 0 179 48.1
1960 11 9.6 4.7 0 116.2 44.3
1960 12 6.5 2.3 4 91.5 47.1
1961 1 5.4 1.1 6 96.1 27.4
1961 2 9.6 4.2 0 63.1 67.9
1961 3 13.1 5.4 0 14.3 142.5
1961 4 13 6 0 84.1 85.5
1961 5 14.5 6.9 0 42.9 170.1
1961 6 19.2 10.4 0 33.9 199.7
1961 7 18.8 11.3 0 55.7 161.4
1961 8 19.3 11.8 0 62.2 187.2
1961 9 19.3 11.3 0 53 133.5
1961 10 13.9 7.7 0 94.9 118.7
1961 11 8.7 4.1 1 42.3 53.5
1961 12 5 -0.2 15 75.5 42.1
1962 1 7.3 2.1 6 91.2 67.1
1962 2 7 1.9 6 57.8 68.6
1962 3 6 -0.6 17 27.8 116.7
1962 4 11.1 3.9 0 76.3 138.1
1962 5 13.6 6.2 0 78.4 149.9
1962 6 18.3 9.3 0 13.5 206.6
1962 7 17.8 10.8 0 39.7 99.5
1962 8 17.8 10.8 0 94.9 145.6
1962 9 16 9.3 0 84.4 87.4
1962 10 13.9 7.4 1 32 85.8
1962 11 7.8 2.9 6 38.5 31.3
1962 12 5.3 -0.6 15 54.1 46.5
1963 1 1.3 -2.9 28 46.8 39.4
1963 2 1.4 -3.5 28 28.3 41.9
1963 3 8.9 1.6 6 72 93.8
1963 4 11.7 4.4 0 60.3 79.5
1963 5 14.6 6.4 0 31.5 155.1
1963 6 19.3 10.3 0 99.1 179.9
1963 7 19.7 11 0 68.6 173.3
1963 8 17.6 10.6 0 60.1 88.5
1963 9 16.9 9.2 0 79.5 136.6
1963 10 13.6 7.4 0 39.4 73.4
1963 11 9.7 5.4 1 132.5 33.3
1963 12 5.2 1 11 18.7 35.1
1964 1 5.8 1 8 23.1 54.8
1964 2 6.6 1.7 11 28.7 50.5
1964 3 5.5 1.2 8 122.4 46.6
1964 4 12.7 5.4 0 46.1 91.3
1964 5 18.2 8.7 0 55.5 203
1964 6 17 10.1 0 70.2 105.8
1964 7 19.8 11.9 0 50.8 184.9
1964 8 19.5 11.5 0 49.4 179.3
1964 9 18.7 9.3 0 20.8 165.1
1964 10 12.5 5.7 0 41.8 106.7
1964 11 9.8 4.7 2 40.8 40.9
1964 12 6.3 0.4 16 93.7 61.3
1965 1 5.7 1.4 12 90.1 57.4
1965 2 5.5 1.5 8 22.4 21.3
1965 3 8.8 1 10 74 112
1965 4 12 4.3 0 50 134.8
1965 5 15.5 7.6 0 68.2 137.1
1965 6 19 10.4 0 91.8 163.7
1965 7 17 10.5 0 58.9 91.3
1965 8 19 11.1 0 49.2 133.7
1965 9 15.6 9.3 0 167.4 82.8
1965 10 14.2 7.6 0 27.5 73.1
1965 11 6.5 1.9 8 147.5 63.1
1965 12 7 2 5 191.5 52.1
1966 1 4.3 0.6 14 41.5 22.9
1966 2 7.2 2.5 11 154.2 25.2
1966 3 9.6 3.5 4 46.9 110.3
1966 4 8.7 3.5 6 140.6 74.1
1966 5 15.7 7.2 0 58.8 209.2
1966 6 19.4 11.4 0 61.3 142.8
1966 7 18.4 11.5 0 44.5 130.8
1966 8 18.8 10.8 0 92.9 124.6
1966 9 17.6 10.2 0 55.7 107.8
1966 10 12.8 6.7 0 101.4 66.1
1966 11 7.8 3.5 0 93.9 41.1
1966 12 7.5 2.7 3 77.3 36.1
1967 1 6.3 1.8 11 49.7 66.3
1967 2 7.7 3.1 3 70.9 52.2
1967 3 10.2 4.2 1 57.8 165.4
1967 4 11.2 4.5 1 32.7 85.8
1967 5 13.9 6.4 1 172.6 142.1
1967 6 19.5 10.2 0 13.7 212.8
1967 7 21.5 12.8 0 40.9 178
1967 8 20 12 0 70.3 117.8
1967 9 17 9.5 0 62.5 88.4
1967 10 13.9 7.7 0 115.5 110.4
1967 11 8.1 2.3 6 71.4 50.4
1967 12 6.7 2 11 44.7 52.8
1968 1 6.7 1.9 11 67.4 36.1
1968 2 4.4 -0.4 17 42.8 60.5
1968 3 9.7 3.2 5 61.3 98.2
1968 4 12.9 3.9 9 54.2 152.3
1968 5 13.7 5.9 0 82.8 100.9
1968 6 19.5 10.3 0 54.9 174.1
1968 7 18.2 11.5 0 112.5 69.9
1968 8 19.4 11.8 0 41.8 99.9
1968 9 17.2 10.6 0 155.2 74.1
1968 10 15 9.8 0 63.5 63.8
1968 11 8 4.2 1 87.3 29.6
1968 12 5 1.2 9 52.9 28.3
1969 1 7.8 3 7 85 28.8
1969 2 2.5 -1.5 20 101 63.5
1969 3 4.7 0 19 119.9 48.1
1969 4 11.2 3.4 1 76.1 147.5
1969 5 14.6 7.4 0 99.1 99.2
1969 6 18.8 9.3 0 62.5 253.4
1969 7 21.5 12.9 0 52.6 227.3
1969 8 19.9 12.6 0 48.5 129
1969 9 17.3 10.5 0 38.9 75.4
1969 10 15.9 9.6 0 24.7 76.9
1969 11 7.5 2.2 5 163.7 61.5
1969 12 5.8 1.6 13 72.7 30.5
1970 1 5.7 1.5 8 94.7 36.8
1970 2 5.5 0.1 11 104 88.5
1970 3 6.6 0.8 13 55.4 114.6
1970 4 10.4 3.4 4 106.6 137.2
1970 5 17.4 8.5 0 16.9 160.2
1970 6 21.8 11.2 0 24.2 238.9
1970 7 19 11.9 0 39.2 153.3
1970 8 20.4 12.2 0 72.9 137.6
1970 9 18.3 11.2 0 42.8 122.6
1970 10 14.1 7.5 0 47.9 101
1970 11 9.6 5.1 1 141.4 48.4
1970 12 6.2 2.6 6 40.6 45.7
1971 1 6.6 2.3 8 69.3 39.9
1971 2 7.6 2.6 3 26.7 63.3
1971 3 8.1 2.8 5 47.2 79.8
1971 4 11.1 4.3 0 84.1 70
1971 5 16.4 7 0 63.5 207.3
1971 6 15.6 8.8 0 69.4 131.5
1971 7 22.1 12.8 0 86.3 207.2
1971 8 19.4 11.8 0 102.2 121.1
1971 9 18.8 10.1 0 31.2 148
1971 10 15.3 8.1 0 92.8 139.3
1971 11 9.1 3.7 4 62.6 78.5
1971 12 8.8 4.8 0 35.1 48.2
1972 1 5.7 1.6 8 92.7 38.7
1972 2 5.8 1.8 5 65.9 28.9
1972 3 9.9 2.5 4 106.2 118.6
1972 4 11.5 5.3 0 56.9 94.6
1972 5 14.4 6.8 0 56.6 135.4
1972 6 15.8 8.7 0 83.1 127.8
1972 7 19.5 11.6 0 55.7 148.4
1972 8 19.3 11.5 0 61.2 180.8
1972 9 15.1 8.5 0 50.6 80.4
1972 10 13.5 7 0 14.5 61.7
1972 11 9.2 4.5 1 84.9 68.6
1972 12 7.6 2.9 0 80.3 22.7
1973 1 6.7 2.8 5 39.8 26.7
1973 2 7.4 2.1 9 65 91.7
1973 3 10.6 3.6 0 15.1 127.3
1973 4 10.6 3.5 2 77.5 142.1
1973 5 15.5 7.4 0 59.5 150.6
1973 6 20 10.8 0 44 204.2
1973 7 19.7 12.1 0 200.6 115.6
1973 8 20.7 12.1 0 58 161.9
1973 9 18 10.5 0 58.1 108.8
1973 10 12.2 6 1 63.3 82.2
1973 11 8.6 3.6 7 28.8 89.7
1973 12 7.3 2.4 7 51.6 41.8
1974 1 8.1 2.9 3 79.3 49.4
1974 2 8 3.1 0 67.3 55.5
1974 3 8.5 2.2 1 39.8 95
1974 4 11.6 3.6 0 12.3 120.5
1974 5 15.7 6.9 0 39.5 195.1
1974 6 17.7 9.8 0 48.5 184.3
1974 7 18.7 11.7 0 67.6 164
1974 8 19.5 11.5 0 81 180.1
1974 9 15.7 8.8 0 90.8 138.7
1974 10 10 5.3 0 55.9 89.6
1974 11 8.7 3.7 1 121.1 47.5
1974 12 9.9 5.1 2 71.1 43.2
1975 1 8.9 3.8 1 73.2 32.2
1975 2 6.5 1.6 8 15.8 25
1975 3 7 1.7 7 58.8 89.4
1975 4 12.2 5.1 4 46.9 132.8
1975 5 13.8 5.6 0 86.2 187.9
1975 6 20.1 9.7 0 11.9 253.2
1975 7 21.7 13.2 0 81.9 170.9
1975 8 24.6 14.1 0 51.2 236.1
1975 9 17.3 9.5 0 34.6 138.5
1975 10 13.4 6.5 0 27.2 91.2
1975 11 8.8 3.3 3 28.6 70.6
1975 12 8.2 3.4 4 43 49.8
1976 1 7.6 3.2 8 93.8 41.4
1976 2 6.7 2.1 8 33.7 45
1976 3 7.8 1.4 8 29.5 108.8
1976 4 11.7 4.4 2 16.2 116.1
1976 5 15.8 7.9 0 79.9 148.6
1976 6 22.3 12 0 16.6 250.2
1976 7 24 13.2 0 16.9 285.2
1976 8 23 11.9 0 17.3 215.6
1976 9 16.4 9.6 0 134.9 85.5
1976 10 13 7.5 0 127.7 58.7
1976 11 8.6 3.2 1 32.4 58.7
1976 12 3.7 0.3 10 75.3 55.2
1977 1 4.6 0.4 12 113.8 45.9
1977 2 6.3 1.5 6 201.4 53.5
1977 3 9.5 3.4 3 59.7 79
1977 4 10.6 3.6 2 45 179.3
1977 5 14.6 6.1 0 43.5 207.6
1977 6 16.4 8.3 0 66.4 182
1977 7 19.6 11.9 0 9.5 178.3
1977 8 19.4 11.7 0 69.2 137.7
1977 9 16.6 9.7 0 35.2 108.8
1977 10 14 8.4 0 45.4 87.4
1977 11 8.4 3.4 5 112 80.9
1977 12 7.5 3.6 1 82.5 30.7
1978 1 5.3 0.7 9 99.4 52.4
1978 2 4.4 -0.5 14 55.4 33.5
1978 3 10.1 3.3 1 73.2 142.5
1978 4 9.4 3 6 47.3 89.9
1978 5 16.1 7.1 0 34.7 180.7
1978 6 17.4 10 0 90 174.4
1978 7 18.3 10.9 0 58.8 150.7
1978 8 18.6 11.7 0 48.5 126.9
1978 9 17.2 11 0 48.8 126.2
1978 10 15.3 9.2 0 9.9 88.4
1978 11 11.3 6 4 50 71.4
1978 12 5 0.8 14 207.9 24.9
1979 1 2.5 -2.4 24 82.3 55.7
1979 2 2.6 -1.2 22 78.6 50.5
1979 3 6.9 1.7 6 148 88.9
1979 4 11 4.4 1 83.1 106
1979 5 14.4 6 1 115.5 158.8
1979 6 19.1 10.4 0 34.9 190
1979 7 20.4 12.2 0 13 169.8
1979 8 19.1 11.4 0 79 171.2
1979 9 17.6 9.6 0 25 166.9
1979 10 14.2 7.8 0 66.4 82.5
1979 11 9.6 3.9 2 96.9 54.9
1979 12 7.4 3.6 4 137.7 42.5
1980 1 4.4 0.4 13 70.9 47.4
1980 2 7.8 2.9 2 117.1 28.4
1980 3 7.4 1.9 6 100.1 87.8
1980 4 13.4 5.1 1 10.6 149.3
1980 5 16 6.1 0 20.5 214.2
1980 6 17.9 10.3 0 132.8 114.8
1980 7 18.5 11 0 66.9 130
1980 8 19.8 12 0 79 155.9
1980 9 18.6 11.4 0 33.2 151.5
1980 10 11.9 5.6 0 113.2 93.7
1980 11 8.7 4.4 5 81.8 41.5
1980 12 8.4 3.2 4 51.7 48.9
1981 1 7.5 2.1 7 56.4 47.8
1981 2 5.3 0.5 12 89.4 55.6
1981 3 10.1 4.8 0 149.9 51.3
1981 4 10.6 4.2 1 110.5 112.6
1981 5 15.6 7.6 0 65.3 149
1981 6 17.3 9.9 0 33.4 163.7
1981 7 19.6 12.2 0 18.8 172.6
1981 8 20.5 12.4 0 57.2 174.7
1981 9 19.2 10.7 0 107.8 162.2
1981 10 11.4 5.2 0 87.9 112
1981 11 10.4 4.9 0 70.4 41.1
1981 12 2.6 -2.3 21 93.6 37.4
1982 1 5.9 -0.3 14 39.9 48.2
1982 2 7.4 2.1 7 20.4 33
1982 3 9.7 2.8 1 100.1 131.7
1982 4 13.5 4.8 2 17.3 167.1
1982 5 17.1 6.7 0 23.6 238.9
1982 6 18.9 11.2 0 225 120.7
1982 7 20.9 12.5 0 14.7 173
1982 8 19.6 12 0 83.5 172.7
1982 9 18.7 10.5 0 56.4 148.5
1982 10 13.1 7.2 0 54.7 55.1
1982 11 10 5.4 1 117.5 38.6
1982 12 6.9 1.8 9 78.7 22.6
1983 1 9 4 3 98.7 42.8
1983 2 3.5 -0.8 17 39.9 35.3
1983 3 9.3 4 0 65.7 85.4
1983 4 10.1 3.2 1 121.2 115.3
1983 5 13.6 6.4 0 127 101.6
1983 6 18 9.9 0 7.6 171
1983 7 24.5 14.3 0 44.4 187.1
1983 8 22.1 12.6 0 31.3 207.7
1983 9 16.8 10.2 0 120.1 116.9
1983 10 13.6 7.3 2 66.9 84.1
1983 11 9.9 5.5 5 41.2 29
1983 12 8.2 3.4 4 142.2 37.9
1984 1 5.6 0.8 10 160.2 37.6
1984 2 5.8 0.6 12 79.7 42.3
1984 3 7.3 2.2 3 52.3 44.9
1984 4 13.3 3.5 5 10 205.7
1984 5 14.9 5.9 1 55.4 158.4
1984 6 19.1 10.5 0 40.9 219.3
1984 7 22.4 12 0 13.3 258.2
1984 8 22.5 12.6 0 81.9 183
1984 9 16.7 10.4 0 117.6 86.1
1984 10 14.3 7.7 0 82.7 75.6
1984 11 9.8 5.7 0 124.9 33.7
1984 12 7.3 2.4 8 47.6 39.1
1985 1 3.7 -0.8 19 73 26.3
1985 2 5.7 -0.3 14 4.6 58.2
1985 3 8.2 1.7 8 48.8 105.1
1985 4 11.6 4.8 2 69.5 111.7
1985 5 14.4 6.8 0 63.4 139.2
1985 6 16.8 8.6 0 76.5 179.8
1985 7 20.4 12.7 0 46.4 182.2
1985 8 18.4 11.3 0 87.9 158
1985 9 18.8 11 0 14.2 125.5
1985 10 14.4 8.7 0 33.6 64.3
1985 11 6.6 1.4 10 78.2 50.2
1985 12 8.2 4 6 78 22.9
1986 1 5.4 0.6 12 174.1 39.2
1986 2 1 -3 25 37.2 43.3
1986 3 8.2 1.8 5 67.4 101.8
1986 4 9 2.3 3 111 81.7
1986 5 16 7.5 0 94.7 184.7
1986 6 19.3 9.8 0 48 202.2
1986 7 20 11.9 0 25.3 175.2
1986 8 17.1 9.7 0 109.9 132.3
1986 9 16.1 7.6 0 9.5 182.1
1986 10 14.3 7.3 0 85.7 111.2
1986 11 10.6 4.7 0 93 57.9
1986 12 8.5 3.2 1 142.3 32.1
1987 1 3.4 -1.1 18 52.9 37.6
1987 2 6.7 1 11 35.1 52.3
1987 3 7.3 1.2 14 89.2 110.5
1987 4 14.6 6.1 0 64.6 156.6
1987 5 14.6 5.9 0 32.6 199.2
1987 6 16.5 9 0 140 123.1
1987 7 19.8 12.2 0 51.4 168
1987 8 19.7 12.2 0 45.1 149.3
1987 9 17.4 9.3 0 67.2 152.3
1987 10 12.5 6 0 119.5 77.6
1987 11 8.5 4.1 3 53.5 43.4
1987 12 7.9 3.8 5 38.2 15.5
1988 1 7.2 2.5 3 173.9 37.7
1988 2 7.3 2.2 4 81 94.7
1988 3 9.3 2.8 6 97.3 104.6
1988 4 11.6 5 1 44.1 90.6
1988 5 16.2 7.1 0 50.4 194
1988 6 18.9 10.8 0 55.9 146.2
1988 7 18.6 11.6 0 106.7 154
1988 8 19.5 11.7 0 78.6 180.9
1988 9 16.5 9.7 0 51.7 163.7
1988 10 13 7.1 2 88.9 75.6
1988 11 9 2.6 8 50.5 68.6
1988 12 9.8 5.4 0 36 35.7
1989 1 9 3.9 2 20.6 54.3
1989 2 9.1 2.9 3 75.3 93.1
1989 3 11 3.9 2 77.7 126.6
1989 4 9.6 2.7 3 115.5 107.8
1989 5 18.4 8.2 0 26 283.8
1989 6 20.2 10 0 54.1 255.5
1989 7 22.9 13.1 0 41.4 284.9
1989 8 21.1 12 0 36.2 240.5
1989 9 18.5 10.6 0 23.3 135.1
1989 10 14.9 8.5 0 65.3 85.1
1989 11 9 4 3 42.6 45.3
1989 12 6.7 2.8 4 159.1 12.9
1990 1 8.9 3.9 0 128.7 46.4
1990 2 9.7 4.4 1 115.2 58.5
1990 3 12.4 5.3 3 21.6 137.6
1990 4 13.1 3.9 3 25.9 201.6
1990 5 18.1 7.7 0 18.9 219.2
1990 6 17.6 10.4 0 46.4 112.1
1990 7 22.1 11.9 0 21.5 273.8
1990 8 23.1 13.8 0 40.8 233.4
1990 9 16.7 9.6 0 30.4 127.5
1990 10 14.4 8.6 0 129.7 75.9
1990 11 8.8 4.9 0 47.9 32.3
1990 12 6.7 2.6 5 136 24.3
1991 1 5.5 0.1 14 86.8 53.3
1991 2 4.8 -0.3 16 68.5 45.1
1991 3 10.7 5.2 1 58.7 61
1991 4 11.4 4.5 2 67.2 129.3
1991 5 14.6 7.7 0 14.4 131.5
1991 6 15.8 8.5 0 68.6 153.8
1991 7 22.2 13.2 0 51.2 221.6
1991 8 21.9 12.8 0 8.5 221.1
1991 9 19.4 9.8 0 37 185.9
1991 10 12.9 7.7 0 54.3 68.2
1991 11 9.2 3.8 2 73.1 42.7
1991 12 7.9 2.6 7 78.4 28.5
1992 1 6.5 1 13 43.6 37.1
1992 2 8.9 2.9 5 25.9 52.7
1992 3 10.3 4 0 73.6 73.9
1992 4 12.3 5.3 0 41.8 125
1992 5 18.7 8.6 0 57.6 239.1
1992 6 20.5 11.7 0 52.2 192.7
1992 7 19.8 12.5 0 77.7 183
1992 8 19.2 11.3 0 117.7 196.3
1992 9 16.3 9.7 0 71.9 123.4
1992 10 10.2 4.8 1 66 60.3
1992 11 10.2 3.8 3 129.1 40.6
1992 12 6.3 1.2 11 67.4 19.7
1993 1 8.4 2.3 5 88.1 24.4
1993 2 7.5 3 2 10.7 42.3
1993 3 10.3 2.3 8 16.7 128.5
1993 4 13 5.7 0 91.8 116.3
1993 5 15.5 7.1 0 70.7 183.5
1993 6 19.4 10.2 0 108.3 193.6
1993 7 19 11.5 0 85.3 197.9
1993 8 18.4 10.3 0 29.7 182.5
1993 9 15.2 9 0 121.4 84.3
1993 10 10.7 5.4 5 62.8 75.4
1993 11 6.3 2.2 10 56.9 25.8
1993 12 7.1 2.2 5 171.4 29.4
1994 1 7.2 1.5 8 124.4 44.3
1994 2 4.9 -0.6 17 75.7 33.3
1994 3 10.6 4.2 0 78.1 141
1994 4 12 4.9 1 55.3 172.9
1994 5 13.9 6.5 0 65.6 141.1
1994 6 19.2 10.6 0 14.6 198.8
1994 7 23.3 12.9 0 33.1 206.4
1994 8 19.7 11.8 0 45 182.1
1994 9 15.4 9.1 0 148.2 104.8
1994 10 12.7 6.2 0 57.9 72.9
1994 11 11.7 7 0 103.3 35.3
1994 12 9 3.6 6 103.9 31.7
1995 1 6.4 1.5 10 157.7 35.8
1995 2 9 3.4 0 99.2 63
1995 3 8.9 2 7 63.9 172.7
1995 4 13.2 5.1 1 24.6 170.7
1995 5 16.7 7.4 0 48.1 203.7
1995 6 18.4 9.6 0 11.3 182.9
1995 7 23.8 14.1 0 22.5 229.1
1995 8 24.4 13.2 0 12.1 256.1
1995 9 17.1 10.3 0 75.6 115.7
1995 10 16.1 9.3 0 21.9 100.1
1995 11 9.9 5.2 3 60.5 36
1995 12 3.8 0.1 15 70.4 20.5
1996 1 5 2.1 9 57 5.8
1996 2 5 0 16 75.1 54.3
1996 3 5.9 1.7 5 52.9 38.6
1996 4 12.8 4.7 4 37.7 114.3
1996 5 13 5.3 0 39.1 169.6
1996 6 19.3 9.6 0 29.8 244.5
1996 7 21.5 11.9 0 24.5 254.6
1996 8 21.5 12.3 0 101.1 199.5
1996 9 16.8 9.9 0 27.1 111.4
1996 10 14.4 7.9 0 70.6 119.7
1996 11 8.2 3.2 8 134.3 89.8
1996 12 5 0.6 11 98.2 39.1
1997 1 5.2 0.2 15 8.5 51.4
1997 2 9.5 3.9 1 106.5 81.6
1997 3 12.1 5 1 22 152.1
1997 4 13.2 5.1 0 28.2 137
1997 5 16.3 6.7 0 77.5 252.3
1997 6 17.6 10.2 0 130.9 136.5
1997 7 21.7 12.7 0 56.7 244.4
1997 8 23.3 14.1 0 108.6 201.5
1997 9 17.3 10.2 0 17.5 148.4
1997 10 13 6.4 3 55.8 117.4
1997 11 10.4 6.1 0 93.1 24.6
1997 12 8.2 3.9 3 79.4 36.2
1998 1 7.1 2.5 5 88.5 46.3
1998 2 11.2 5.1 4 9.3 102.2
1998 3 11.2 4.8 2 93.5 91.9
1998 4 10.9 4.4 2 117.9 125.7
1998 5 17 8.5 0 26.6 199.3
1998 6 17.5 10.5 0 152.4 141.7
1998 7 19.2 12.1 0 36.5 172
1998 8 20.1 11.9 0 46.2 210.6
1998 9 17.7 11.1 0 49.2 96.6
1998 10 13 7.2 1 197.9 99.1
1998 11 8.4 3.6 2 49.5 68.9
1998 12 8.3 2.4 6 57.9 42.4
1999 1 8.1 2.7 5 90.8 66.9
1999 2 8 2.4 7 44.7 92
1999 3 10.7 4.2 1 82.8 140.8
1999 4 13.4 5.8 3 91.6 152.9
1999 5 17.5 9 0 51 181.9
1999 6 18.3 10.2 0 61 188.5
1999 7 22.5 13.4 0 30.1 227.9
1999 8 19.9 12.1 0 75.4 129.7
1999 9 20.2 11.5 0 113.7 190.7
1999 10 13.8 7.8 0 55.3 123.1
1999 11 10.1 5.2 1 48.2 70.7
1999 12 7.1 1.9 8 135.6 60.6
2000 1 7.8 2.7 2 49.8 75.9
2000 2 8.9 3.3 4 72 93.5
2000 3 10.9 4.2 3 43.3 133
2000 4 11.7 4.2 1 153.3 124.6
2000 5 16.4 7.6 0 63.9 189.6
2000 6 19 11.2 0 46.6 151.9
2000 7 18.8 11.4 0 68.5 142.5
2000 8 21.2 12.4 0 46.3 195.9
2000 9 18.1 10.8 0 117.8 116.7
2000 10 13.1 7.1 0 139.5 87.6
2000 11 9.1 4 2 167.9 51.9
2000 12 7 3.3 9 118 42
2001 1 5.3 0.3 15 42.1 59.1
2001 2 7.7 0.8 11 79.4 96.4
2001 3 8 1.6 8 56.2 100.5
2001 4 11.3 4 0 80.1 106.2
2001 5 17.8 7.7 0 58 208.7
2001 6 18.4 10.1 0 43.9 160
2001 7 21.4 13.2 0 57.5 185.1
2001 8 20.9 12.8 0 111.9 181.1
2001 9 15.8 10.1 0 67.3 84.9
2001 10 15.9 10.2 0 113 115
2001 11 10.5 4.7 2 27 54
2001 12 6.3 0.9 14 28 71.5
2002 1 8.2 2.5 8 55.9 38.2
2002 2 9.8 3.8 1 173.9 95.2
2002 3 11.1 4.1 1 34.7 122.4
2002 4 13.9 5 1 40.7 176.2
2002 5 16.3 8.4 0 60.9 183.8
2002 6 19.1 10.9 0 30.9 197.3
2002 7 20.1 12 0 133.8 165.3
2002 8 21.2 13.4 0 83.4 141
2002 9 17.8 10.6 0 49.7 132.7
2002 10 12.6 6.8 0 145.3 79.7
2002 11 10 5.5 0 111.1 36.6
2002 12 6.4 3.2 5 129.8 28.6
2003 1 6.9 2.5 8 60.7 54.3
2003 2 6.6 0 15 30.8 87.8
2003 3 12 3.1 3 38.4 157.7
2003 4 14.7 5.1 3 44.6 193.9
2003 5 16.8 8.5 0 42.6 203.7
2003 6 21 12.1 0 111.1 215.1
2003 7 21.9 13.5 0 44.9 171
2003 8 22.4 13.4 0 14 187.6
2003 9 19.2 9.6 0 22.7 164.6
2003 10 12.6 6 0 48.2 115
2003 11 10.7 5.1 3 55.4 57
2003 12 7.5 1.9 9 81.8 54.1
2004 1 7.4 3 4 106.5 46.2
2004 2 8.1 3 9 50.8 92.6
2004 3 9.9 3.6 2 41.3 98.1
2004 4 13.5 6.4 0 107 132.5
2004 5 16.9 8.3 0 49 210.7
2004 6 20 11.8 0 68.5 194.5
2004 7 19.9 12.4 0 45.8 167.9
2004 8 21.3 13.6 0 181 179.4
2004 9 18.1 11.3 0 34.6 168
2004 10 13.1 7.4 0 88.2 94.3
2004 11 10.2 5.5 3 36.2 52.1
2004 12 8.3 3.2 6 46.3 69.1
2005 1 8.5 3.4 2 48 48.1
2005 2 6.7 2.1 5 64.6 77.3
2005 3 9.7 4.6 3 31.7 64.6
2005 4 12.9 4.8 1 82.6 154.4
2005 5 15.8 7.3 0 17.5 243.8
2005 6 20.3 11.4 0 42.2 194.9
2005 7 20.6 13.1 0 84 178
2005 8 20.7 12.2 0 39.9 206.7
2005 9 18.9 11.3 0 89.2 157.9
2005 10 15.3 10.4 0 113.1 62.6
2005 11 9.5 3.4 9 57.4 98.7
2005 12 7.3 2.2 9 56.7 64.6
2006 1 6.4 2.4 1 18.6 36.4
2006 2 6.3 1.4 9 48.5 68
2006 3 7.7 1.5 13 100.2 95
2006 4 11.8 4.8 1 49.4 167.3
2006 5 15.8 7.4 0 129.8 188.1
2006 6 21.6 11.8 0 9.8 171.7
2006 7 25.6 14.5 0 40.9 290.8
2006 8 19.6 12.8 0 90.5 157.4
2006 9 20.5 12.6 0 62.4 165.6
2006 10 15.5 9.7 0 99.1 102.3
2006 11 11.2 5.3 1 66.8 107.3
2006 12 8.8 4.2 2 114 55.9
2007 1 9.6 4.3 4 146.9 68.4
2007 2 8.6 3.6 6 57.5 84.4
2007 3 10.2 4.1 1 44.5 149.4
2007 4 15.8 7.4 0 5.8 206.1
2007 5 15.6 8.2 0 83.8 142.6
2007 6 18.6 11.2 0 285.6 154.5
2007 7 18.8 12.2 0 113 178.5
2007 8 19.7 12.2 0 27.1 221.8
2007 9 17.6 10.5 0 28.1 158.5
2007 10 14 8.1 0 23.3 109.4
2007 11 10.3 5 2 58.3 75.6
2007 12 7.2 2.4 8 74.9 39.4
2008 1 9 3.9 2 154 43.6
2008 2 9.1 1.4 9 48.7 121.2
2008 3 9.1 2.7 3 98.8 137.8
2008 4 11.4 4.4 2 79.2 126.8
2008 5 17.5 8.6 0 43.5 186.7
2008 6 18.7 10.7 0 56.7 198.1
2008 7 20.8 13 0 108.7 202.6
2008 8 20.1 13.4 0 82.6 141.1
2008 9 17 10.8 0 92.4 111.7
2008 10 12.8 7.2 0 93.2 129.5
2008 11 9 4.9 3 60 53.1
2008 12 6.1 2.2 4 52.8 60.3
2009 1 5.7 1.3 8 47 59.8
2009 2 6.7 2.3 11 39.6 60.5
2009 3 10.9 4 2 44.2 161.7
2009 4 14.6 6 0 51 142.3
2009 5 16.4 8 0 81.7 216
2009 6 19.2 10.9 0 168.2 183.4
2009 7 20.4 12.6 0 113.4 199.7
2009 8 21 13.3 0 46.4 194.5
2009 9 18 10.9 0 26.8 151.1
2009 10 14.4 8.5 0 50 99.9
2009 11 10.4 5.8 0 161.6 73.8
2009 12 5.2 1.3 13 66.1 53.1
2010 1 3.4 0.1 14 48.6 59.7
2010 2 4.4 0.2 11 53.6 42.4
2010 3 9.9 3 8 56.4 130.6
2010 4 13.8 5.1 0 24.8 171.8
2010 5 15.2 7.1 0 21.2 187.9
2010 6 20.4 11 0 41.2 214.2
2010 7 21 13.5 0 68.3 142.1
2010 8 19.5 11.7 0 39.6 172.9
2010 9 17.8 10.8 0 67.8 131.5
2010 10 13.3 7.3 0 65.4 116.8
2010 11 7.4 3 6 112.7 70.2
2010 12 2.7 -1.9 20 18.8 51.4
2011 1 6.4 1.9 11 49.6 56.6
2011 2 8.8 4.2 1 104.2 49.4
2011 3 10.9 3.4 2 12.4 135.7
2011 4 17.1 7.5 0 11.2 188.1
2011 5 16.7 8.4 0 40.2 210.2
2011 6 19.4 10 0 47.8 222.9
2011 7 20.3 11.5 0 18 178.9
2011 8 20.1 12.2 0 42 171.4
2011 9 19.5 11.6 0 27.8 163.4
2011 10 15.9 9.2 0 57.2 115.3
2011 11 11.7 7.1 0 37.4 62.4
2011 12 8.1 3.6 0 124.6 44.6
2012 1 7.9 2.9 6 87.6 58.4
2012 2 7.6 2.3 11 26.2 73.3
2012 3 13.6 4.7 0 32.6 179.5
2012 4 10.7 3.9 1 180.6 102.6
2012 5 16.4 7.6 1 48 203
2012 6 17.3 10.3 0 166.6 107.3
2012 7 19.5 12.3 0 107.2 151.5
2012 8 20.9 12.5 0 99.2 141.3
2012 9 17.1 9.7 0 90.6 149.4
2012 10 12.2 6.1 0 61.2 111.4
2012 11 9.2 3.8 1 110.6 68.7
2012 12 7 2.3 5 136 57.7
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class WeatherAnalysis {
// Method to prepare the formatted output
public static String prepareLine(String text, double average, double max, double min) {
String theString = String.format("%12s: Average: %#9.4f Max: %#9.4f Min: %#9.4f", text, average, max, min);
return theString;
}
public static void main(String[] args) {
// prepare the DataPoints ArrayList
DataPoints theData = new DataPoints();
BufferedReader file = null;
String line;
// Open the file
try {
file = new BufferedReader(new FileReader(System.getProperty("user.dir") +
"\\sheffieldata.csv"));
// Read the data line by line
while ((line = file.readLine()) != null) {
// add the data to the ArrayList
// The method add is overloaded in the DataPoints class so
// that it takes a string as argument and parses the data
theData.add(line);
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
if (file != null) {
try {
file.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
// Tell how many lines have been read - just for information - can be omitted
System.out.println(theData.size() + " lines of Data read.");
System.out.println("");
// print the statistics
System.out.println(prepareLine("Temperature", theData.getAverageTemperature(), theData.getMaxTemperature(), theData.getMinTemperature()));
System.out.println(prepareLine("Rainfall", theData.getAverageRainfall(), theData.getMaxRainfall(), theData.getMinRainfall()));
System.out.println(prepareLine("Snowfall", theData.getAverageSnowfall(), theData.getMaxSnowfall(), theData.getMinSnowfall()));
System.out.println(prepareLine("Humidity", theData.getAverageHumidity(), theData.getMaxHumidity(), theData.getMinHumidity()));
System.out.println(prepareLine("Wind", theData.getAverageWind(), theData.getMaxWind(), theData.getMinWind()));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment