The Railroad Commission of Texas (RRC) regulates oil and gas in the state that produces more oil than most countries. Everything it regulates, it records, and almost all of that record is public. You can download it right now, for free, without an account.
The catch is that the RRC publishes it the way a 1970s mainframe would hand it to
you, because in several cases that is literally what is happening. Roughly a
third of the datasets arrive in EBCDIC, IBM's pre-ASCII character encoding. Most
of the rest are fixed-width ASCII whose only documentation is a scanned COBOL
record layout in a PDF. A handful are }-delimited text. Some are dBase files or
ArcView shapefiles. Nothing has a header row worth trusting, and nothing tells
you how to join it to anything else.
This series is the missing manual. Read it in order and you will be able to open any RRC file, understand what a row means, and connect it to the other files.
The nine sections
The RRC's own download page organises its datasets into sections. Slightly paraphrased, they are:
- Drilling permits — applications to drill, and their approval status.
- Completions and well data — what was actually built downhole.
- Well status and testing — periodic tests on oil and gas wells.
- Production — how much came out, by month.
- Field data — the named geological fields wells are assigned to.
- Operators and regulatory — who is allowed to operate, and legal dockets.
- Severance tax — tax incentive certifications.
- Underground injection control — disposal and injection wells.
- Digital map data — shapefiles by county.
That ordering is bureaucratic, not conceptual. Here is the conceptual version.
The life of a well, and the file that records each step
Almost every important RRC dataset is a snapshot of one stage in a well's life.
Someone wants to drill. They file a Form W-1 permit application. It lands in the drilling permit files: a monthly master, a nightly daily file, and a separate extract for applications still pending approval. A permit tells you an operator's intent — a location, a target field, a proposed depth, a horizontal or vertical bore. It does not tell you that anything was drilled.
They drill and complete it. Now they file a completion report: Form W-2 for an oil well, Form G-1 for a gas well. That is where you learn the real total depth, the casing strings, the perforated intervals, the formations encountered, and the initial test rates. The completions extract carries all of it, as a parent record with a fan of child records.
The well enters the permanent record. Every wellbore ever drilled in Texas — about 1.2 million of them — lives in the Full Wellbore Database, a 247-byte fixed-width file with 28 different record types. This is the closest thing the RRC has to a master well table, and it is the file most worth learning.
It produces. Every month the operator files a production report. Those roll up into the Production Data Query (PDQ) dump: sixteen tables covering production by lease, by county and lease, by field, by district, by operator, plus disposition detail, going back to 1993.
It gets tested, inspected, and eventually plugged. Well status files carry the periodic W-10 (oil) and G-10 (gas) tests. Inspection and violation files carry enforcement. Plugging records live inside the wellbore file as their own record types.
Someone had to be allowed to do all of this. Every operator files a Form P-5 organisation report and gets a six-digit P-5 number. The P-5 Organization file is the operator dimension for the entire system.
The four join keys
Every one of those files is keyed by some combination of four identifiers. If you learn nothing else from this series, learn these.
| Key | Shape | Identifies |
|---|---|---|
| API number | 42-XXX-YYYYY |
A wellbore |
| P-5 operator number | six digits | A company |
| Lease / gas well ID | district + five digits | A production-reporting unit |
| Field number | eight digits | A named geological field |
The API number is the well's identity. The P-5 number is the operator's identity — and unlike the operator name, it is stable. The lease number is the identity of the thing that reports production, which is emphatically not the same as a well. The field number is what the RRC calls the reservoir the well produces from.
Two of the hardest lessons in Texas data come straight from that table: production is reported against leases and gas wells, not against API numbers, and the same physical well can appear under more than one API number over its life. Both get their own article.
What "the same data" means here
Several datasets are published twice — once as ASCII and once as EBCDIC. They are the same records, in two encodings, because the RRC has been migrating off the mainframe for decades and has not finished. If both exist, take the ASCII one. Where only EBCDIC exists, you have to decode it, and that is a solved problem.
Several other datasets overlap in content but differ in grain. The Wellbore Query extract is a wide, flat, one-row-per-well CSV that powers the RRC's own online well search. The Full Wellbore Database is the hierarchical original with casing, perforations, formations and plugging detail. They agree; one is a convenience view of the other's world. Pick by grain: flat and quick, or deep and structured.
Update cadences, and what "current" means
Cadence varies enormously and matters more than people expect:
- Nightly — daily drilling permits, completions, imaged forms.
- Twice weekly — the GIS county layers.
- Weekly — the Full Wellbore Database.
- Monthly — production, operators, field tables, most of the EBCDIC sets.
A monthly file is not a month behind; it is a month behind plus the reporting lag inside it. Production for a given month keeps changing for a long time after that month ends as operators file amended reports. Any analysis that treats the two most recent production months as complete will be wrong, and will be wrong in the direction of "activity is falling."
What EZRRC does with all this
EZRRC mirrors these datasets and republishes them in formats a normal person can open: CSV, TSV, JSON, Excel, Parquet, and for the spatial sets GeoPackage, GeoJSON, KML and shapefile. It also does three things the raw files do not:
- Resolves the codes. Every coded column — application type, well type, casing type, P-5 status — is backed by a real lookup table you can see and download, instead of a footnote in a scanned PDF.
- Publishes the joins. Each dataset page lists what it joins to, on which columns, and at what cardinality.
- Keeps the originals. The pristine RRC file is always offered alongside the converted one, so any conversion can be audited.
EZRRC does not re-interpret the data and does not correct it. If a field is blank in the RRC file, it is blank here. This is a mirror with the lights turned on, not a cleaned dataset.
Where to go next
The next article covers the conceptual model that trips up most newcomers: the relationship between a lease, a field, and a well, and why oil and gas are counted in completely different units of account. After that come the identifiers, then the file formats, then the individual datasets, then the joins.
If you are in a hurry and only want one thing: read the API number article, then the joining article. Those two will get you further than anything else here.