pyresample._formatting_html module
Functions for html representation of area definition.
- pyresample._formatting_html._icon(icon_name)
- pyresample._formatting_html._load_static_files()
Lazily load the resource files into memory the first time they are needed.
- pyresample._formatting_html.area_repr(area, include_header=True, include_static_files=True, map_content=None)
Return html repr of an AreaDefinition.
- Parameters:
area (
Union[AreaDefinition,SwathDefinition]) – Area definition.include_header (
bool) – If true a header with object type will be included in the html. This is mainly intended for display in Jupyter Notebooks. For the display in the overview of area definitions for the Satpy documentation this should be set to false.include_static_files (
bool) – Load and include css and html needed for representation.map_content (
str|None) – Optionally override the map section contents. Can be any string that is valid HTML between a “<div></div>” tag.
- Returns:
Html.
- pyresample._formatting_html.collapsible_section(name, inline_details='', details='', enabled=True, collapsed=False, icon=None)
Create a collapsible section.
- Parameters:
name (
str) – Name of the sectioninline_details (
Optional[str]) – Information to show when section is collapsed. Default nothing.details (
Optional[str]) – Details to show when section is expanded.enabled (
Optional[bool]) – Is collapsing enabled. Default True.collapsed (
Optional[bool]) – Is the section collapsed on first show. Default False.
- Return type:
- Returns:
Html div structure for collapsible section.
- pyresample._formatting_html.plot_area_def(area, fmt=None, features=None)
Plot area.
- Parameters:
area (
Union[AreaDefinition,SwathDefinition]) – Area/Swath to plot.fmt (
Optional[Literal['svg','png',None]]) – Output format of the plot. The output is the string representation of the respective format xml for svg and base64 for png. Either svg or png. If None (default) plot is just shown.features (
Optional[Iterable[str]]) – Series of string names of cartopy features to add to the plot. Can be lowercase or uppercase names of the features, for example, “land”, “coastline”, “borders”, “ocean”, or any other feature available fromcartopy.feature. If None (default), then land, coastline, and borders are used.
- Return type:
- Returns:
svg or png image as string or
Nonewhen no format is provided in which case the plot is shown interactively.
- pyresample._formatting_html.proj_area_attrs_section(area)
Create html for attribute section based on an area Area.
- Parameters:
area (
AreaDefinition) – Area definition.- Return type:
- Returns:
Html with collapsible section of attributes of Area.
- pyresample._formatting_html.swath_area_attrs_section(area)
Create html for attribute section based on SwathDefinition.
- Parameters:
area (
SwathDefinition) – Swath definition.- Return type:
- Returns:
Html with collapsible section of swath attributes.