# For general data science
library(tidyverse)
# For reading and writing data tables and Excel files
library(data.table)
library(readxl)
# For data cleaning
library(janitor)
# For working with datetime
library(lubridate)
# For pretty tables
library(knitr)
library(gt)
knitr::opts_chunk$set(echo = TRUE)
Introduction
In Louisiana, oil and gas operators are required to submit a form, called form R5D, on a monthly basis to the Louisiana Department of Natural Resources. The form includes production numbers, sales numbers, well site gas use volumes, and flaring and venting volumes among other disposition data. Specifically, there are two field in the form labeled “Vented After Use for Gas Lift,” and “Vented (System Flare)” that contain the data we are working with. Reported gas flaring and venting is measured in thousand of cubic feet (Mcf).
Louisiana’s data from the monthly reports is available at the DNR’s SONRIS data portal here, which allows one year’s worth of data to be downloaded at a time. Click “Production Audit,” and then click the spreadsheet icon for “R5D Data Entry (Gas Disposition).” For the date fields, enter a starting date of “01-Jan” and ending date of “01-Dec” for a given year. For the “Group Code” field, click to highlight all codes for the complete data set, and then click to execute the search. To download the data, click the “Actions” dropdown menu near the top left of the displayed results table, click “Download,” and select the .csv format option. The column named “Group Code” can be filtered for “63” for volumes of vented gas and “64” for volumes of flared gas.
Note that executing searches for the date fields “01-Jan” through “01-Dec” will produce data for the entire given year because reports are dated for the first of the month. The data portal does not allow searches through “31-Dec” because the system registers the search as exceeding its one-year limit. DNR has confirmed that the “Report Date” column refers to the month the data was captured. An entry dated “01-Jan-20” contains data on oil and gas production that occurred in January of 2020.
The reported volumes contain negative values, described by the Louisiana Department of Natural Resources as indicating that the gas flared or vented was obtained from federal land but flared or vented on state land. Therefore, converting these numbers to positive integers is the only way to obtain the full total. According to DNR, this only includes “upstream” data. However, because this is gas obtained on federal lands and then flared on state lands, it seems like it would be what can often be considered “midstream.” Given that the satellite data includes “midstream” flaring in its “upstream” data set, this shouldn’t be a problem.
We pulled the disposition data from the SONRIS portal and saved it to the project directory, current as of August 4, 2021. This data may be amended by companies and is not subject to auditing by DNR, so disposition data downloaded after this date may produce differing results.
Load Data
We compiled and cleaned all this data from the state regulatory agency and saved it to new data sets available from the Howard Center here. (For more information about our data cleaning, please contact: howardcenter@asu.edu).
la <- read.csv (url("https://cronkitedata.s3.amazonaws.com/howard/gaslit/la_flaring_and_venting.csv"))
Analysis
FACT: Oil and gas operators flared and vented 45,068,737,000 cubic feet of gas from 2012 to 2020.
These numbers were calculated by aggregating the totals reported. We extracted the year from the date and created a new year
column, then filtered for the years 2012 to 2020, the time frame we’re looking at for this investigation. Next, we grouped by year to calculate annual totals. These results will be in MCF.
la_annualtotals <- la %>%
mutate (year = as.numeric(str_sub(report_date, -4, -1))) %>%
filter(year >= 2012 & year <= 2020) %>%
group_by(year) %>%
summarise(Total = sum(abs, na.rm = TRUE))
la_annualtotals %>%
gt(rowname_col = "year") %>%
tab_stubhead(label = "Year") %>%
tab_header(title = "Flaring and Venting Volumes Reported to Louisiana DNR",
subtitle = "Flaring and venting volumes in Mcf (thousand cubic feet)") %>%
fmt_number(column = "Total",
decimals = 0) %>%
grand_summary_rows(fns = list("Total" = "sum"),
columns=("Total"),
formatter=gt::fmt_number,
decimals=0)
Year |
Total |
2012 |
5,044,037 |
2013 |
4,949,096 |
2014 |
4,848,597 |
2015 |
3,992,885 |
2016 |
5,212,740 |
2017 |
5,422,500 |
2018 |
6,032,575 |
2019 |
5,123,582 |
2020 |
4,442,725 |
Total |
45,068,737 |
LS0tCnRpdGxlOiAiTG91aXNpYW5hIEZsYXJpbmcgYW5kIFZlbnRpbmciCmF1dGhvcjogIktlbm55IFF1YXlsZSwgUmFjaGVsIFN0YXBob2x6IgpvdXRwdXQ6CiAgICBodG1sX2RvY3VtZW50OgogICAgICBjb2RlX2ZvbGRpbmc6IHNob3cKICAgICAgZGZfcHJpbnQ6IHBhZ2VkCiAgICAgIHRvYzogdHJ1ZQogICAgICB0b2NfZmxvYXQ6IHRydWUKICAgICAgY29kZV9kb3dubG9hZDogdHJ1ZQotLS0KCmBgYHtyIHNldHVwLCBtZXNzYWdlPUZBTFNFLCBjbGFzcy5zb3VyY2U9ImZvbGQtaGlkZSJ9CgoKIyBGb3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