OpenSpending Next visualization experiment

@rufuspollock in order to generate a treemap from a basic CSV, you should include the following JS in your HTML document. Note: The variable amount_col_name defaults to “amount” if left out.

var data = {
  currency: "GBP",
  aggregated_csv_url: "../aggregates/by-cofog1-then-department.csv",
  amount_col_name: "value"
};

var options = {
  data: data
};
  
$('#treemap').treemap(options);

Where “by-cofog1-then-department.csv” (i.e. raw spending data aggregated by COFOG Level 1, then department code) looks something like this:

cofog_level1_code,dept_code,value
01,DFT004,425530000.0
03,NIO081,7368105000.0
03,NIE099,589154000.0

If all goes well, you should get this at the end: