I am plotting journey time for a series of roads at hourly resolution, with data over a few weeks.
I can plot using unix time, but that isn't very intuitive. This is 7 days worth of data.
I used a function to manipulate the time
field in order to give the date and hour:
def plot_time(time):
return time.strftime('%Y-%m-%d-%H')
However, this results in ggplot throwing a value error when trying to plot:
ValueError: invalid literal for float(): 2016-04-13-00
Is there a simpler means of displaying date and some hour?
Alternatively I could plot unix time with a date scale on the axis but it would be nice to have some hour resolution on the axis.