---
name: ambforecast
description: >
  Ambulance forecast. Use when writing Python code that uses the ambforecast package.
compatibility: Requires Python >=3.10.
---

# ambforecast

Ambulance forecast

## Installation

```bash
pip install ambforecast
```

## API overview

### Data preparation

Prepare and validate historic, holiday, and temperature data.

- `preprocessing.prepare_historic`
- `preprocessing.validate_historic`
- `preprocessing.prepare_holidays`
- `preprocessing.validate_holidays`
- `preprocessing.expand_holiday_windows`
- `preprocessing.prepare_temp`
- `preprocessing.interpolate_temp`
- `preprocessing.validate_temp`

### Data splitting

Create train/test splits and rolling forecast origin samples.

- `splits.train_test_split`
- `splits.rolling_forecast_origin`

### ARIMA

Configure and run ARIMA forecasts.

- `arima.ARIMAParams`
- `arima.arima`

### Prophet

Configure and run Prophet forecasts.

- `prophet.ProphetRegressor`
- `prophet.ProphetParams`
- `prophet.prophet`

### Naive benchmark

Configure and run Seasonal Naive forecasts.

- `naive.SNaiveParams`
- `naive.snaive`

### Running forecasts

Run individual, multi-area/metric, and cross-validation forecasts.

- `forecast.run_single_forecast`
- `forecast.run_forecasts`
- `forecast.run_cross_validation`

### Ensembles

Combine forecasts.

- `ensemble.ensemble`

### Forecast evaluation

Calculate forecast accuracy measures.

- `errors.forecast_errors`
- `errors.calculate_errors`

### Plotting

Visualise results.

- `plot.plot_forecast`
- `plot.plot_cross_validation`
- `plot.plot_observed_against_forecast`
- `plot.plot_holiday_coverage`
- `plot.plot_error_over_time`
- `plot.plot_error_boxplot`

## Resources

- [Full documentation](https://ambmodels.github.io/ambforecast/)
- [llms.txt](llms.txt) — Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) — Comprehensive documentation for LLMs
