API Reference#

polyflame.plot(kwargs: DataPlotInfo) Figure | DataFrame#

Generic plotting function for PolyFLAME

Unlike polyflame.plot_unpacked(), this function takes a single dictionary as a parameter. This is used together with adapter functions from data sources, such as the FHIRflat adapter.

polyflame.plot_unpacked(data: DataFrame, type: Literal['pyramid', 'upset', 'proportion'] | None, **kwargs: Unpack[PlotInfo]) Figure | DataFrame#

Generic plotting function dispatcher, unpacked version

Parameters:
  • data – Data to plot

  • type – Type of plot, one of pyramid, upset or proportion

  • **kwargs – Additional plot parameters

polyflame.load_taxonomy(file_part: str) dict[str, dict[str, str | bool]]#

Loads taxonomy from a TOML file

polyflame.with_readable_terms(data: DataFrame, tx: dict[str, dict[str, str | bool]], columns: list[ReadableTermColumnInfo]) DataFrame#

In place replacement of codes with readable terms