How to upload .csv or other files to plot and publish.
So you have some data that you want to plot and share, with Kyso it's easy! Head over and sign into Kyso at kyso.io/signup
Once you've signed up click the "Start Jupyter in the cloud" button at the top of the page in the navbar. Open your Jupyter notebook environment by clicking the open link on the notebooks page.
You can upload your file by dragging and dropping into the Jupyter notebook file browser or click the upload button. Now its time to open a notebook.
Click New > Python 3 notebook and your in your notebook
In the coding cells lets import some libraries and use Shift+Enter to evaluate the cell.
import pandas as pd from bokeh.plotting import figure, output_notebook, show output_notebook()
Pandas is the library we use to load an manipulate data. Bokeh is an awesome interactive graphing library. Now lets load the data.
df = pd.read_csv('./data.txt', delimiter=" ")
Use whatever filename you have instead of data.txt. The delimiter variable should be set to whatever the delimiter is in your file (normally commas or spaces). Here its spaces, for commas you would use
Now we simply turn the pandas dataframe into a source for the bokeh plot and the graph it.
p = figure() p.line(x='x-axis', y='y-axis', source=source) show(p)
and we get a cool graph!
We can also add text to cells by highlighting a cell and clicking Cell > Cell Type > Markdown from the navbar. You can then use markdown to type notes or explainations.
Then share your post with the world
Its easy to embed your post in any html document. I've embedded an example notebook in this docs page!