---
name: cer-pipeline-incidents-ingestion
description: "How to get CER Pipeline Incident Data data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load CER pipeline incidents into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/cer-pipeline-incidents
Provider: https://open.canada.ca/data/en/dataset/7dffedc4-23fa-440c-a36d-adf5a6cc09f1
Checked against the provider's documentation: 2026-11-01

## Access
- No account or key. The comprehensive incident CSV and its data dictionary are public downloads.

## Request
```bash
curl -O 'https://www.cer-rec.gc.ca/open/incident/pipeline-incidents-comprehensive-data.csv'
```

## Format
Wide CSV with incident identifiers, classifications, event dates, operator and pipeline details, coordinates, release and substance fields, cause categories, status, impacts, equipment and investigation fields.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""CER comprehensive pipeline incidents -> pandas -> Parquet. No key."""
import io
import requests
import pandas as pd

URL = "https://www.cer-rec.gc.ca/open/incident/pipeline-incidents-comprehensive-data.csv"
r = requests.get(URL, timeout=120)
r.raise_for_status()
df = pd.read_csv(io.BytesIO(r.content), encoding="cp1252", low_memory=False)
df["Reported Date"] = pd.to_datetime(df["Reported Date"], format="%m/%d/%Y", errors="coerce", utc=True)
df.to_parquet("cer_pipeline_incidents.parquet", index=False)
print(len(df), "incidents", int(df["Year"].min()), "to",
      int(df["Year"].max()), len(df.columns), "columns")
```
Run by us on 2026-11-01 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 2039 incidents 2008 to 2026 102 columns

## Limits
- Rate limit: Not stated.
- The provider says the dataset is updated quarterly.
- No download-size cap is stated.

## Quirks
- The CSV is Windows-1252 rather than UTF-8; use cp1252 decoding.
- Occurrence, discovery, report and closure timestamps have different meanings and some values are blank.
- The file is wide and mixes numeric values with text such as Not Applicable; retain nullable columns and consult the dictionary.

## Terms and attribution
- Open Government Licence – Canada permits lawful reuse, including commercial use.
- Acknowledge the source and, where possible, link to the licence.
- Terms page: https://open.canada.ca/en/open-government-licence-canada

## Sources
- https://open.canada.ca/data/en/dataset/7dffedc4-23fa-440c-a36d-adf5a6cc09f1: "The data ranges from 2008 to current; it is updated quarterly."
- https://www.cer-rec.gc.ca/open/incident/pipeline-incidents-comprehensive-data.csv: ""Incident Number","Incident Types","Reported Date""
- https://www.cer-rec.gc.ca/open/incident/pipeline-incidents-data-dictionary.csv: "Column,Data Value or Column Name Indication,Description of Data Value or Column Name"
- https://open.canada.ca/en/open-government-licence-canada: "Contains information licensed under the Open Government Licence – Canada."

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
