SciRuby / daru-io

daru-io is a plugin gem to the existing daru gem, which aims to add support to Importing DataFrames from / Exporting DataFrames to multiple formats.
http://www.rubydoc.info/github/athityakumar/daru-io/master/
MIT License
24 stars 9 forks source link

Idea: Gist export (and probably import) #57

Open zverok opened 7 years ago

zverok commented 7 years ago

Just a wild idea, not sure how useful... But seems quite a bit.

Use case: I have some data and want to quickly show it to a colleague in another city. What's the sanest and easiest way to do it? Well, typically, we'll save the file, and then share file somewhere... But there can be this:

dataframe.first(1000).to_gist(access_token: '123456', format: :csv, name: 'data1')
# => prints URL https://gist.github.com/zverok/44971da8a59b07521a0914b657ff770f

dataframe.first(1000).to_gist(access_token: '123456', format: :markdown, name: 'data2')
# => prints URL https://gist.github.com/zverok/535ed082eaae7c5bf2a42fcda9676b42 

(Both URLs I've created just for this demo)

This way, you can send links to your data to friends without ever leaving your IRuby notebook, or IRB session, or folder with data processing scripts.

CSV one is simpler to implement (our CSV exporter + Gist API, which is reasonable and well-documented), but Markdown also seems cool.

athityakumar commented 7 years ago

Exporting as markdown is something that can definitely be worked on (similar to HTML, a table-like UI seems intuitive?). Also, based on discussion here and at #56, I see foreshadowing that daru-io could also be supporting to cloud upload (like Gist) along with exporters. Nevertheless, this idea seems good to me.