rufuspollock-okfn / dataexplorer

View, visualize, clean and process data in the browser.
http://explorer.okfnlabs.org
148 stars 47 forks source link

Header row appearing twice (or more) #132

Closed djw closed 11 years ago

djw commented 11 years ago

As a result of #98, the header row in the table is being shown twice. The column headings were previously coming from the first row of the CSV data, but are now also in the schema section of the datapackage. When the project is loaded, both are picked up, and the table has duplicated header rows. If the CSV is persisted at any point, the duplicate rows are saved, and the problem multiplies.

rufuspollock commented 11 years ago

I'm not sure I understand. How do we end up with two sets of fields. We should be using the fields in the schema rather than in the CSV (except when we create when we don't yet have schema ...)

rufuspollock commented 11 years ago

@djw can you point to an example where this happens (gist + actual link to explorer.okfnlabs.org) - I can't see seem to reproduce this ...

djw commented 11 years ago

Sure:

https://gist.github.com/djw/4fd629609cee9df60b13 http://explorer.okfnlabs.org/#djw/4fd629609cee9df60b13/view/grid

I don't have time to investigate, sorry!

rufuspollock commented 11 years ago

No problem re time and thanks for reporting. I can now confirm and reproduce this issue and will fix :-)

rufuspollock commented 11 years ago

FIXED. Issue in recline with interaction of CSV backend with recently added feature to use explicitly provided fields if present. https://github.com/okfn/recline/commit/5d24fd474d6e6bd065039d058ef64c6db4454df9

rufuspollock commented 11 years ago

@djw you will need to fix your gist by hand if you now have a duped header data in the actual CSV :-/ (no way to auto fix that ...)

rufuspollock commented 11 years ago

@djw in fact you do not have it duped in actual data so all good, hurrah!