misoproject / dataset

JavaScript library that makes managing the data behind client-side visualisations easy
http://misoproject.com
GNU General Public License v2.0
1.18k stars 99 forks source link

Add uniqueColumn derived method #24

Closed iros closed 12 years ago

iros commented 12 years ago

We seem to constantly need a set of unique values in a dataset.

iros commented 12 years ago

Instead support:

// returns full column, all rows
dataset.column('city');
// returns a dataset without the excepted columns
dataset.column({ except : 'timestamp' })
// returns a new dataset comprised of unique values in the specified column
dataset.columns({ unique : 'city'});
iros commented 12 years ago

How about

dataset.column('city', { unique : true });
iros commented 12 years ago

Will fix for #156.