holoviz-topics / EarthSim

Tools for working with and visualizing environmental simulations.
https://earthsim.holoviz.org
BSD 3-Clause "New" or "Revised" License
65 stars 21 forks source link

Inconsistency in specification of point_columns #217

Open kcpevey opened 6 years ago

kcpevey commented 6 years ago

If I don't specify point_columns in my annotator instantiation, point_table will automatically add the vdims that are already in gv element BUT it also adds the default Size column.

When I specify specific point_columns, it doesn't actually use what I've specified, it uses ONLY the vdims from the gv element (without the default Size column.

point_columns

hurricane_path_color.txt

data_df = pd.read_csv('../../data/hurricane_path_color.txt', delimiter=',', header=0, parse_dates=['Datetime'])
gvpath = gv.Path([data_df], kdims=['Longitude', 'Latitude'], vdims=['Datetime','Pressure','Max_Wind_Speed','Radius','Direction_Degrees','Direction_Speed'], crs=proj)
gvpoint = gv.Points(data_df, kdims=['Longitude', 'Latitude'], vdims=['Datetime','Pressure','Max_Wind_Speed','Radius','Direction_Degrees','Direction_Speed'], crs=proj)
annot = PolyAndPointAnnotator(path_type=Path, polys=gvpath, points=gvpoint,
                              point_columns=['Pressure','Max_Wind_Speed'], 
                              tile_url='https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{Z}/{Y}/{X}',
                              crs=proj)

(annot.tiles * annot.polys * annot.points + annot.point_table).cols(1)