Start here — what the Texas RRC actually publishes
The Railroad Commission gives away roughly sixty oil and gas datasets. This is the map: which files exist, what each one is really about, and how they hang together once you know the join keys.
The Railroad Commission publishes some of the most complete oil and gas data in the world, in some of the least approachable formats in the world. These 17 articles explain what is in it, how the pieces key together, and how to get answers out of it.
Start with Start here — what the Texas RRC actually publishes
What the Railroad Commission publishes, and how the pieces fit.
The Railroad Commission gives away roughly sixty oil and gas datasets. This is the map: which files exist, what each one is really about, and how they hang together once you know the join keys.
A lease is not a well, a field is not a formation, and Texas counts oil and gas in two different currencies. Get this wrong and every production number you compute will be wrong.
API numbers, districts, P-5 numbers — the keys everything joins on.
The API well number is the closest thing Texas has to a primary key for a hole in the ground. Here is how it is built, why the RRC stores only part of it, and why the same well legitimately appears under several different numbers.
Districts are the RRC's administrative geography, they are not numeric, they do not nest cleanly inside anything you already have, and half the datasets are partitioned by them. Here is how to handle both districts and counties.
All thirteen Railroad Commission oil and gas districts and the statewide code, the office that administers each, the internal number the production system uses instead of the printed one, and which counties belong to which district — including the one that has none.
Every company that touches a Texas well has a six-digit P-5 number. The number is stable and the name is not. Here is what the P-5 Organization file contains, and how to use it as the operator dimension for everything else.
EBCDIC, fixed-width COBOL layouts, implied decimals, zoned signs.
A dozen RRC datasets ship in IBM's pre-ASCII mainframe character encoding. This is what EBCDIC is, how code page 037 maps onto ASCII, what a mis-decoded file looks like, and how to convert one correctly.
How to read an RRC record layout PDF and turn it into a parser: PIC clauses, 1-based positions, implied decimal points, split date parts, and the zoned-decimal sign that puts a `}` on the end of a number.
Dataset by dataset: what is in it, and what it does not tell you.
The Production Data Query dump is sixteen tables and tens of millions of rows of monthly Texas production back to 1993. This is what a cycle is, how the lease and county-lease tables differ, and why the last two months always lie.
The oil ledger, the gas ledger, the historical ledgers and the statewide production files are the Commission's mainframe view of production and allowables. Here is what each holds, why they arrive as EBCDIC packed decimal, which questions only they can answer, and why for almost everything else the PDQ tables are the better download.
Permit files are the fastest-moving data the RRC publishes and the most over-interpreted. Here is the permit lifecycle, the fifteen application types, the coordinate trailer records, and what a permit genuinely proves.
What was actually built downhole. The completion filings give you casing, perforations, formations and initial tests; the Full Wellbore Database gives you every hole ever drilled in Texas as a 28-record-type hierarchy.
The Commission publishes its map data as shapefiles, one zip per county, in a 1927 datum. Here is what is in the well, pipeline, survey and base layers, how to get a statewide layer out of 255 files, how to reproject and convert them — and when a GeoPackage of the parsed permit or wellbore data is the better answer.
Worked joins, the HTTP API and the Python SDK.
The Railroad Commission publishes drilling permits nightly as a fixed-width mainframe extract. Here is how to get them as CSV, Excel or a GeoPackage instead — the whole state, one county, one district, one operator or one day — and which of the seven permit files to take.
The Commission's production release is a 3.6 GB zip of sixteen tables. You almost never want the zip. Here is which table answers which question — county, lease, operator, field or district — how to filter it down to a download you can open, and the four traps that make production numbers wrong.
Nine joins that connect the RRC's separate files into one dataset, with the cardinality of each, the type and padding traps that break them, and worked SQL you can run.
Query any RRC dataset over HTTP, resolve code values, request an export in any format, and assemble a cross-dataset view of a single well — with curl, with the Python SDK, and from an MCP-capable assistant.