old_contents: from collections import Counter
  import matplotlib.pyplot as plt
  
  def create_timeline( data ):
  
      if len(data) == 0:
          print "Dataset empty."
          return
  
      date_series = Counter( sorted( map( lambda d: d['date'], data ) ) )
  
      plt.plot_date( x = date_series.keys(), y = date_series.values(), fmt = "r-" )
      plt.grid( True )
      plt.show()
  
new_contents: from collections import Counter
  
  #import plotly.graph_objs as go
  
  def create_timeline( data ):
  
      if len(data) == 0:
          print "Dataset empty."
          return [go.Scatter( x = [] , y = [] )]
  
      timeline_data = Counter( sorted( map( lambda d: d['date'], data ) ) )
      return timeline_data
  
      #return [go.Scatter( x = date_series.keys() , y = date_series.values() )]
  
subject: Make compatible with plotly