Metadata-Version: 2.4
Name: decline-curve
Version: 0.2.1
Summary: Decline Curve Analysis: A comprehensive Python library for decline curve analysis with multi-phase forecasting, data utilities, and ML models
Author-email: "Kyle T. Jones" <kyletjones@gmail.com>
Maintainer-email: "Kyle T. Jones" <kyletjones@gmail.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/kylejones200/decline-curve
Project-URL: Documentation, https://decline-curve.readthedocs.io/
Project-URL: Repository, https://github.com/kylejones200/decline-curve
Project-URL: Bug Tracker, https://github.com/kylejones200/decline-curve/issues
Project-URL: Changelog, https://github.com/kylejones200/decline-curve/blob/main/CHANGELOG.md
Keywords: decline-curve-analysis,petroleum-engineering,oil-and-gas,production-forecasting,arps-decline,reserves-estimation,time-series,machine-learning,economic-analysis
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=2.0
Requires-Dist: scipy>=1.10
Requires-Dist: matplotlib>=3.7
Requires-Dist: tqdm>=4.66
Requires-Dist: numpy-financial>=1.0
Requires-Dist: requests>=2.25
Requires-Dist: xlrd>=2.0
Requires-Dist: numba>=0.58
Requires-Dist: joblib>=1.3
Provides-Extra: stats
Requires-Dist: statsmodels>=0.14; extra == "stats"
Provides-Extra: spatial
Requires-Dist: pykrige>=1.7.0; extra == "spatial"
Requires-Dist: scikit-learn>=1.3; extra == "spatial"
Provides-Extra: integrations
Requires-Dist: pygeomodeling>=0.3.0; extra == "integrations"
Requires-Dist: geosuite>=0.1.0; extra == "integrations"
Requires-Dist: signalplot>=0.1.0; extra == "integrations"
Provides-Extra: llm
Requires-Dist: transformers>=4.41; extra == "llm"
Requires-Dist: torch>=2.0; extra == "llm"
Requires-Dist: accelerate>=0.29; extra == "llm"
Requires-Dist: einops>=0.7; extra == "llm"
Provides-Extra: ml
Requires-Dist: transformers>=4.41; extra == "ml"
Requires-Dist: torch>=2.0; extra == "ml"
Requires-Dist: accelerate>=0.29; extra == "ml"
Requires-Dist: einops>=0.7; extra == "ml"
Requires-Dist: scikit-learn>=1.3; extra == "ml"
Provides-Extra: benchmark
Requires-Dist: mlflow>=2.0; extra == "benchmark"
Requires-Dist: pyyaml>=6.0; extra == "benchmark"
Provides-Extra: config
Requires-Dist: tomli>=2.0.0; python_version < "3.11" and extra == "config"
Requires-Dist: pyyaml>=6.0; extra == "config"
Provides-Extra: reports
Requires-Dist: reportlab>=4.0.0; extra == "reports"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: pytest-xdist>=3.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: isort>=5.12; extra == "dev"
Requires-Dist: flake8>=6.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Requires-Dist: types-requests>=2.32; extra == "dev"
Requires-Dist: pre-commit>=3.0; extra == "dev"
Requires-Dist: line_profiler>=4.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=7.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=2.0; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints>=1.20; extra == "docs"
Provides-Extra: examples
Requires-Dist: jupyter>=1.0; extra == "examples"
Requires-Dist: notebook>=7.0; extra == "examples"
Requires-Dist: ipykernel>=6.0; extra == "examples"
Provides-Extra: all
Requires-Dist: decline-curve[dev,docs,examples,integrations,llm,ml,spatial,stats]; extra == "all"
Dynamic: license-file

# Decline Curve Analysis

A Python library for forecasting oil and gas production using traditional decline models and modern machine learning.

## What this is

Decline curve analysis is essential for petroleum engineers, reservoir analysts, and energy economists who need to predict future production from oil and gas wells. This library provides both classical Arps decline models and state-of-the-art forecasting methods in a single, easy-to-use package.

The library helps you forecast production rates, estimate reserves, and evaluate economic performance. It supports exponential, harmonic, and hyperbolic decline curves, plus machine learning models like ARIMA, Chronos, and TimesFM for more complex patterns. Monte Carlo simulation provides probabilistic forecasts with P10/P50/P90 ranges for risk assessment.

Whether you're analyzing a single well or benchmarking hundreds across a field, the library handles data processing, model fitting, and visualization automatically. It's designed for both quick analyses and production workflows that need reproducibility and uncertainty quantification.

## Highlights

The library combines traditional petroleum engineering methods with modern forecasting techniques, providing probabilistic forecasts, economic analysis, and batch processing capabilities. It uses Numba JIT compilation and parallel processing for fast execution on large datasets, making it practical for field-wide analysis and sensitivity studies.

## Installation

```bash
pip install decline-curve
```

### Optional Dependencies

For additional features, install optional extras:

```bash
# Statistical models (ARIMA)
pip install decline-curve[stats]

# Large language models (Chronos, TimesFM)
pip install decline-curve[llm]

# Spatial analysis (kriging)
pip install decline-curve[spatial]

# Ecosystem integrations (pygeomodeling, geosuite)
pip install decline-curve[integrations]

# All optional features
pip install decline-curve[all]
```

## Quick start

```python
import pandas as pd
import numpy as np
from decline_curve import dca

# Create sample production data
dates = pd.date_range('2020-01-01', periods=24, freq='MS')
production = 1000 * np.exp(-0.05 * np.arange(24))
series = pd.Series(production, index=dates, name='oil_bbl')

# Generate forecast
forecast = dca.forecast(series, model='arps', kind='hyperbolic', horizon=12)
```

Command line interface:

```bash
dca fit production.csv --well WELL_001 --model arps
```

## Examples

See `examples/01_basic_dca_analysis.ipynb` for a complete workflow and `examples/02_economic_evaluation.ipynb` for economic analysis.

## Project status

The library is in active development with core functionality stable. Current focus is on expanding machine learning model support and improving uncertainty quantification methods.

## Roadmap

We're adding support for more foundation models and ensemble forecasting methods. Data quality tools and automated segmentation are being enhanced. The batch processing pipeline is being optimized for larger field datasets.

## Ecosystem Integration

This library integrates with other tools in the ecosystem:

- **signalplot**: Minimalist plotting design for publication-ready figures (used by default)
- **pygeomodeling**: Advanced Gaussian Process Regression and Kriging for spatial EUR interpolation
- **geosuite**: Professional subsurface analysis tools for petrophysics and geomechanics

All plots use signalplot's minimalist aesthetic by default when available. See `examples/10_ecosystem_integration_example.py` for integration examples.

## Contributing

We welcome contributions. Please see `CONTRIBUTING.md` for guidelines.

## License

Licensed under the Apache License 2.0. See `LICENSE` for details.
