has2k1 / gnuplot_kernel

A Jupyter/IPython kernel for gnuplot
BSD 3-Clause "New" or "Revised" License
81 stars 25 forks source link

Retrieve CSV from URL #24

Closed kaihendry closed 4 years ago

kaihendry commented 4 years ago

Greatly enjoying the IDE for gnuplot iterations, however how do I fetch data from a URL?

For example https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/01-22-2020.csv ?

I know how it works in python roughly, but not this kernel.

has2k1 commented 4 years ago

See how the %%shell block magic is used in the example notebook, https://github.com/has2k1/gnuplot_kernel/blob/master/examples/gnuplot-kernel.ipynb .

You can use wget or curl or any other command that downloads files.

On Fri., Jul. 10, 2020, 9:54 a.m. Kai Hendry, notifications@github.com wrote:

Greatly enjoying the IDE for gnuplot iterations, however how do I fetch data from a URL?

For example https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/01-22-2020.csv ?

I know how it works in python roughly, but not this kernel.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/has2k1/gnuplot_kernel/issues/24, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF6QNJ4LGADTSQ5MI33RJDR223LZANCNFSM4OWJRJTA .

kaihendry commented 4 years ago

Be good if you could have an example where the curl stdouts into some variable that I can plot off the bat! Thanks again!

has2k1 commented 4 years ago

I don't think you can download into a variable. You have to download to file then use the file in gnuplot.

On Sat., Jul. 11, 2020, 4:17 a.m. Kai Hendry, notifications@github.com wrote:

Be good if you could have an example where the curl stdouts into some variable that I can plot off the bat! Thanks again!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/has2k1/gnuplot_kernel/issues/24#issuecomment-656957674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF6QNP3G3Y2ZQBCJLAAERLR264S5ANCNFSM4OWJRJTA .

kaihendry commented 4 years ago

Yes, you're right, it needs to be in a file to be used. Thank you!