Skip to content
well-production-dashboard logo

Well Production Dashboard Skill

well-production-dashboard

Create interactive well production dashboards with real-time monitoring, verification integration, economic metrics, and multi-format exports. Use for well performance analysis, field aggregation, production forecasting, and API-driven dashboards.

mattnigh/skills_collection0installs24stars

SKILL.md

Full skill instructions

Well Production Dashboard Skill

Interactive dashboard system for well production visualization, analysis, and monitoring with Flask REST API, verification integration, and comprehensive export capabilities.

When to Use

  • Interactive well production dashboards
  • Real-time well monitoring and alerts
  • Production decline analysis and forecasting
  • Field-level aggregation and comparison
  • Well economic metrics (NPV, decline rates, ROI)
  • Data quality verification integration
  • Multi-format exports (PDF, Excel, JSON)
  • REST API for dashboard data access

Prerequisites

  • Python environment with worldenergydata package installed
  • BSEE well production data
  • Flask (included in dependencies) for API features

Dashboard Types

1. Basic Well Dashboard

Create interactive dashboard for well analysis.

well_production_dashboard:
  basic:
    flag: true
    title: "Well Production Dashboard"
    wells:
      - "API_12345"
      - "API_67890"
    date_range:
      start: "2020-01-01"
      end: "2024-12-31"
    output:
      html_file: "reports/​well_dashboard.html"

2. Field Aggregation Dashboard

Aggregate wells to field level with statistics.

well_production_dashboard:
  field_aggregation:
    flag: true
    field_name: "ANCHOR"
    aggregation:
      - total_production
      - mean_production
      - std_deviation
      - well_count
    comparison_fields:
      - "JULIA"
      - "JACK"
    output:
      field_report: "reports/​field_comparison.html"

3. Real-Time Monitoring Dashboard

Enable real-time updates with WebSocket.

well_production_dashboard:
  real_time:
    flag: true
    enable_real_time: true
    update_interval_ms: 60000
    websocket_port: 8765
    api_port: 5000
    alerts:
      production_threshold: 1000  # BBL/​day
      decline_alert: 0.15  # 15% decline triggers alert
    output:
      dashboard_port: 5000

4. Economic Analysis Dashboard

Dashboard with financial metrics.

well_production_dashboard:
  economics:
    flag: true
    wells:
      - "API_12345"
    metrics:
      - npv
      - decline_rate
      - roi
      - payback_period
    economic_params:
      discount_rate: 0.10
      oil_price: 75.0  # $/​BBL
      opex_per_bbl: 12.0
    forecast_periods: 24
    output:
      economics_report: "reports/​well_economics.html"

Python API

Dashboard Initialization

from worldenergydata.modules.well_production_dashboard import (
    WellProductionDashboard,
    WellDashboardConfig,
    WellMetrics,
    FieldAggregator,
    DashboardAPI,
    DashboardCLI
)

# Create configuration
config = WellDashboardConfig(
    title="Well Production Dashboard",
    enable_verification=True,
    enable_real_time=False,
    cache_ttl=300,  # 5 minutes
    quality_threshold=0.8,
    api_port=5000,
    export_formats=['pdf', 'excel']
)

# Initialize dashboard
dashboard = WellProductionDashboard(config)
print(f"Dashboard initialized: {config.title}")

Load Well Data

import pandas as pd
from datetime import datetime

# Load from DataFrame
production_data = pd.read_csv('well_production.csv')
dashboard.load_well_data(data=production_data)

# Or load using BSEE query optimizer
dashboard.load_well_data(
    well_ids=['API_12345', 'API_67890'],
    start_date=datetime(2020, 1, 1),
    end_date=datetime(2024, 12, 31)
)

print(f"Loaded {len(dashboard.well_data)} production records")

YAML Configuration Loading

# Load dashboard from YAML config
dashboard = WellProductionDashboard.from_yaml('config/​dashboard_config.yaml')

# Example YAML config file structure:
# dashboard:
#   title: "Production Analysis"
#   enable_verification: true
#   cache_ttl: 300
#   quality_threshold: 0.8
# wells:
#   - id: "API_12345"
#   - id: "API_67890"
# filters:
#   date_range:
#     start: "2020-01-01"
#     end: "2024-12-31"

Well Metrics Calculations

from worldenergydata.modules.well_production_dashboard import WellMetrics

# NPV Calculation
cash_flows = [-1500, 200, 400, 600, 800, 700, 500, 400, 300, 200]
npv = WellMetrics.calculate_npv(cash_flows, discount_rate=0.10)
print(f"Well NPV: ${npv:,.2f}M")

# Decline Rate Analysis
production = [1000, 950, 900, 860, 820, 785, 750, 720, 690, 665]
decline_rate = WellMetrics.calculate_decline_rate(production)
print(f"Decline Rate: {decline_rate:.2%}")

# Economic Indicators
revenue = 5_000_000
opex = 1_200_000
capex = 2_500_000

indicators = WellMetrics.calculate_economic_indicators(revenue, opex, capex)
print(f"Profit: ${indicators['profit']:,.0f}")
print(f"Profit Margin: {indicators['profit_margin']:.1%}")
print(f"ROI: {indicators['roi']:.1%}")
print(f"Payback Period: {indicators['payback_period']:.1f} years")

Production Forecasting

import pandas as pd
from worldenergydata.modules.well_production_dashboard import WellMetrics

# Historical production data
historical = pd.Series([1000, 950, 900, 860, 820, 785, 750, 720, 690, 665])

# Forecast 12 months
forecast = WellMetrics.forecast_production(historical, periods=12)

print("Production Forecast:")
print(forecast[['forecast', 'lower_bound', 'upper_bound']].head())

# forecast columns:
# - forecast: predicted production
# - lower_bound: 80% confidence lower
# - upper_bound: 120% confidence upper

Field Aggregation

from worldenergydata.modules.well_production_dashboard import FieldAggregator
import pandas as pd

# Load well data
well_data = pd.DataFrame({
    'date': ['2024-01', '2024-01', '2024-02', '2024-02'],
    'well_id': ['W1', 'W2', 'W1', 'W2'],
    'oil_production': [1000, 1200, 950, 1150],
    'gas_production': [500, 600, 480, 580],
    'water_production': [200, 250, 220, 270]
})

# Aggregate to field level
field_data = FieldAggregator.aggregate_field_data(well_data, 'ANCHOR')
print(field_data)
# Shows: date, oil_production, gas_production, water_production, well_count, field

# Rollup with statistics
rollup = FieldAggregator.rollup_field_data(well_data, 'ANCHOR')
print(rollup.columns)
# Includes: sum, mean, std for each production type

# Compare two fields
field1 = FieldAggregator.rollup_field_data(well_data_1, 'ANCHOR')
field2 = FieldAggregator.rollup_field_data(well_data_2, 'JULIA')

comparison = FieldAggregator.compare_fields(field1, field2)
print(f"Performance Ratio: {comparison['performance_ratio']:.2f}")
print(f"Trend Comparison: {comparison['trend_comparison']:.2f}")

REST API Integration

from worldenergydata.modules.well_production_dashboard import DashboardAPI

# Initialize API with dashboard
api = DashboardAPI(dashboard)

# Run Flask server
api.run(host='0.0.0.0', port=5000, debug=False)

# Available endpoints:
# GET /​api/​health         - Health check
# GET /​api/​wells          - List all wells
# GET /​api/​wells/<id>     - Get specific well data
# GET /​api/​dashboard/​data - Get complete dashboard data

CLI Usage

from worldenergydata.modules.well_production_dashboard import DashboardCLI

# Initialize CLI
cli = DashboardCLI()

# Run with config file
cli.run(config_path='config/​dashboard.yaml')

# Or configure programmatically
cli.configure({
    'title': 'Production Dashboard',
    'enable_verification': True,
    'cache_ttl': 300
})

# Export dashboard
result = cli.export(
    format='pdf',
    output_path='reports/​dashboard_export.pdf'
)
print(f"Export saved: {result}")

# Get export options
options = cli.get_export_parameters()
print(options)
# format: ['pdf', 'excel', 'json', 'all']
# include_verification: bool
# include_charts: bool
# include_raw_data: bool

Dashboard Export

from worldenergydata.modules.well_production_dashboard import (
    WellProductionDashboard,
    WellDashboardConfig
)
from worldenergydata.modules.well_production_dashboard.export_manager import (
    WellDashboardExportManager,
    ExportConfiguration
)

# Configure dashboard
dashboard = WellProductionDashboard(WellDashboardConfig(
    title="Production Analysis",
    export_formats=['pdf', 'excel']
))

# Load data
dashboard.load_well_data(well_ids=['API_12345'])

# Configure export
export_config = ExportConfiguration(
    formats=['pdf', 'excel', 'json'],
    include_verification=True,
    include_charts=True,
    include_raw_data=True,
    include_field_aggregation=True
)

# Export dashboard
results = dashboard.export_dashboard('reports/​analysis', export_config)

for result in results:
    print(f"Exported: {result.format} -> {result.path}")
    print(f"  Success: {result.success}")
    print(f"  File size: {result.file_size} bytes")

Verification Integration

# Dashboard with verification enabled
config = WellDashboardConfig(
    title="Verified Dashboard",
    enable_verification=True,
    quality_threshold=0.8  # 80% quality minimum
)

dashboard = WellProductionDashboard(config)

# Load data - verification runs automatically
dashboard.load_well_data(well_ids=['API_12345'])

# Check verification results
if dashboard.verification_enabled:
    results = dashboard.verification_results
    for well_id, result in results.items():
        print(f"{well_id}: Quality Score = {result.quality_score:.2%}")
        if result.quality_score < 0.8:
            print(f"  Warning: Below quality threshold!")

Caching and Performance

# Dashboard with caching
config = WellDashboardConfig(
    title="High-Performance Dashboard",
    cache_ttl=600,  # 10 minute cache
    enable_verification=True
)

dashboard = WellProductionDashboard(config)

# Monitor cache performance
print(f"Cache hits: {dashboard.cache_hits}")
print(f"Total requests: {dashboard.total_requests}")
print(f"Hit rate: {dashboard.cache_hits/​dashboard.total_requests:.1%}")

# Clear cache if needed
dashboard.cache_manager.clear()

Command Line Interface

# Run dashboard server
python -m worldenergydata.modules.well_production_dashboard.cli run --config config/​dashboard.yaml

# Export dashboard
python -m worldenergydata.modules.well_production_dashboard.cli export --format pdf --output reports/​export.pdf

# List available options
python -m worldenergydata.modules.well_production_dashboard.cli --help

# Verbose mode for debugging
python -m worldenergydata.modules.well_production_dashboard.cli -v run --config config/​dashboard.yaml

Key Classes

ClassPurpose
WellProductionDashboardMain dashboard controller
WellDashboardConfigDashboard configuration
WellMetricsFinancial and production metrics
FieldAggregatorField-level aggregation
DashboardAPIFlask REST API
DashboardCLICommand-line interface
WellDashboardExportManagerExport to PDF/​Excel/​JSON
QueryOptimizerBSEE data loading optimization
DashboardCacheManagerCaching for performance

REST API Endpoints

EndpointMethodDescription
/​api/​healthGETHealth check
/​api/​wellsGETList all wells
/​api/​wells/<well_id>GETGet well data
/​api/​dashboard/​dataGETFull dashboard data

Export Formats

FormatContents
PDFCharts, tables, verification metadata
ExcelRaw data, calculations, summaries
JSONStructured data for integration

Configuration Options

OptionTypeDefaultDescription
titlestring"Well Production Dashboard"Dashboard title
enable_verificationboolTrueEnable data verification
enable_real_timeboolFalseReal-time updates
cache_ttlint300Cache lifetime (seconds)
quality_thresholdfloat0.8Minimum quality score
websocket_portint8765WebSocket port
api_portint5000REST API port
auth_enabledboolTrueEnable authentication
export_formatslist['pdf', 'excel']Available exports

Best Practices

  1. Enable verification - Always validate data quality before analysis
  2. Use caching - Set appropriate TTL for performance
  3. Configure exports - Include verification metadata in reports
  4. Monitor performance - Track cache hit rates
  5. Use YAML configs - Version control dashboard configurations

Related Skills

References

  • Flask REST API Documentation
  • Plotly Interactive Charts
  • BSEE Data Standards

More skills from mattnigh

spring-framework-patterns logo
mattnigh/skills_collection

spring-framework-patterns

Comprehensive Spring Framework and Spring Boot best practices including dependency injection patterns, bean lifecycle and scopes, REST API development, Spring Data JPA, service layer design, Spring Security, testing strategies, caching, AOP, async processing, error handling, and common anti-patte...

24 0
View

TypeScript厳格モードによる型安全性設計を専門とするスキル。 📖 参照書籍: - 『Effective TypeScript』(Dan Vanderkam): 型設計 📚 リソース参照: - `resources/Level1_basics.md`: レベル1の基礎ガイド - `resources/Level2_intermediate.md`: レベル2の実務ガイド - `resources/Level3_advanced.md`: レベル3の応用ガイド - `resources/Level4_expert.md`: レベル4の専門ガイド - `resources/di...

24 0
View
deploying-cloud-k8s logo
mattnigh/skills_collection

deploying-cloud-k8s

Deploys applications to cloud Kubernetes (AKS/GKE/DOKS) with CI/CD pipelines. Use when deploying to production, setting up GitHub Actions, troubleshooting deployments. Covers build-time vs runtime vars, architecture matching, and battle-tested debugging.

24 0
View
moai-alfred-agent-guide logo
mattnigh/skills_collection

moai-alfred-agent-guide

19-agent team structure, decision trees for agent selection, Haiku vs Sonnet model selection, and agent collaboration principles. Use when deciding which sub-agent to invoke, understanding team responsibilities, or learning multi-agent orchestration.

24 0
View
mermaid-diagram-generator logo
mattnigh/skills_collection

mermaid-diagram-generator

Converts architecture descriptions, module specs, or workflow docs into Mermaid diagrams. Use when visualizing brick module relationships, workflows (DDD, investigation), or system architecture. Supports: flowcharts, sequence diagrams, class diagrams, state machines, entity relationship diagrams,...

24 0
View
pre-flight-check logo
mattnigh/skills_collection

pre-flight-check

INVOKE FIRST before any code work. Validates git workflow (branch, issue, worklog) and checks approach. Use at START of every task and END before completing. Prevents skipped steps.

24 0
View
browser-dev-tools logo
mattnigh/skills_collection

browser-dev-tools

This skill should be used when working with browser-rendered artifacts (i.e. Bun, React/React Native) to proactively validate that development work on localhost is being built appropriately and to support debugging browser-rendered content. Use this skill after making frontend changes to verify t...

24 0
View
lead-dev logo
mattnigh/skills_collection

lead-dev

Lead Développeur - Coordination technique opérationnelle, code review, mentoring et livraison. Pair de web-dev-process au niveau OPÉRATIONS.

24 0
View
worker-monitor logo
mattnigh/skills_collection

worker-monitor

Monitor Docker workers, RQ queue health, and auto-scale workers (max 4). Use when: checking job progress, monitoring queue depth, scaling workers up/down, diagnosing slow processing, or waiting for jobs to complete. Referenced by data-quality skill during reprocessing.

24 0
View
quality-advisor logo
mattnigh/skills_collection

quality-advisor

Proactive quality guidance system that monitors artifact creation and provides real-time feedback on documentation quality

24 0
View
bump-version logo
mattnigh/skills_collection

bump-version

This skill should be used when the user wants to bump the version number in the workspace. It updates versions across all pyproject.toml files (root, tde, and tda packages) and the CHANGELOG.md to keep them synchronized.

24 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View