Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import pandas as pd
  2. import holoviews as hv
  3. from holoviews import opts
  4. hv.extension('bokeh')
  5. data = pd.read_csv('book6.csv', delimiter=';')
  6. vdims = ('V132', 'SE132')
  7. heatmaps = []
  8.  
  9. for etos in [2015, 2016]:
  10. data1 = data[data['YEAR'] == etos]
  11. ds = hv.Dataset(data1, ['TF14', 'NOMOS'], vdims)
  12. heat = hv.HeatMap(ds)
  13. heat.opts(title_format=str(etos))
  14. heatmaps.append(heat)
  15.  
  16. layout = heatmaps[0] + heatmaps[1]
  17. layout.opts(opts.HeatMap(width=500, height=600, tools=['hover'], colorbar=True, toolbar='above', xrotation=45))
  18. hv.save(layout, 'test.html')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement