Hello,
I am new to bokeh. I just found about it while searching for a solution to my problem. I am trying to solve the following issue using bokeh, if possible. Would it be the right platform to get some help with answers to my question? I would really appreciate any help or answers provided.
I am working on graphing run-time corresponding to dates. I have a huge data containing Run times and dates as columns.
I am trying to change my code so that I can dynamically zoom in to see the hours of the days instead of having many ticks in x-axis at once. I have the following working code which plots the pictures below. First picture is the plot I get right after I run the program on Linux environment. Second one is when I zoom in.
I would like to know how I can change the code, so I can only see months at first, then zoom in to see more specific hours, then minutes and seconds. My graph is bars but it would better to have them as lines. It could be wonderful if I could get any hint on how to add hover as in this link to the graph as well as zooming option by using Bokeh.
I searched around and found that I can also do zooming option using Bokeh, but I am not able to use that library without receiving errors somehow.
My Code
def file_processing (file_name):
data_file = pandas.read_csv(file_name, delim_whitespace=True, header=None)
data_file.rename(columns={0: 'date', 9:'run_time'}, inplace=True)
data_file.sort_values(by='date',inplace=True)
data_file['run_date'] = pandas.to_datetime(data_file.date, format='%Y%m%dT%H%M%S').dt.strftime("%Y-%m-%d %H:%M:%S")
plt.close()
data_file.plot('run_date', 'run_time',kind='bar')
plt.margins(0.2)
My Data (Tab separated .csv file)
20190601T034207 NAME cc130.aa.bb NAME-7600816.2005 1 1 NAME-37x161 37x161 d39c13 2821 0 0ce000 1283 JOBS/NAME-7600816.2005/blast-37-161.txt
20190601T034214 NAME cc128.aa.bb NAME-7600816.2004 1 1 NAME-37x161 37x161 d39c13 2815 0 0ce000 1283 JOBS/NAME-7600816.2004/blast-37-161.txt
20190601T034208 NAME nn019.aa.bb NAME-7600816.2008 1 1 NAME-37x161 37x161 d39c13 3465 0 0ce000 1283 JOBS/NAME-7600816.2008/blast-37-161.txt
20190601T034220 NAME nn058.aa.bb NAME-7600816.2010 1 1 NAME-37x161 37x161 d39c13 3462 0 0ce000 1283 JOBS/NAME-7600816.2010/blast-37-161.txt
20190601T034217 NAME nn011.aa.bb NAME-7600816.2014 1 1 NAME-37x161 37x161 d39c13 3469 0 0ce000 1283 JOBS/NAME-7600816.2014/blast-37-161.txt
20190601T034219 NAME nn224.aa.bb NAME-7600816.2015 1 1 NAME-37x161 37x161 d39c13 3468 0 0ce000 1283 JOBS/NAME-7600816.2015/blast-37-161.txt
Results as of Right Now
Please, let me know if I need to update any part of my question without downgrading it. I would really appreciate it. I am open to any suggestions. Thanks a lot!