malariagen_data.af1.Af1.plot_sample_location_mapbox#

Af1.plot_sample_location_mapbox(*, sample_sets: Sequence[str] | str | None, sample_query: str | None = None, sample_query_options: dict | None = None, marker_size: int | float = 10, color: str | Mapping | None = 'admin1_name', color_discrete_sequence: List | None = ['rgb(95, 70, 144)', 'rgb(29, 105, 150)', 'rgb(56, 166, 165)', 'rgb(15, 133, 84)', 'rgb(115, 175, 72)', 'rgb(237, 173, 8)', 'rgb(225, 124, 5)', 'rgb(204, 80, 62)', 'rgb(148, 52, 110)', 'rgb(111, 64, 112)', 'rgb(102, 102, 102)'], category_orders: List | Mapping | None = None, hover_name: str | Mapping | None = 'location', zoom: int | float | None = None, width: int | None = 800, height: int | None = 600, show: bool = True, renderer: str | None = None, **kwargs) Figure | None#

Plot markers on a map showing sample locations as a Mapbox scatter plot.

Parameters#

sample_setssequence of str or str or None

List of sample sets and/or releases. Can also be a single sample set or release.

sample_querystr or None, optional

A pandas query string to be evaluated against the sample metadata, to select samples to be included in the returned data.

sample_query_optionsdict or None, optional

A dictionary of arguments that will be passed through to pandas query() or eval(), e.g. parser, engine, local_dict, global_dict, resolvers.

marker_sizeint or float, optional, default: 10

Marker size.

colorstr or Mapping or None, optional, default: ‘admin1_name’

Name of variable to use to color the markers.

color_discrete_sequenceList or None, optional, default: [‘rgb(95, 70, 144)’, ‘rgb(29, 105, 150)’, ‘rgb(56, 166, 165)’, ‘rgb(15, 133, 84)’, ‘rgb(115, 175, 72)’, ‘rgb(237, 173, 8)’, ‘rgb(225, 124, 5)’, ‘rgb(204, 80, 62)’, ‘rgb(148, 52, 110)’, ‘rgb(111, 64, 112)’, ‘rgb(102, 102, 102)’]

Provide a list of colours to use.

category_ordersList or Mapping or None, optional

Control the order in which values appear in the legend.

hover_namestr or Mapping or None, optional, default: ‘location’

Name of variable to appear in bold in the hover tooltip.

zoomint or float or None, optional

Initial zoom level.

widthint or None, optional, default: 800

Figure width in pixels (px).

heightint or None, optional, default: 600

Figure height in pixels (px).

showbool, optional, default: True

If true, show the plot. If False, do not show the plot, but return the figure.

rendererstr or None, optional

The name of the renderer to use.

**kwargs

Passed through to px.scatter_mapbox().

Returns#

Figure or None

A plotly figure (only returned if show=False).