rufuspollock / chrome-csv-viewer

Recline Chrome CSV Viewer - a chrome extension which allows you to view, search, graph and map CSV files in the browser
https://chrome.google.com/webstore/detail/recline-csv-viewer/ibfcfelnbfhlbpelldnngdcklnndhael
37 stars 10 forks source link

Allow user to skip header rows #6

Open smithje opened 11 years ago

smithje commented 11 years ago

This extension would be very useful for me, except that it doesn't parse correctly when there are extra header rows.

recline.backend.parseCSV parses the data just fine, but I end up with only one field because just the first record (which is a header) is used to determine the fields.

Here is an example of my csv data:

PBO Station Position Time Series. Reference Frame : NOAM_I08
Format Version,1.1.0
4-character ID,AB01
Station name,AtkaIslandAK2007
Begin Date, 2007-05-18
End Date, 2013-05-07
Release Date, 2013-05-09
Reference position, 52.2095047957 North Latitude, -174.2047566232 East Longitude, 25.44179 meters elevation,
Date, North (mm), East (mm), Vertical (mm), North Std. Deviation (mm), East Std. Deviation (mm), Vertical Std. Deviation (mm), Quality,
2007-05-18,3.07, -2.69, 6.56, 2.06, 1.68, 6.41, final,
2007-05-19,2.36, -2.72, 3.25, 1.53, 1.33, 4.70, final,
2007-05-20,1.79, -2.43, 4.18, 1.80, 1.52, 5.63, final,
2007-05-21,-0.73, -3.04, 4.43, 1.81, 1.53, 5.64, final,
2007-05-22,1.27, -2.54, 7.52, 1.94, 1.62, 6.16, final,
2007-05-23,0.54, -3.38, 3.62, 1.98, 1.67, 6.30, final,
2007-05-24,2.52, -3.74, -1.05, 1.99, 1.68, 6.35, final,
2007-05-25,1.44, -5.38, 9.45, 1.87, 1.59, 5.79, final,
2007-05-26,1.86, -3.53, -1.26, 1.81, 1.52, 5.63, final,
2007-05-27,2.64, -2.06, -2.12, 1.85, 1.53, 5.78, final,
2007-05-28,3.06, -2.06, -5.77, 1.54, 1.33, 4.73, final,
2007-05-29,3.60, -1.75, -7.53, 1.61, 1.37, 5.00, final,
2007-05-30,-1.84, -0.90, -5.66, 1.62, 1.39, 5.02, final,
2007-05-31,-1.00, 0.14, 7.83, 1.62, 1.40, 5.12, final,
2007-06-01,-0.44, -3.47, 0.63, 1.62, 1.39, 5.02, final,
2007-06-02,-0.75, -0.64, 1.05, 1.61, 1.39, 4.82, final,

The 9th row is the "real" header row which should be used to determine the fields. Perhaps makeView in viewer.js could have an option to skip some records?

rufuspollock commented 11 years ago

Nice point. We will look into fixing this.

jcc8 commented 10 years ago

Started it off but others can pledge to issue here: https://www.catincan.com/bounty/allow-multiple-windows-be-changeing-issue-10-benjaminoakes-tabcarousel-github-0

Crowdfund issue & get merged into main branch to collect.

rufuspollock commented 10 years ago

@smithje I note we have this feature now in Data Explorer: http://explorer.okfnlabs.org/#load (Data Explorer shares a lot with this extension both being built off Recline and both being pure JS ...).

rufuspollock commented 10 years ago

@jcc8 how is your comment related to this issue?