use table to HTML to generate detail and top level stats