chiasm-project / chiasm-dataset

A data structure for representing tabular data.
MIT License
0 stars 0 forks source link

Add convenience function for column metadata access #5

Closed curran closed 8 years ago

curran commented 8 years ago

The data structure is inconvenient for accessing the metadata object for a given column given its name. Here's a simple accessor function for column metadata.

function getColumnMetadata(dataset, columnName){
  return dataset.metadata.columns.filter(function (column){
    return column.name === columnName;
  })[0];
}

This should be added to chiasm-dataset, and removed from: