imednet_streamlit.components package
- imednet_streamlit.components.bar_chart(df, x, y, color=None, title='', x_title=None, y_title=None)[source]
Build a horizontal Altair bar chart.
- Parameters:
df (
DataFrame) – Source DataFrame for the chart.x (
str) – Quantitative column for the x-axis.y (
str) – Categorical column for the y-axis.color (
Optional[str]) – Optional categorical column for grouped colors.title (
str) – Optional chart title.x_title (
Optional[str]) – Optional x-axis label override.y_title (
Optional[str]) – Optional y-axis label override.
- Return type:
Chart- Returns:
Configured Altair chart object.
- imednet_streamlit.components.csv_download_button(df, filename, label='⬇ Download CSV')[source]
Render a CSV download button for a DataFrame.
- Parameters:
df (
DataFrame) – DataFrame to serialize.filename (
str) – Output filename displayed in the browser download prompt.label (
str) – Button label text.
- Return type:
None
- imednet_streamlit.components.excel_download_button(df, filename, label='⬇ Download Excel')[source]
Render an Excel download button for a DataFrame.
- Parameters:
df (
DataFrame) – DataFrame to serialize.filename (
str) – Output filename displayed in the browser download prompt.label (
str) – Button label text.
- Return type:
None
- imednet_streamlit.components.filterable_dataframe(df, key, height=400)[source]
Render a searchable and paginated dataframe.
- Parameters:
df (
DataFrame) – Source DataFrame to display.key (
str) – Unique key namespace used for filter and pagination widgets.height (
int) – Height in pixels passed tost.dataframe.
- Return type:
None
- imednet_streamlit.components.kpi_card(label, value, delta=None, help=None)[source]
Render a single KPI metric card.
- Parameters:
label (
str) – Metric label displayed above the value.value (
int|float|str) – Metric value displayed in the card.delta (
Optional[str]) – Optional delta text (for trend direction).help (
Optional[str]) – Optional tooltip/help text.
- Return type:
None
- imednet_streamlit.components.kpi_row(metrics)[source]
Render a horizontal row of KPI metric cards.
- Parameters:
metrics (
list[dict]) – Sequence of metric dictionaries withlabelandvaluekeys. Optional keys aredeltaandhelp.- Return type:
None
- imednet_streamlit.components.line_chart(df, x, y, color=None, title='')[source]
Build an Altair temporal line chart.
- Parameters:
df (
DataFrame) – Source DataFrame for the chart.x (
str) – Temporal column for the x-axis.y (
str) – Quantitative column for the y-axis.color (
Optional[str]) – Optional categorical column for grouped lines.title (
str) – Optional chart title.
- Return type:
Chart- Returns:
Configured Altair chart object.
- imednet_streamlit.components.paginated_slice(df, *, key, page_size_options=(50, 100, 200), default_page_size=100)[source]
Render pager controls and return the current page slice.
- Return type:
DataFrame- Parameters:
df (DataFrame) –
key (str) –
page_size_options (tuple[int, ...]) –
default_page_size (int) –
- imednet_streamlit.components.pie_chart(df, theta, color, title='')[source]
Build an Altair pie chart.
- Parameters:
df (
DataFrame) – Source DataFrame for the chart.theta (
str) – Quantitative column used for slice size.color (
str) – Categorical column used for slice color.title (
str) – Optional chart title.
- Return type:
Chart- Returns:
Configured Altair chart object.
- imednet_streamlit.components.redact_sensitive_payload(data)[source]
Return data with sensitive key values redacted.
- Return type:
Any- Parameters:
data (Any) –
- imednet_streamlit.components.render_lineage_panes(*, raw_record, mapping_rules, canonical_payload)[source]
Render side-by-side lineage panes for raw, mapping, and canonical views.
- Return type:
None- Parameters:
raw_record (dict[str, Any] | None) –
mapping_rules (list[dict[str, Any]]) –
canonical_payload (dict[str, Any]) –
- imednet_streamlit.components.render_triage_drawer(*, store, item, assignee_options, current_user)[source]
Render triage detail and actions for a selected item.
- Return type:
None- Parameters:
store (TriageStore) –
item (TriageItem) –
assignee_options (Sequence[str]) –
current_user (str) –
- imednet_streamlit.components.top_n_with_other(df, *, label_column, value_column, top_n=10, other_label='Other')[source]
Return top-N rows plus an aggregated ‘Other’ row.
- Return type:
DataFrame- Parameters:
df (DataFrame) –
label_column (str) –
value_column (str) –
top_n (int) –
other_label (str) –
Submodules
imednet_streamlit.components.charts module
- imednet_streamlit.components.charts.bar_chart(df, x, y, color=None, title='', x_title=None, y_title=None)[source]
Build a horizontal Altair bar chart.
- Parameters:
df (
DataFrame) – Source DataFrame for the chart.x (
str) – Quantitative column for the x-axis.y (
str) – Categorical column for the y-axis.color (
Optional[str]) – Optional categorical column for grouped colors.title (
str) – Optional chart title.x_title (
Optional[str]) – Optional x-axis label override.y_title (
Optional[str]) – Optional y-axis label override.
- Return type:
Chart- Returns:
Configured Altair chart object.
- imednet_streamlit.components.charts.line_chart(df, x, y, color=None, title='')[source]
Build an Altair temporal line chart.
- Parameters:
df (
DataFrame) – Source DataFrame for the chart.x (
str) – Temporal column for the x-axis.y (
str) – Quantitative column for the y-axis.color (
Optional[str]) – Optional categorical column for grouped lines.title (
str) – Optional chart title.
- Return type:
Chart- Returns:
Configured Altair chart object.
- imednet_streamlit.components.charts.pie_chart(df, theta, color, title='')[source]
Build an Altair pie chart.
- Parameters:
df (
DataFrame) – Source DataFrame for the chart.theta (
str) – Quantitative column used for slice size.color (
str) – Categorical column used for slice color.title (
str) – Optional chart title.
- Return type:
Chart- Returns:
Configured Altair chart object.
imednet_streamlit.components.data_lineage module
- imednet_streamlit.components.data_lineage.redact_sensitive_payload(data)[source]
Return data with sensitive key values redacted.
- Return type:
Any- Parameters:
data (Any) –
- imednet_streamlit.components.data_lineage.render_lineage_panes(*, raw_record, mapping_rules, canonical_payload)[source]
Render side-by-side lineage panes for raw, mapping, and canonical views.
- Return type:
None- Parameters:
raw_record (dict[str, Any] | None) –
mapping_rules (list[dict[str, Any]]) –
canonical_payload (dict[str, Any]) –
imednet_streamlit.components.export module
- imednet_streamlit.components.export.csv_download_button(df, filename, label='⬇ Download CSV')[source]
Render a CSV download button for a DataFrame.
- Parameters:
df (
DataFrame) – DataFrame to serialize.filename (
str) – Output filename displayed in the browser download prompt.label (
str) – Button label text.
- Return type:
None
- imednet_streamlit.components.export.excel_download_button(df, filename, label='⬇ Download Excel')[source]
Render an Excel download button for a DataFrame.
- Parameters:
df (
DataFrame) – DataFrame to serialize.filename (
str) – Output filename displayed in the browser download prompt.label (
str) – Button label text.
- Return type:
None
imednet_streamlit.components.metrics module
- imednet_streamlit.components.metrics.kpi_card(label, value, delta=None, help=None)[source]
Render a single KPI metric card.
- Parameters:
label (
str) – Metric label displayed above the value.value (
int|float|str) – Metric value displayed in the card.delta (
Optional[str]) – Optional delta text (for trend direction).help (
Optional[str]) – Optional tooltip/help text.
- Return type:
None
imednet_streamlit.components.paginated_grid module
- imednet_streamlit.components.paginated_grid.paginated_slice(df, *, key, page_size_options=(50, 100, 200), default_page_size=100)[source]
Render pager controls and return the current page slice.
- Return type:
DataFrame- Parameters:
df (DataFrame) –
key (str) –
page_size_options (tuple[int, ...]) –
default_page_size (int) –
- imednet_streamlit.components.paginated_grid.top_n_with_other(df, *, label_column, value_column, top_n=10, other_label='Other')[source]
Return top-N rows plus an aggregated ‘Other’ row.
- Return type:
DataFrame- Parameters:
df (DataFrame) –
label_column (str) –
value_column (str) –
top_n (int) –
other_label (str) –
imednet_streamlit.components.tables module
- imednet_streamlit.components.tables.filterable_dataframe(df, key, height=400)[source]
Render a searchable and paginated dataframe.
- Parameters:
df (
DataFrame) – Source DataFrame to display.key (
str) – Unique key namespace used for filter and pagination widgets.height (
int) – Height in pixels passed tost.dataframe.
- Return type:
None
imednet_streamlit.components.triage_drawer module
- imednet_streamlit.components.triage_drawer.render_triage_drawer(*, store, item, assignee_options, current_user)[source]
Render triage detail and actions for a selected item.
- Return type:
None- Parameters:
store (TriageStore) –
item (TriageItem) –
assignee_options (Sequence[str]) –
current_user (str) –