The US monthly consumption of natural gas by end-use and state between 1973 (US aggregate, state level since 1989) and 2022.

Units: Million Cubic Feet

usgas

Format

A data.frame with 6 variables.

date

A Date, the month and year of the observation (the day set by default to 1st of the month)

process

The process type description

state

The US state name

state_abb

the US state abbreviation

y

A numeric, the monthly natural gas residential consumption in a million cubic feet

Source

US Energy Information Administration (EIA) website.

Details

The dataset contains monthly summary of the consumption of natural gas by end-use in the US by state and total aggregate level. The data is available for the state level between January 1989 and December 2022, and for the US level between January 1973 and Dec 2022. It includes the following end-use categories:

- Commercial Consumption - Delivered to Consumers - Electric Power Consumption - Industrial Consumption - Lease and Plant Fuel Consumption - Pipeline Fuel Consumption - Residential Consumption - Vehicle Fuel Consumption

Examples


library(plotly)
#> Loading required package: ggplot2
#> 
#> Attaching package: ‘plotly’
#> The following object is masked from ‘package:ggplot2’:
#> 
#>     last_plot
#> The following object is masked from ‘package:stats’:
#> 
#>     filter
#> The following object is masked from ‘package:graphics’:
#> 
#>     layout

data("usgas")

head(usgas)
#>         date                 process state state_abb      y
#> 1 1973-01-01  Commercial Consumption  U.S.      U.S. 392315
#> 2 1973-01-01 Residential Consumption  U.S.      U.S. 843900
#> 3 1973-02-01  Commercial Consumption  U.S.      U.S. 394281
#> 4 1973-02-01 Residential Consumption  U.S.      U.S. 747331
#> 5 1973-03-01  Commercial Consumption  U.S.      U.S. 310799
#> 6 1973-03-01 Residential Consumption  U.S.      U.S. 648504

# Plot the US consumption

us_df <- usgas[which(usgas$state == "U.S."), ]

plot_ly(data = us_df,
        x = ~ date,
        y = ~ y,
        color = ~ process,
        type = "scatter",
        mode = "line") |>
  layout(title = "US Monthly Consumption by End Use",
         yaxis = list(title = "MMCF"),
         xaxis = list(title = "Source: EIA Website"),
         legend = list(x = 0, y = 1.05),
         margin = list(l = 50, r = 50, b = 70, t = 60))
# Plot the California consumption ca_df <- usgas[which(usgas$state == "California"), ] plot_ly(data = ca_df, x = ~ date, y = ~ y, color = ~ process, type = "scatter", mode = "line") |> layout(title = "California Monthly Consumption by End Use", yaxis = list(title = "MMCF"), xaxis = list(title = "Source: EIA Website"), legend = list(x = 0, y = 1.05), margin = list(l = 50, r = 50, b = 70, t = 60))