Skip to content

fairvis.visualization

Plotly figures of a FAIR assessment.

SUBSET_KEYS module-attribute

SUBSET_KEYS = (
    "Model",
    "Model metadata",
    "Archive",
    "Archive metadata",
)

Types of indicators, one polar figure each.

COLOR_DISCRETE_SEQUENCE module-attribute

COLOR_DISCRETE_SEQUENCE = (
    "#1f77b4",
    "#ff7f0e",
    "#2ca02c",
    "#d62728",
    "#9467bd",
    "#8c564b",
    "#e377c2",
    "#7f7f7f",
    "#bcbd22",
    "#17becf",
)

Colors of the categories.

NA_LABEL module-attribute

NA_LABEL = 'NA (not applicable)'

Legend entry of the indicators which do not apply to a model.

NA_COLOR module-attribute

NA_COLOR = '#d9d9d9'

Color of the indicators which do not apply to a model, light gray.

visualize_barplot

visualize_barplot(df_data)

Bar plot of the fraction of the applicable indicators fulfilled per category.

NA marks an indicator which does not apply to the model; it is not counted. A category without applicable indicators is labeled NA.

Parameters:

Name Type Description Default
df_data DataFrame

assessment of a model, see fairvis.data_io.load_assessment.

required

Returns:

Type Description
Figure

bar plot with the FAIR percentage per category.

visualize_polar_barplots

visualize_polar_barplots(df_data)

Polar bar plots of the indicators of a model, one per type of indicator.

An indicator which does not apply to the model (NA) is drawn as a full gray bar, so it is distinguishable from an indicator assessed with 0.

Parameters:

Name Type Description Default
df_data DataFrame

assessment of a model, see fairvis.data_io.load_assessment.

required

Returns:

Type Description
list[Figure]

one polar bar plot per entry of SUBSET_KEYS, in that order.