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|None) – 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) – set which EPSG projection to use for plotting, can be set manually, or will read from the environment variable: “POLARTOOLKIT_EPSG”, by default Nonecoast (
bool) – choose whether to plot coastline data, by default Truegrid (
DataArray|None) – display a grid on the map, by default Nonegrid_cmap (
str) – colormap to use for the grid, by default ‘inferno’points (
DataFrame) – points to display on the map, must have columns ‘x’ and ‘y’, by default Nonepoints_z (
str|None) – name of column to color points by, by default Nonepoints_color (
str) – if no points_z supplied, color to use for all points, by default ‘red’points_cmap (
str) – 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)