| --- |
| license: cc-by-nc-4.0 |
| task_categories: |
| - tabular-classification |
| - tabular-regression |
| - time-series-forecasting |
| language: |
| - en |
| tags: |
| - synthetic |
| - oil-and-gas |
| - midstream |
| - pipeline |
| - corrosion |
| - cathodic-protection |
| - nace-sp0169 |
| - rbi |
| - integrity-management |
| - xpertsystems |
| pretty_name: "OIL-027 — Synthetic Pipeline Corrosion Dataset (Sample)" |
| size_categories: |
| - 100K<n<1M |
| --- |
| |
| # OIL-027 — Synthetic Pipeline Corrosion Dataset (Sample) |
|
|
| **SKU:** `OIL027-SAMPLE` · **Vertical:** Oil & Gas / Midstream Pipeline Integrity |
| **License:** CC-BY-NC-4.0 (sample) · **Schema version:** `oil027.v1` |
| **Sample version:** `1.0.0` · **Default seed:** `42` |
|
|
| A free, schema-identical preview of XpertSystems.ai's enterprise pipeline |
| corrosion dataset for **corrosion rate prediction, internal/external |
| corrosion classification, cathodic protection optimization, pitting |
| analysis, and integrity grade ML**. The sample covers **1,300 |
| pipelines** across **4 environments** (Onshore / Offshore / |
| Subsea / Arctic) and **3 API 5L material grades**, with |
| **245,045 rows** linked across **5 tables** spanning **180 days of |
| daily corrosion progression**. |
|
|
| **OIL-027 specializes in the corrosion-physics layer** of pipeline integrity |
| management — implementing **NACE SP0169 cathodic protection threshold |
| gating** (the -0.85V criterion) and **de Waard-Milliams water-cut corrosion |
| coupling** in a 5-table relational schema joinable on `pipeline_id`. |
|
|
| --- |
|
|
| ## What's in the box |
|
|
| | File | Rows | Cols | Description | |
| |---|---:|---:|---| |
| | `pipeline_assets.csv` | 1,300 | 9 | Pipeline catalog: 3 API 5L material grades (X52, X65, X70) × 4 environments × diameter + wall thickness + age + CO2 + H2S + water cut | |
| | `internal_corrosion.csv` | 234,000 | 6 | **180-day daily corrosion progression**: rate (de Waard-Milliams water-cut coupling), accumulated wall loss, temperature, pressure | |
| | `external_corrosion.csv` | 1,300 | 5 | **NACE SP0169 cathodic protection**: soil resistivity per NACE TM0497, CP voltage, coating health, 3-class risk (LOW/MEDIUM/HIGH) physics-gated | |
| | `pitting_profiles.csv` | 7,145 | 5 | Per-pipeline pit catalog: depth + width + growth rate (avg 5.5 pits per pipeline per ASTM G46 pit density) | |
| | `integrity_labels.csv` | 1,300 | 4 | Per-pipeline 4-class integrity grade (LOW/MEDIUM/HIGH/CRITICAL) + risk score + remaining life days | |
|
|
| Total: **245,045 rows** across 5 CSVs, ~13.2 MB on disk. |
|
|
| --- |
|
|
| ## Calibration: industry-anchored, honestly reported |
|
|
| Validation uses a **10-metric scorecard** with targets sourced exclusively to |
| **named industry standards**: **NACE SP0169** (External Corrosion Control of |
| Buried Pipelines — Cathodic Protection -0.85V Criterion), **NACE MR0175 / |
| ISO 15156** (Sulfide Stress Cracking in H2S Service), **NACE TM0497** (Soil |
| Resistivity Measurement), **de Waard & Milliams (1991)** CO2 Corrosion |
| Prediction Model, **API 510** (Pressure Vessel Inspection Code), **API 570** |
| (Piping Inspection Code), **API 580/581** (Risk-Based Inspection), **API 5L** |
| (Line Pipe), **ASME B31.4** (Liquid Hydrocarbon Pipelines), **ASME B31.8** |
| (Gas Transmission Pipelines), **PHMSA 49 CFR 195** (Hazardous Liquid Pipeline |
| Safety), **NACE SP0502** (Pipeline External Corrosion Direct Assessment), |
| **API 1163** (In-Line Inspection Systems), **ASTM G1** (Cleaning Corrosion |
| Specimens), **ASTM G46** (Pit Density Standard Charts). |
|
|
| **Sample run** (seed `42`, n_pipelines=1300, days=180): |
| |
| | # | Metric | Observed | Target | Tolerance | Status | Source | |
| |---|---|---:|---:|---:|---|---| |
| | 1 | avg diameter in | 25.1554 | 25.0 | ±6.0 | ✓ PASS | API 5L Line Pipe specification + PHMSA pipeline inventory — mean diameter for mixed transmission portfolio (8-42 inch range; 25 inch median for crude/gas mainline operations) | |
| | 2 | avg wall thickness mm | 16.5198 | 16.5 | ±4.0 | ✓ PASS | API 5L + ASME B31.4/B31.8 design wall thickness — typical wall thickness for transmission pipelines (8-25 mm range; 16-17 mm mid-portfolio for 600-1500 psi MAOP) | |
| | 3 | avg corrosion rate mpy | 6.3514 | 6.0 | ±3.0 | ✓ PASS | API 570 (Piping Inspection Code) + NACE TM0274 — mean corrosion rate for mixed pipeline portfolio with moderate water cut (2-10 mpy normal; >15 mpy triggers RBI high-risk classification per API 581) | |
| | 4 | avg cp voltage v | -0.9440 | -0.95 | ±0.2 | ✓ PASS | NACE SP0169 (External Corrosion Control) — typical cathodic protection potential for buried pipelines (-0.85V vs Cu/CuSO4 minimum protection criterion; -1.0 to -1.2V for fully-protected pipelines) | |
| | 5 | avg soil resistivity ohm cm | 2567.9367 | 2500.0 | ±1000.0 | ✓ PASS | NACE TM0497 (Soil Resistivity Measurement) + NACE SP0169 — typical soil resistivity for mixed onshore/offshore/subsea/arctic portfolio (100-5000 ohm-cm range; <1000 ohm-cm is highly corrosive per NACE classification) | |
| | 6 | avg coating health pct | 79.8284 | 80.0 | ±8.0 | ✓ PASS | API 1163 (In-Line Inspection Systems) + NACE SP0502 (External Corrosion Direct Assessment) — typical coating health for mid-life transmission pipelines (70-90% typical; FBE coating degrades 2-4% per decade) | |
| | 7 | water cut corrosion pearson correlation | 0.3275 | 0.3 | ±0.12 | ✓ PASS | de Waard & Milliams (1991) CO2 corrosion prediction model — expected positive correlation between water cut and corrosion rate (generator formula: rate = base × temp_factor × (1 + water_cut/100); within-pipeline coupling deterministic, cross-pipeline base-rate variation dilutes global correlation). Validates water-conditioned corrosion physics. | |
| | 8 | cp voltage external risk pearson correlation | 0.6422 | 0.55 | ±0.15 | ✓ PASS | NACE SP0169 -0.85V cathodic protection criterion — expected strong positive correlation between CP voltage (less negative) and external corrosion risk numeric (LOW=0/MEDIUM=1/HIGH=2). Validates generator's physics-gated risk classification per NACE. | |
| | 9 | soil resistivity external risk pearson correlation | -0.3809 | -0.3 | ±0.15 | ✓ PASS | NACE SP0169 + NACE TM0497 soil corrosivity classification — expected inverse correlation between soil resistivity and external corrosion risk numeric (low resistivity soil drives high corrosion). Validates generator's NACE-anchored gating. | |
| | 10 | material grade diversity entropy | 0.9998 | 0.96 | ±0.04 | ✓ PASS | API 5L Line Pipe material grade taxonomy (X52, X65, X70) — 3-class diversity benchmark for mixed transmission portfolio per API 5L specification + PHMSA pipeline inventory, normalized Shannon entropy | |
| |
| **Overall: 100.0/100 — Grade A+** |
| (10 PASS · 0 MARGINAL · 0 FAIL of 10 metrics) |
| |
| --- |
| |
| ## Schema highlights |
| |
| **`pipeline_assets.csv`** — 3 × 4 portfolio matrix per **API 5L + PHMSA**: |
| |
| | Material Grade | Use Case | Specified Min Yield Strength (psi) | |
| |---|---|---:| |
| | API 5L X52 | Older transmission / gathering | 52,000 | |
| | API 5L X65 | Modern transmission mainline | 65,000 | |
| | API 5L X70 | High-pressure transmission | 70,000 | |
| |
| 4 environment classes per **NACE SP0169 classification**: |
| |
| | Environment | Corrosion Drivers | |
| |---|---| |
| | Onshore | Soil chemistry, stray current, AC interference | |
| | Offshore | Splash zone, marine atmosphere, oxygen ingress | |
| | Subsea | Cathodic protection mandatory, biofouling | |
| | Arctic | Permafrost cycling, ice gouging, low temperature stress | |
| |
| **`internal_corrosion.csv`** — **de Waard-Milliams (1991) water-cut coupling**: |
| |
| > corrosion_rate_mpy = base_rate × temp_factor × (1 + water_cut/100) |
| > wall_loss_pct = corrosion_rate × day/365 × 0.1 (deterministic accumulation) |
| |
| The sample's water cut ↔ corrosion rate Pearson correlation is r ≈ **+0.33** |
| — **moderate positive coupling validates de Waard-Milliams water-cut |
| physics** (within-pipeline coupling is deterministic; cross-pipeline base- |
| rate variability dilutes the global correlation). |
| |
| **`external_corrosion.csv`** — **NACE SP0169 -0.85V cathodic protection |
| threshold gating**: |
| |
| > external_corrosion_risk = HIGH if (soil_resistivity < 800 OR cp_voltage > -0.85) |
| > external_corrosion_risk = MEDIUM if soil_resistivity < 1500 |
| > external_corrosion_risk = LOW otherwise |
|
|
| The sample's CP voltage ↔ external risk Pearson correlation is r ≈ **+0.64** |
| — **strong positive coupling validates NACE SP0169 -0.85V cathodic protection |
| criterion physics**. |
|
|
| Risk class distribution: **49% LOW / 10% MEDIUM / 41% HIGH** — meaningful |
| 3-class diversity for ML class-balancing (better than degenerate single-class |
| outcomes). |
|
|
| **`pitting_profiles.csv`** — per-pipeline pit catalog per **ASTM G46 |
| pit density standard**: |
| |
| > n_pits_per_pipeline = U(2, 9) |
| > pit_depth_mm = U(0.5, 12) |
| > pit_width_mm = U(1, 25) |
| > growth_rate_mm_year = U(0.05, 1.5) |
| |
| --- |
| |
| ## Suggested use cases |
| |
| 1. **Internal corrosion rate regression** — predict `corrosion_rate_mpy` |
| from water cut + environment features per de Waard-Milliams (1991). |
| **Strong physics signal** within-pipeline; moderate global. |
| 2. **External corrosion risk classification** — 3-class classifier on |
| `external_corrosion_risk` from soil resistivity + CP voltage + coating |
| features per NACE SP0169. **Strong physics**: CP↔risk r ≈ +0.64. |
| 3. **Wall loss time-series forecasting** — predict accumulated `wall_loss_pct` |
| over 180-day horizon per API 510 remaining life calculations. |
| 4. **Pit growth rate regression** — predict `growth_rate_mm_year` from |
| pit depth + width features per ASTM G46. |
| 5. **Cathodic protection optimization** — predict CP voltage thresholds |
| from soil resistivity + coating health features per NACE SP0169. |
| 6. **Integrity grade classification** — 4-class classifier on |
| `integrity_grade` (LOW/MEDIUM/HIGH/CRITICAL). **Note**: integrity labels |
| in this sample are not feature-coupled (see Honest Disclosure §1). |
| 7. **Multi-table relational ML** — entity-resolution learning across |
| the 5 tables via `pipeline_id`. Join asset metadata with corrosion |
| time-series for feature-rich ML pipelines. |
|
|
| --- |
|
|
| ## Loading |
|
|
| ```python |
| from datasets import load_dataset |
| ds = load_dataset("xpertsystems/oil027-sample", data_files="internal_corrosion.csv") |
| print(ds["train"][0]) |
| ``` |
|
|
| Or with pandas: |
|
|
| ```python |
| import pandas as pd |
| assets = pd.read_csv("hf://datasets/xpertsystems/oil027-sample/pipeline_assets.csv") |
| internal = pd.read_csv("hf://datasets/xpertsystems/oil027-sample/internal_corrosion.csv") |
| external = pd.read_csv("hf://datasets/xpertsystems/oil027-sample/external_corrosion.csv") |
| pits = pd.read_csv("hf://datasets/xpertsystems/oil027-sample/pitting_profiles.csv") |
| labels = pd.read_csv("hf://datasets/xpertsystems/oil027-sample/integrity_labels.csv") |
| |
| # Multi-table corrosion feature engineering: |
| corr_avg = internal.groupby("pipeline_id")["corrosion_rate_mpy"].mean().reset_index() |
| joined = (assets |
| .merge(corr_avg, on="pipeline_id") |
| .merge(external, on="pipeline_id") |
| .merge(labels, on="pipeline_id")) |
| # Now you have water_cut + corrosion_rate + CP voltage + integrity_grade in one frame |
| ``` |
|
|
| --- |
|
|
| ## Reproducibility |
|
|
| All generation is deterministic via the integer `seed` parameter (driving |
| `np.random.seed` and `random.seed`). A seed sweep across `[42, 7, 123, 2024, |
| 99, 1]` confirms Grade A+ on every seed in this sample. |
|
|
| --- |
|
|
| ## Honest disclosure of sample-scale limitations |
|
|
| This is a **sample** product calibrated for pipeline corrosion ML research, |
| not for live operational decisions. **Several important limitations should |
| be understood before use:** |
|
|
| 1. **Integrity grade is NOT feature-coupled.** The 4-class `integrity_grade` |
| label is sampled from `np.random.uniform(0, 1)` with threshold gates, |
| without any coupling to corrosion_rate, wall_loss, pitting depth, or |
| external_corrosion_risk. **The sample's integrity_grade↔corrosion_rate |
| correlation is r ≈ +0.04 — essentially noise.** For integrity ML, train |
| on labels you derive yourself from the physics features (e.g., |
| `wall_loss_pct > 30% → CRITICAL`) rather than the provided |
| integrity_grade. The full product (v1.1) will implement feature-coupled |
| integrity grading per API 580 RBI methodology. |
| |
| 2. **Remaining life is NOT physics-computed.** The `remaining_life_days` |
| field is sampled from `np.random.uniform(180, 7200)` and is **not |
| computed from corrosion rate or wall loss per API 510 RBI**. Real |
| remaining life = (current_wall_thickness - retirement_limit) / |
| corrosion_rate. For RUL ML, **derive remaining life from internal_ |
| corrosion features** rather than using the provided field. |
| |
| 3. **CO2 and H2S do not drive corrosion rate.** The pipeline_assets table |
| includes `co2_pct` and `h2s_ppm` fields, but **neither is used in the |
| corrosion rate calculation**. Real CO2 corrosion follows de Waard 1991 |
| `rate ∝ partial_pressure_CO2^0.67 × temp^1.41` and real H2S service |
| triggers NACE MR0175 / ISO 15156 sulfide stress cracking thresholds. |
| **CO2 ↔ corrosion rate r ≈ +0.08 in sample (not de Waard physics)**. |
| Full product v1.1 will implement de Waard 1991 CO2 corrosion model and |
| MR0175 H2S service classifications. |
|
|
| 4. **Pitting growth rate is NOT coupled to environment.** Pit growth rates |
| are uniformly sampled `U(0.05, 1.5) mm/year` without coupling to |
| internal corrosion rate, environment class, or external_corrosion_risk. |
| Real pit growth follows ASTM G46 + environment-specific kinetics. For |
| pit-growth ML, **filter to environment subsets and treat growth rate |
| as residual variance** rather than predictable from physics. |
|
|
| 5. **Temperature varies only by noise factor.** The `temperature_f` field |
| in internal_corrosion is sampled per-row `U(70, 180)` without |
| conditioning on pipeline service or seasonality. Real pipeline temperature |
| tracks ambient + fluid-source temperature with strong seasonal cycles. |
| **For temperature-conditioned corrosion ML, use temperature as a |
| noisy random feature**, not a true operational signal. |
| |
| 6. **Pressure is independent of MAOP.** The `pressure_psi` field is sampled |
| `U(500, 2200)` without coupling to material grade or design MAOP. Real |
| operating pressures are typically 60-80% of MAOP. For pressure-conditioned |
| corrosion ML, **filter to realistic MAOP-conditioned operating ranges**. |
|
|
| 7. **Coating health is not age-coupled.** The `coating_health_pct` field |
| is sampled `U(60, 100)` without conditioning on pipeline age. Real FBE |
| coating health degrades 2-4% per decade per NACE SP0502 direct |
| assessment. **For coating-degradation ML, the sample is uniform-prior |
| over coating quality** rather than age-conditioned. |
|
|
| 8. **Pipeline age is independent of all features.** The `pipeline_age_years` |
| field is sampled `U(1, 40)` without coupling to material grade |
| (older pipelines were X42/X52, modern are X65/X70 per API 5L history). |
| For age-conditioned ML, **expect age to be uncoupled from material |
| choice** at sample scale. |
|
|
| --- |
|
|
| ## Where physics IS strong (use these for ML) |
|
|
| Three coupling signals in this sample are **physically valid and ML-useful**: |
|
|
| | Coupling | Pearson r | Physics | Use For | |
| |---|---:|---|---| |
| | **Water cut → corrosion rate** | +0.33 | de Waard-Milliams (1991) water-cut formula | Within-pipeline corrosion ML | |
| | **CP voltage → external risk** | +0.64 | NACE SP0169 -0.85V criterion | External corrosion risk classification | |
| | **Soil resistivity → external risk** | -0.38 | NACE TM0497 + SP0169 soil corrosivity | External corrosion risk classification | |
| | **Wall loss accumulation** | deterministic | Time-integrated corrosion rate | RUL forecasting | |
|
|
| --- |
|
|
| ## Cross-references to other XpertSystems OIL SKUs |
|
|
| This SKU is the **fourth midstream SKU** in the catalog — specializing in |
| **corrosion physics** complementing the leak detection trilogy: |
|
|
| | SKU | Layer | Focus | |
| |---|---|---| |
| | OIL-015 | Midstream | Pipeline flow assurance (wax / hydrate / asphaltene threshold gating) | |
| | OIL-024 | Midstream | Full pipeline hydraulics + SCADA + 15 transient events | |
| | OIL-025 | Midstream | Leak detection + rupture prediction + acoustic + CPM | |
| | **OIL-027** | **Midstream** | **Corrosion progression + cathodic protection + pitting + integrity** *(this SKU)* | |
|
|
| **OIL-027 vs OIL-025**: OIL-025 simulates **event-centric leak/rupture |
| detection** with acoustic + pressure wave physics. **OIL-027 simulates |
| continuous corrosion progression** (180-day time series) driving the |
| underlying integrity degradation. Use OIL-025 for **leak detection ML**, |
| OIL-027 for **corrosion progression + cathodic protection ML**. |
|
|
| **OIL-027 vs OIL-022**: OIL-022 simulates **refinery vessel/piping |
| corrosion** (RBI + inspection findings). **OIL-027 simulates pipeline |
| external + internal corrosion** with cathodic protection physics specific |
| to buried/subsea pipelines. Use OIL-022 for **vessel inspection planning**, |
| OIL-027 for **pipeline corrosion ML**. |
|
|
| --- |
|
|
| ## Full product |
|
|
| The **full OIL-027 dataset** ships at **15,000 pipelines × 730-day daily |
| corrosion progression** (prod mode) producing tens of millions of rows |
| with **feature-coupled integrity grades per API 580 RBI methodology**, |
| **physics-computed remaining life per API 510**, **de Waard 1991 CO2 |
| corrosion model with partial-pressure conditioning**, **NACE MR0175 / ISO |
| 15156 H2S service classifications**, **environment-conditioned pit growth |
| kinetics per ASTM G46**, **age-coupled coating degradation per NACE SP0502**, |
| and **MAOP-conditioned operating pressures** — licensed commercially. |
| Contact XpertSystems.ai for licensing terms. |
|
|
| 📧 **pradeep@xpertsystems.ai** |
| 🌐 **https://xpertsystems.ai** |
|
|
| --- |
|
|
| ## Citation |
|
|
| ```bibtex |
| @dataset{xpertsystems_oil027_sample_2026, |
| title = {OIL-027: Synthetic Pipeline Corrosion Dataset (Sample)}, |
| author = {XpertSystems.ai}, |
| year = {2026}, |
| url = {https://huggingface.co/datasets/xpertsystems/oil027-sample} |
| } |
| ``` |
|
|
| ## Generation details |
|
|
| - Sample version : 1.0.0 |
| - Random seed : 42 |
| - Generated : 2026-05-23 00:15:44 UTC |
| - Pipelines : 1300 |
| - Simulation days : 180 (daily corrosion progression per pipeline) |
| - Material grades : 3 (API 5L X52, X65, X70) |
| - Environments : 4 (Onshore, Offshore, Subsea, Arctic) |
| - Risk classes : 3 (LOW, MEDIUM, HIGH) per NACE SP0169 |
| - Integrity grades : 4 (LOW, MEDIUM, HIGH, CRITICAL) — sample-scale random |
| - Calibration basis : NACE SP0169, NACE MR0175 / ISO 15156, NACE TM0497, |
| de Waard & Milliams (1991), API 510, API 570, |
| API 580/581, API 5L, ASME B31.4/B31.8, PHMSA |
| 49 CFR 195, NACE SP0502, API 1163, ASTM G1, ASTM G46 |
| - Overall validation: 100.0/100 — Grade A+ |
| |