# For general data science
library(tidyverse)
# For data cleaning
library(janitor)
# For working with datetime
library(lubridate)
# For pretty tables
library(knitr)
library(gt)
knitr::opts_chunk$set(echo = TRUE)
Oil and gas companies in Oklahoma are not required to report volumes of gas flared or vented. However, they are required to request approval from the Oklahoma Corporation Commission (OCC) to flare or vent in excess of 50,000 cubic feet per day.
To request approval operators fill out Form 1022, the Application to Flare or Vent Gas. At the bottom of the form, there are fields for the OCC to record the approved volume per day and the number of days.
The Howard Center built a database to total approved flaring and venting volumes in Oklahoma between 2012 and 2020 by extracting data from more than 800 requests submitted to the OCC. In creating the database, the Howard Center encountered duplicate flaring data due to the same application being submitted multiple times, as well as situations where there were applications for single wells that also existed on applications for leases covering multiple wells. These duplicates were filtered out of the final data set.
We downloaded the Form 1022s from the commission’s imaging website and then opened each scanned copy to manually enter the estimated and approved flaring and venting volumes. Applications were either for a single well or a lease containing multiple wells.
Some operators submitted applications to flare from a lease and then submitted multiple applications for each well on that lease. We removed these applications to avoid doubling the volumes requested and approved.
There were also applications that were not required because the volumes requested were below 50,000 cubic feet per day. We clearly delineate these as being “not required” in our data set. We still include the approved volumes (if any) from these requests when calculating our totals to best reflect how much flaring and venting the commission authorized between 2012 and 2020.
Because many of the applications were filled out by hand, we identified several data entry errors. We consulted the commission about these. Applications that were dismissed or void were excluded from the yearly totals.
Load Data
The dataset is available from the Howard Center here.
ok <- read.csv(url("https://cronkitedata.s3.amazonaws.com/howard/gaslit/ok_flaring_and_venting.csv"))
Analysis
FACT: According to the state permit applications, the commission approved the flaring and venting of 4,838,390,000 cubic feet of natural gas from 2012 to 2020.
To calculate this total, we filtered out dismissed and denied applications. Then, we extracted the year from the approved_date
variable. Finally, we grouped by year and aggregated annual volumes to arrive at a grand total.
ok %>%
filter(outcome == "approved" | outcome == "no permit required") %>%
mutate(effective_date = as.Date(effective_date, format = "%m/%d/%Y"),
year = year(effective_date)) %>%
group_by(year) %>%
summarise(Total = sum(as.numeric(total_volume_approved), na.rm = TRUE)) %>%
gt(rowname_col = "year") %>%
tab_stubhead(label = "Year") %>%
tab_header(title = "Flaring and Venting Volumes Approved by OCC",
subtitle = "Flaring and venting volumes in Mcf (thousand cubic feet)") %>%
fmt_number(column = "Total",
decimals = 2) %>%
grand_summary_rows(fns = list("Total" = "sum"),
columns=("Total"),
formatter=gt::fmt_number,
decimals=2)
Year |
Total |
2012 |
192,050.00 |
2013 |
1,374,885.00 |
2014 |
1,084,015.00 |
2015 |
238,540.00 |
2016 |
98,670.00 |
2017 |
280,882.00 |
2018 |
664,967.00 |
2019 |
552,996.00 |
2020 |
349,385.00 |
Total |
4,836,390.00 |
LS0tCnRpdGxlOiAiT2tsYWhvbWEgRmxhcmluZyBhbmQgVmVudGluZyIKYXV0aG9yOiAiTW9sbGllIEphbWlzb24iCm91dHB1dDoKICAgIGh0bWxfZG9jdW1lbnQ6CiAgICAgIGNvZGVfZm9sZGluZzogc2hvdwogICAgICBkZl9wcmludDogcGFnZWQKICAgICAgdG9jOiB0cnVlCiAgICAgIHRvY19mbG9hdDogdHJ1ZQogICAgICBjb2RlX2Rvd25sb2FkOiB0cnVlCi0tLQoKYGBge3Igc2V0dXAsIG1lc3NhZ2U9RkFMU0UsIGNsYXNzLnNvdXJjZT0iZm9sZC1oaWRlIn0KCiMgRm9yIGdlbmVyYWwgZGF0YSBzY2llbmNlCmxpYnJhcnkodGlkeXZlcnNlKQoKIyBGb3IgZGF0YSBjbGVhbmluZwpsaWJyYXJ5KGphbml0b3IpCgojIEZvciB3b3JraW5nIHdpdGggZGF0ZXRpbWUKbGlicmFyeShsdWJyaWRhdGUpCgojIEZvciBwcmV0dHkgdGFibGVzCmxpYnJhcnkoa25pdHIpCmxpYnJhcnkoZ3QpCgprbml0cjo6b3B0c19jaHVuayRzZXQoZWNobyA9IFRSVUUpCgpgYGAKCk9pbCBhbmQgZ2FzIGNvbXBhbmllcyBpbiBPa2xhaG9tYSBhcmUgbm90IHJlcXVpcmVkIHRvIHJlcG9ydCB2b2x1bWVzIG9mIGd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