from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))
from datetime import datetime
import pandas as pd
import hvplot.pandas # noqa
from datashader.utils import lnglat_to_meters
from holoviews.element import tiles
csv_file = 'E:/Geodata/AISDK/raw_ais/aisdk_20170701.csv'
%%time
df = pd.read_csv(csv_file, usecols=['Latitude', 'Longitude'])
len(df)
print(datetime.now())
df.plot.scatter(x='Longitude', y='Latitude')
print(datetime.now())
%%time
df.loc[:, 'x'], df.loc[:, 'y'] = lnglat_to_meters(df.Longitude, df.Latitude)
print(datetime.now())
tiles.OSM() * df.hvplot.scatter(x='x', y='y', datashade=True, height=400, width=500)
print(datetime.now())