KANON Logo

Report No.: GF-2025-KANON  |  Data Period: Jan–Jun 2025  |  Version: 1.0

Gas Flaring Analytics

A truth-validated analysis of flaring behavior across three stacks (Jan-Jun 2025), with detection quality and defensibility on the record.

Prepared by: Hadi Farahani, PhD · farahani@kanondata.com

Contents

1 · Executive Summary

Q1 Where is our gas going - and should we worry?

Total flared volume

9.04

million sm3

Total CO2 emitted

18.22

million kg

Anomaly hours

611

across 13,032 hours

Plant event recall

75%

3/4 events detected

THE PROBLEM

THE SOLUTION

THE RESULT

Key Definitions & Abbreviations
IQR (Interquartile Range): A statistical measure of spread used for the Tukey fence anomaly detector.
MAD (Median Absolute Deviation): A robust statistical measure used for the z-score anomaly detector.
SCADA: Supervisory Control and Data Acquisition (industrial control systems).
TP/FP/FN/TN: True Positive / False Positive / False Negative / True Negative (confusion matrix terms).

2 · Trend

2026-11-10T09:34:18.637020 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/
Hourly flaring (amber) with 7-day rolling median (teal) and IQR band. Red dots mark anomaly hours.

Q2 Is flaring trending up or down - or is it just noisy?

3 · Hotspots

2026-11-10T09:34:19.409142 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/
Mean flaring intensity per stack per month. Darker = higher flare-to-throughput ratio.

Q3 Which stacks and which months carry the risk?

4 · Attribution: Is FL-A Bad, or Just Big?

2026-11-10T09:34:19.871411 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/
Pareto of total flared volume per stack. Cumulative line crosses the 80% reference at the top contributor.
2026-11-10T09:34:20.356971 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/
Waterfall decomposition: how much of the top-two gap is explained by volume (throughput) vs intensity (efficiency).

THE REALITY CHECK

THE STRATEGIC TAKEAWAY

Q4 Who contributes the vital 20% - and why?

5 · Detection Quality: The Machine That Knows When to Worry

Event recall

75%

3/4 events

Hour recall

28.9%

319 of 1104 event hours

Hour accuracy

91.7%

11,955 of 13,032 hours

Baseline MAE

5.75

sm3/h (non-event hours)

Hour-level confusion matrix (13,032 hours)

Predicted anomaly Predicted normal Total true
True event hour 319 (TP) 785 (FN) 1,104
True normal hour 292 (FP) 11,636 (TN) 11,928

THE BLIND SPOT

THE BUSINESS CASE (Cost of Failure)

Q5 Does the algorithm find real events - or just noise?

Analytical Framework — Data, Methods & Tools

One-page technical reference. Every number in this report traces back to one of the seven layers below.

#LayerWhat we usedWhy it mattersReproducibility
1Data SourceTruth-grounded synthetic flaring dataset: 3 stacks (FL-A/B/C) × 13,032 hourly records, Jan–Jun 2025. Truth tables match fact rows 1:1.Ground truth enables objective evaluation of detection quality — not just description.Raw CSVs frozen in data/; SHA-256 in _audit table and Manifest below.
2Data ModelSQLite flaring.db: fact_hourly, dim_asset, truth_events, truth_routing, _audit. Indexed on (stack_id, timestamp_utc).Single source of truth across 9 scripts. Typed schema prevents silent drift between runs.DDL + load: 06_Analysis/build_db.py.
3MetricsFlaring Volume (sm³) · Flaring Intensity (flared / throughput) · Utilization Rate (recovered / capacity) · Emission Factor (kg CO₂ / sm³).
Total flared: 9.04 M sm³ · Total CO₂: 18.22 M kg
Four standard O&G KPIs, each answering one decision question. Comparable to World Bank / IEA benchmarks.Formulas hardcoded in 06_Analysis/analysis.py.
4Statistical MethodsIQR Tukey fence (k = 1.5) · Robust z-score on MAD (threshold 3.5, scale 0.6745) · Two-method union for detection · Confusion matrix · MAE / RMSE / MAPE.Handles right-skewed distributions without over-flagging; two detectors make conclusions robust to any single method's bias.Thresholds are named constants; reported in analysis_summary.json → methodology.
5Anomaly DetectionPer-stack IQR + MAD union. Detection variable: flaring_intensity. Flagged hours: 611 across 13,032 (4.7%).Per-stack baselines respect that each stack has its own operating envelope. Union = defense-in-depth.Per-row flags in analysis_table.csv: is_anomaly_iqr, is_anomaly_mad, is_anomaly_either.
6Uncertainty & ValidationTruth-based scoring at three levels: event (recall 75.0%), hour (accuracy 91.7%), volume (baseline MAE 5.75 sm³/h).Separates "does the detector find real events?" from "does the recording track truth?" — two distinct analytical questions.07_Evaluation/evaluation_metrics.json contains every score; evaluation_report.txt is human-readable.
7Software StackPython 3.14 · pandas · numpy · matplotlib (SVG + PNG) · SQLite 3 · Playwright (channel=chrome) for PDF · GitHub + Cloudflare for web.Full-stack, reproducible, Iran-geo-compatible (Playwright via Runflare mirror).requirements.txt; deploy path in 10_Publish/public/README.md.

Scope & Epistemic Status

  • Methodological demonstration, not a real-world claim. This analysis is on a truth-grounded synthetic dataset. Findings demonstrate the pipeline's capability — not any real facility's flaring behavior.
  • Synthetic data has known limits. No extreme weather, no sensor calibration drift, no unplanned regulatory events, idealized distributions, no human-reporting noise. Conclusions are bounded by these.
  • Migration path. The same pipeline runs unchanged on real hourly flaring data; only the truth_* tables would be replaced by externally validated benchmarks (continuous emission monitoring, satellite flaring estimates).

Reproducibility Manifest

Every number in this report can be regenerated from raw source data with one command chain. Verify integrity by comparing SHA-256 hashes below.

Source file integrity

Source fileRowsSHA-256 (truncated)
data\assets.csv328370d1c06f29b00…
data\hourly.csv13,032b1199baaa79ecd29…
data\truth\events.csv479be8859ba5befdb…
data\truth\routing_truth.csv13,032334b0ae90c140d11…

Derived artefact integrity

Derived fileSHA-256 (truncated)
06_Analysis/analysis_table.csv5676b755b632d189…
07_Evaluation/evaluation_metrics.jsond0fd7ead51e8e8f3…

Full re-run from scratch

py 06_Analysis/build_db.py --rebuild
py 06_Analysis/analysis.py
py 07_Evaluation/evaluation.py
py 09_Report/make_charts.py
py 09_Report/generate_analytical_framework.py
py 09_Report/generate_report.py

All scripts resolve their own paths via Path(__file__).resolve().parents[1], so the chain above works from any working directory.

7 · Scope & Limitations

Q7 What could make this conclusion wrong?

THE DIGITAL TWIN DEFENSE

Next steps (in priority order):
  1. Add a second detector on absolute flared volume (addresses L1).
  2. Introduce a 6-hour minimum run-length on alerts (addresses L2 and many FPs).
  3. Migrate to real hourly flaring data and revalidate against external benchmarks (addresses L4).

8 · Statement of Integrity & Conflict of Interest

Statement of Integrity. I, Hadi Farahani, PhD, certify that the analysis and metrics presented in this report are accurate to the best of my knowledge. The limitations and uncertainties have been explicitly disclosed in §7. The analytical pipeline, data, and outputs are available for full audit via the SHA-256 hashes below.

Cryptographic Proof of Authenticity

ArtefactSHA-256 Fingerprint
06_Analysis/analysis_table.csv5676b755b632d189...
07_Evaluation/evaluation_metrics.jsond0fd7ead51e8e8f3...

Source-file hashes and full re-run instructions are in §6 (Reproducibility Manifest).

Conflict of Interest
This project was conducted independently. No funding, data, or analysis was influenced by the equipment manufacturers, operators, or regulatory bodies mentioned in this report.

9 · References

About KANON

We help industrial organizations prove their measurement data is accurate, traceable, and audit-ready.

Contact KANON for Data Projects

farahani@kanondata.com · kanondata.com