CSV files and using Bokeh

Hello guys,

I am taking an introductory information visualization course.I am not a computer science student but I have some beginner level programming skills and we are require to do programming to this course.I am thinking about using bokeh.I am going to visualize the data of plane crashes since 1950.I only have a cvs file and I don’t know much about json files.So my Question is Can I just use panda and add my csv file and then use bokeh? or does it have to be a json file?I have tried to convert my cvs file to a Json file but since it changes the formatting and it is no more a table I don’t know how to access my columns .

1 Like

Hi Niloofar,

`import pandas``

``from bokeh.plotting import figure, output_file, show``

``

``# pandas``

``df = pandas.read_csv('test.csv')``

``# read in name, x , y``

``# print df.x, df,y``

``

``# bokeh``

``plot =  figure()``

``plot.scatter(x=df.x, y=df.y)``

``

``output_file('test.html')``

``show(plot)

  Hope this helps.

  Raphael

`

test.py (242 Bytes)

test.csv (57 Bytes)

···

On 2016-09-25 20:05, Niloofar
Nazemzadeh wrote:

Hello guys,

      I am taking an introductory information visualization

course.I am not a computer science student but I have some
beginner level programming skills and we are require to do
programming to this course.I am thinking about using bokeh.I
am going to visualize the data of plane crashes since 1950.I
only have a cvs file and I don’t know much about json files.So
my Question is Can I just use panda and add my csv file and
then use bokeh? or does it have to be a json file?I have tried
to convert my cvs file to a Json file but since it changes
the formatting and it is no more a table I don’t know how to
access my columns .

  You received this message because you are subscribed to the Google

Groups “Bokeh Discussion - Public” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to [email protected].

  To post to this group, send email to [email protected]

  To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/38d4cc0b-e841-470c-8931-a77b7be93b66%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/38d4cc0b-e841-470c-8931-a77b7be93b66%40continuum.io?utm_medium=email&utm_source=footer).

  For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).
1 Like