oil <- read.csv("us_crude_oil_production_weekly_2026_jan_jul.csv")
oil$week_ending <- as.Date(oil$week_ending)
head(oil)
## week_ending us_field_production_mbbl_d lower48_mbbl_d alaska_mbbl_d
## 1 2026-01-02 13827 13394 433
## 2 2026-01-09 13804 13372 432
## 3 2026-01-16 13781 13349 432
## 4 2026-01-23 13748 13319 430
## 5 2026-01-30 13599 13170 430
## 6 2026-02-06 13589 13161 429
## source
## 1 EIA Weekly Petroleum Status Report / PET.WCRFPUS2
## 2 EIA Weekly Petroleum Status Report / PET.WCRFPUS2
## 3 EIA Weekly Petroleum Status Report / PET.WCRFPUS2
## 4 EIA Weekly Petroleum Status Report / PET.WCRFPUS2
## 5 EIA Weekly Petroleum Status Report / PET.WCRFPUS2
## 6 EIA Weekly Petroleum Status Report / PET.WCRFPUS2
us <- oil$us_field_production_mbbl_d
length(us) # number of weeks
## [1] 31
mean(us) # average production
## [1] 13706
median(us) # middle value
## [1] 13703
sd(us) # spread
## [1] 89.66196
min(us)
## [1] 13585
max(us)
## [1] 13838
summary(us)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 13585 13620 13703 13706 13794 13838
Production is measured in thousand barrels per day.
plot(oil$week_ending, oil$us_field_production_mbbl_d,
type = "l",
xlab = "Week",
ylab = "Thousand barrels per day",
main = "U.S. Crude Oil Production")