# PharmacyAtlas Asking-Price Alpha

This package contains the public PharmacyAtlas.ca asking-price test.
It estimates a seller-reported, business-only asking price from annual
prescription volume and shows the result beside cleaned public listing
observations.

## Evidence snapshot

- Model rows: 121
- Marketplaces: 2 (113 rows and 8 rows)
- Primary validation: leave one marketplace out
- Primary R-squared: 0.400265
- Mean absolute error: CAD 672,506
- Median absolute error: CAD 305,831
- Median absolute percentage error: 38.46%
- Within 50% of the listed ask: 72.73%
- Spearman rank correlation: 0.834792

The target is a seller asking price, not a completed transaction. The model is
not a fair-market appraisal, profit estimate, prescription forecast, lender
opinion, or investment recommendation.

## Run locally

Open `index.html` through a local web server so the browser can load the CSV:

```bash
python3 -m http.server 8000
```

Then visit `http://127.0.0.1:8000/demo.html`.

To reproduce the published validation metrics:

```bash
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
python reproduce_metrics.py
```

To test the browser model without a browser:

```bash
node test_model.mjs
```

## Files

- `model.json`: formula, range, version, and release boundaries
- `metrics.json`: full validation and cleaning results
- `model-observations.csv`: anonymized model fields and predictions made across separate listing sources
- `pharmacyatlas-asking-price-model.js`: dependency-free browser model
- `pharmacyatlas-asking-price-ui.js`: interactive graph and input handling
- `pharmacyatlas-asking-price-ui.css`: standalone interface styles
- `demo.html`: standalone browser demo
- `reproduce_metrics.py`: independent metric reproduction
- `MODEL_CARD.md`: intended use and limitations
- `DATA-NOTICE.md`: data provenance and reuse notice
- `integrity.json`: SHA-256 hashes for generated model artifacts

## License

The software is available under the MIT License. See `DATA-NOTICE.md` for the
separate status of the factual listing observations.
