Skip to content

Instantly share code, notes, and snippets.

@sudipto80
Created October 28, 2014 02:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sudipto80/f307ed836b57d9bdce3e to your computer and use it in GitHub Desktop.
Save sudipto80/f307ed836b57d9bdce3e to your computer and use it in GitHub Desktop.
Squirrel Example : Iris dataset Aggregation
Table iris = DataAcquisition.LoadCSV(@"iris.csv");
StringBuilder builder = new StringBuilder();
builder.AppendLine("<html>");
builder.AppendLine("<h2>Range</h2>");
builder.AppendLine(iris.Aggregate("Name", AggregationMethod.Range).ToHTMLTable());
builder.AppendLine("<h2>Average</h2>");
builder.AppendLine(iris.Aggregate("Name", AggregationMethod.Average).ToHTMLTable());
builder.AppendLine("<h2>Max</h2>");
builder.AppendLine(iris.Aggregate("Name", AggregationMethod.Max).ToHTMLTable());
builder.AppendLine("<h2>Min</h2>");
builder.AppendLine(iris.Aggregate("Name", AggregationMethod.Min).ToHTMLTable());
builder.AppendLine("</html>");
StreamWriter writer = new StreamWriter("temp.html");
writer.WriteLine(builder.ToString());
writer.Close();
System.Diagnostics.Process.Start("temp.html");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment