data_agg = d3.nest().key(function(d) { return d["Trial ID"]; }).rollup(function(values) {
return {values: values,
"Recruitment status": values[0]["Recruitment status"],
"Countries": values[0]["Countries"],
"Center": values[0]["Center"],
"First author": values[0]["First author"],
"Publication date online": values[0]["Publication date online"],
"Trial registration number": values[0]["Trial registration number"],
"Funding": values[0]["Funding"],
"Severity": values[0]["Severity scale"],
"Study design": values[0]["Study design"],
"registration_code": values[0]["Trial registration number"].slice(0, 3)
}
}).entries(data);