A Streamlit-based machine learning dashboard for visualizing, cleaning, engineering, training, and forecasting oil & gas well production.
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.
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
- Upload custom
.xlsxfiles - Select from four included North Dakota datasets
- Automatic dataset summary and preview
- Preprocessing support for modeling and visualization
The dashboard includes 15+ interactive plot types, grouped into:
- Distribution plot
- Histogram (configurable bins)
- KDE
- ECDF
- Rug plot
- Catplot
- Strip plot
- Swarm plot
- Box plot
- Violin plot
- Point plot
- Bar plot
- Scatter plot
- Line plot
All plots use clean Seaborn + Matplotlib visuals optimized for Streamlit.
The app supports CART decision tree models for both regression and classification.
- Numeric columns
- Date/time formatting
- Label encoding for non-numeric features
- Accuracy (classification)
- MSE & Rยฒ (regression)
Models can be trained, evaluated, and saved locally for later predictions.
- Generate predictions using trained CART models
- Interactive input forms
- Downloadable prediction results
git clone https://github.com/sobhankohanpour/production-forecasting-dashboard.git
cd production-forecasting-dashboardpip install -r requirements.txtstreamlit run app/main.pyRequires Python 3.8+
Core libraries:
- streamlit
- pandas
- matplotlib
- seaborn
- scikit-learn
- joblib
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.
Reusable plotting functions include:
scatterplot()lineplot()distplot(),histplot(),kdeplot()ecdfplot(),rugplot()catplot(),stripplot(),swarmplot()boxplot(),violinplot()pointplot(),barplot()
Easy to extend for custom visualizations.
MIT License โ free for personal and commercial use.
Contributions, enhancements, and feature requests are welcome! Feel free to open an issue or submit a pull request.
If you find this project useful, please consider giving it a star โญ on GitHub.