In [ ]:
import pandas as pd
import holoviews as hv
from holoviews import opts
hv.extension('bokeh')
In [ ]:
import sqlite3
from bokeh.sampledata import movies_data
# Load data
conn = sqlite3.connect(movies_data.movie_path)
movies = pd.read_sql('SELECT userRating, imdbRating FROM omdb, tomatoes WHERE omdb.ID = tomatoes.ID', conn)
# Declare element
hextiles = hv.HexTiles(movies, [('userRating', 'Tomato User Rating'), ('imdbRating', 'IMDb Rating')], [])
bivariate = hv.Bivariate(hextiles)
In [ ]:
(hextiles * bivariate).opts(
opts.Bivariate(show_legend=False),
opts.HexTiles(width=500, height=500, min_count=0))