/**
* Pollution.java
*
* @author authorname
* Date: March 01, 2018
*/
public class Pollution {
/**
* Process a file whose name is passed through cmd arguments.
* display totals records processed and max pollution stats.
*
* @param args
*/
public static void main(String [] args) throws Exception {
//args = new String[1];
//args[0] = "data/kirkstall.csv";
if(args.length != 1) {
System.out.println("ERROR: no file name provided");
System.out.println("USage:");
System.out.println("java Pollution filename.csv");
return;
}
// Create data set
PollutionDataset ds = new PollutionDataset();
ds.readCSV(args[0]);
System.out.println(ds.size() + " records processed");
System.out.println("Max: " + ds.maxLevel());
}
}