semvec/pypi-packages huggingface dataset:
societal-costs-pipeline-2026-02-04-1000 0.1.0
Societal costs pipeline CLI.
Requires Python: >=3.9

# societal_costs

Workspace for the societal costs study.

## Crates

- `crates/costs_core` — core domain types, aggregation, pricing, and validation.
- `crates/costs_models` — two-part, Tweedie, and log-normal models + selection tools.
- `crates/costs_matching` — matching + balance diagnostics.
- `crates/costs_cohort` — cohort assignment + diagnostics.
- `crates/costs_components` — register-derived component builders (LMDB volume so far).
- `crates/costs_pipeline` — configuration, orchestration, and report outputs.

## LMDB example

See `crates/costs_pipeline/README.md` for the LMDB ingestion example.

## Pipeline config

Start from `pipeline.example.toml` and update the register file paths to match
your local dataset layout. Most SAS7BDAT paths accept either a single file
or a directory (all `.sas7bdat` files are loaded, sorted by name). You can
also set `base_path` in the config to prefix all relative register paths.
If you use contact-based SCD classification, set
`components.lpr.scd_inpatient_contact_types` (or flip
`components.lpr.scd_allow_outpatient = true` to allow outpatient contacts).

Pipeline outputs include consolidated QC under `qc_summary.csv/json`, plus
step-specific outputs such as `lpr_episode_qc.csv`, `matching_outcome_qc.csv`,
`matching_parent_qc.csv`, and `population_public_stats.csv`.

For terminal progress and timing, set:
- `pipeline.progress = true`
- `pipeline.log_level = "info"` (or `debug`)

## Additional docs

- `crates/costs_core/README.md` — core domain and aggregation usage.
- `crates/costs_models/README.md` — model APIs and examples.
- `crates/costs_models/examples/README.md` — runnable model examples.
- `crates/costs_components/README.md` — LMDB note (missing price fields).
- `crates/costs_pipeline/README.md` — pipeline usage and LMDB example.
table-to-image 0.1.0
Convert markdown tables to PNG images
Requires Python: >=3.8

# table-to-image

Convert pandas DataFrame tables to PNG images.

## Installation

```bash
pip install table-to-image
```

## Usage

### As a Python Library

```python
import pandas as pd
from table_to_image import render

# Create a DataFrame
df = pd.DataFrame({
    'Name': ['Alice', 'Bob', 'Charlie'],
    'Age': [25, 30, 35],
    'City': ['NYC', 'LA', 'Chicago']
})

# Convert to image
render(df, 'output.png')

# With custom options
render(df, 'output.png', font_size=16, header_bg_color=(255, 0, 0))
```

### Using the Class

```python
import pandas as pd
from table_to_image import DataFrameToImage

df = pd.DataFrame({'A': [1, 2], 'B': ['x', 'y']})

converter = DataFrameToImage(font_size=18, header_bg_color=(0, 128, 0))
converter.convert(df, 'table.png')
```

### CLI

```bash
# Convert CSV to PNG
table-to-image input.csv output.png

# Convert with custom font size
table-to-image input.csv output.png --size 20

# Convert Excel file
table-to-image data.xlsx output.png
```

## Options

| Option | Description | Default |
|--------|-------------|---------|
| `font_size` | Font size for text | 14 |
| `header_bg_color` | Header background color (RGB tuple) | (70, 130, 180) |
| `header_text_color` | Header text color (RGB tuple) | (255, 255, 255) |
| `cell_bg_color` | Cell background color (RGB tuple) | (255, 255, 255) |
| `cell_text_color` | Cell text color (RGB tuple) | (0, 0, 0) |
| `margin` | Margin around the table | 10 |

## License

MIT