rufuspollock-okfn / dataexplorer

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

Edit github CSVs #155

Closed rufuspollock closed 10 years ago

rufuspollock commented 10 years ago

Propose we have url:

/#github/{path-on-github}

e.g.

/#github/datasets/country-codes/blob/master/data/country-codes.csv

Do do this we need:

rufuspollock commented 10 years ago

@landonreed @aliounedia so question here is how we do this best.

  1. Should we have github csv editing app as a separate app or part of this app.
    • Separate app in terms of one tool for one job philosophy. However it is more work
  2. If part of this app how do we "hack" the project and what should the UI be e.g. should one copy prose style?

The simplest thing possible right now would be:

What do people think?

aliounedia commented 10 years ago

@rgrp @landonreed , I have some questions here : what look like a [ prose-style browser] for a csv file . I though that we want to load on grid a csv github file / not gist file . It can be done by testing if a gist file or just a "github csv file" style project where save means writing over the original file. change can be done on grid ?

rufuspollock commented 10 years ago

Once we have a decision this is now about 1h to implement :-)

rufuspollock commented 10 years ago

@landonreed @aliounedia so we now have basic load working e.g.

http://explorer.okfnlabs.org/#datasets/gdp-us/edit/master/quarter.csv

However save won't work yet (plus some other stuff probably!)

aliounedia commented 10 years ago

@landonreed , @rgrp, I was very busy this last days, so I will check today :) Thank!

rufuspollock commented 10 years ago

@landonreed @aliounedia this should now basically be working including save. Please visit http://explorer.okfnlabs.org/#start and give a try (see the Edit a Github CSV on the front page) and let me know if there are bugs / issues.

rufuspollock commented 10 years ago

FIXED.

datadeck-github-edit-june-2014

paulfitz commented 10 years ago

@rgrp this is great! Would it be totally out of scope to also support editing tables expressed as YAML? I've been writing github jekyll sites that are driven by a table or two placed in _data/*.yml, and a simple online editor could help my collaborators. Looking at the code, it seems doable, but not sure the functionality belongs here?

rufuspollock commented 10 years ago

@paulfitz it would actually be pretty simple to do and would we a welcome addition - we just need something that will serialize and unserialize yaml to a structure like (this is what we use internally in managing the data)

{
  records: [ { a: 1, b: 2}, {a: 10, b: 12}, ... ]
  // fields are optional - fields describe the columns as per json table schema
  fields: [ { name: 'a', type: 'string' }, ... ]
}
paulfitz commented 9 years ago

@rgrp looks like procrastinating on doing this paid off for me. The version of jekyll on github-pages was recently updated, and will now accept _data/*.json, so no yaml needed.

paulfitz commented 9 years ago

Also this https://github.com/jekyll/jekyll/pull/2761 will reduce the work needed down to zero, with csv supported directly.

Floppy commented 9 years ago

glad to be of service ;)