polartoolkit.interactive_data#
- interactive_data(hemisphere=None, epsg=None, coast=True, grid=None, grid_cmap='inferno', points=None, points_z=None, points_color='red', points_cmap='viridis', **kwargs)[source]#
plot points or grids on an interactive map using GeoViews
- Parameters:
hemisphere (str, optional) – set whether to plot in “north” hemisphere (EPSG:3413) or “south” hemisphere (EPSG:3031), can be set manually, or will read from the environment variable: “POLARTOOLKIT_HEMISPHERE”
epsg (str | None, optional) – set which EPSG projection to use for plotting, can be set manually, or will read from the environment variable: “POLARTOOLKIT_EPSG”, by default None
coast (bool, optional) – choose whether to plot coastline data, by default True
grid (xarray.DataArray, optional) – display a grid on the map, by default None
grid_cmap (str, optional) – colormap to use for the grid, by default ‘inferno’
points (pandas.DataFrame, optional) – points to display on the map, must have columns ‘x’ and ‘y’, by default None
points_z (str, optional) – name of column to color points by, by default None
points_color (str, optional) – if no points_z supplied, color to use for all points, by default ‘red’
points_cmap (str, optional) – colormap to use for the points, by default ‘viridis’
- Returns:
holoview/geoviews map instance
- Return type:
Example
>>> import polartoolkit as ptk ... >>> bedmap2_bed = ptk.fetch.bedmap2(layer='bed', region=ptk.regions.ross_ice_shelf) >>> GHF_point_data = ptk.fetch.ghf(version='burton-johnson-2020', points=True) ... >>> image = ptk.interactive_data( ... epsg="3031", ... grid = bedmap2_bed, ... points = GHF_point_data[['x','y','GHF']], ... points_z = 'GHF', ... ) >>> image
- Parameters:
kwargs (
Any)