Skip to content

About

A comprehensive open-source dashboard for forecasting well production using advanced analytics and visualization. Designed to help engineers and analysts monitor trends, predict future output, and optimize resource planning.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

44 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ข๏ธ Well Production Forecasting Dashboard

A Streamlit-based machine learning dashboard for visualizing, cleaning, engineering, training, and forecasting oil & gas well production.

License Last Commit Issues Pull Requests Repo Size Code Size Contributors Forks GitHub Stars

๐Ÿš€ Overview

The Well Production Forecasting Dashboard is an end-to-end machine learning application designed for petroleum engineers, reservoir analysts, and data scientists. It enables you to:

  • Import custom datasets or use included real-world samples
  • Visualize production trends with interactive plots
  • Prepare and process data for analysis and modeling
  • Build CART machine-learning models
  • Produce accurate well production forecasts

The app is organized into five interactive Streamlit tabs, offering a smooth and guided workflow from raw data to final prediction.

๐Ÿ“ Project Structure

production-forecasting-dashboard/
โ”‚
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ main.py               # Main Streamlit app with all tabs
โ”‚   โ”œโ”€โ”€ upload_tab.py         # Dataset upload + built-in dataset selector
โ”‚   โ”œโ”€โ”€ data_eng_tab.py       # Visualization + preprocessing tools
โ”‚   โ”œโ”€โ”€ train_tab.py          # CART model training + evaluation
โ”‚   โ”œโ”€โ”€ prediction_tab.py     # Prediction using trained model
โ”‚
โ”œโ”€โ”€ data/                     # Included real-world ND datasets
โ”‚   โ”œโ”€โ”€ ND_cumulative_formation_2020.xlsx
โ”‚   โ”œโ”€โ”€ ND_gas_1990_to_present.xlsx
โ”‚   โ”œโ”€โ”€ ND_historical_barrels_of_oil_produced_by_county.xlsx
โ”‚   โ””โ”€โ”€ ND_historical_MCF_gas_produced_by_county.xlsx
โ”‚
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ plots.py              # Unified Seaborn + Matplotlib plotting utilities
โ”‚   โ””โ”€โ”€ model.py              # CART model builder, evaluator, saver
โ”‚
โ”œโ”€โ”€ strings/
โ”‚   โ””โ”€โ”€ strings.py            # UI messages and text constants
โ”‚
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ LICENSE

๐Ÿง  Features

๐Ÿ”น 1. Dataset Handling

  • Upload custom .xlsx files
  • Select from four included North Dakota datasets
  • Automatic dataset summary and preview
  • Preprocessing support for modeling and visualization

๐Ÿ”น 2. Exploratory Data Analysis

The dashboard includes 15+ interactive plot types, grouped into:

๐Ÿ“Š Distribution Plots

  • Distribution plot
  • Histogram (configurable bins)
  • KDE
  • ECDF
  • Rug plot

๐Ÿงฉ Categorical Plots

  • Catplot
  • Strip plot
  • Swarm plot
  • Box plot
  • Violin plot
  • Point plot
  • Bar plot

๐Ÿ”— Relational Plots

  • Scatter plot
  • Line plot

All plots use clean Seaborn + Matplotlib visuals optimized for Streamlit.

๐Ÿค– Machine Learning (CART)

The app supports CART decision tree models for both regression and classification.

โœ” Automatically handles:

  • Numeric columns
  • Date/time formatting
  • Label encoding for non-numeric features

โœ” Model evaluation includes:

  • Accuracy (classification)
  • MSE & Rยฒ (regression)

Models can be trained, evaluated, and saved locally for later predictions.

๐Ÿ”ฎ Prediction

  • Generate predictions using trained CART models
  • Interactive input forms
  • Downloadable prediction results

โ–ถ๏ธ How to Run the App

1๏ธโƒฃ Clone the repository

git clone https://github.com/sobhankohanpour/production-forecasting-dashboard.git
cd production-forecasting-dashboard

2๏ธโƒฃ Install dependencies

pip install -r requirements.txt

3๏ธโƒฃ Launch the Streamlit app

streamlit run app/main.py

๐Ÿ“ฆ Dependencies

Requires Python 3.8+

Core libraries:

  • streamlit
  • pandas
  • matplotlib
  • seaborn
  • scikit-learn
  • joblib

๐Ÿ“˜ Included Datasets

The data/ directory includes curated North Dakota production datasets:

  • Cumulative Oil Production by Formation (2020)
  • Gas Production (1990โ€“Present)
  • Historical Monthly Oil Production by County
  • Historical Monthly Gas Production by County

All datasets are directly accessible from within the dashboard.

๐Ÿงฉ Plot Utilities (src/plots.py)

Reusable plotting functions include:

  • scatterplot()
  • lineplot()
  • distplot(), histplot(), kdeplot()
  • ecdfplot(), rugplot()
  • catplot(), stripplot(), swarmplot()
  • boxplot(), violinplot()
  • pointplot(), barplot()

Easy to extend for custom visualizations.

๐Ÿ“„ License

MIT License โ€” free for personal and commercial use.

๐Ÿค Contributing

Contributions, enhancements, and feature requests are welcome! Feel free to open an issue or submit a pull request.

โญ Support

If you find this project useful, please consider giving it a star โญ on GitHub.

About

A comprehensive open-source dashboard for forecasting well production using advanced analytics and visualization. Designed to help engineers and analysts monitor trends, predict future output, and optimize resource planning.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages