2 Setup

2.1 Loading required libraries

Our first step is to load the inventory and BY2011 packages.

library(inventory)
library(BY2011)

Wait for it — inventory imports a lot of stuff! You will see a lot of red message text scroll by.

2.2 Peeking at data

BY2011_annual_emission_data is tabular data supplied by the BY2011 package. Since we invoked library(BY2011), we have access to it. Here is what it looks like.

head(BY2011_annual_emission_data)
Table 2.1: First six rows of BY2011_annual_emission_data.
year cnty_abbr cat_id pol_abbr ems_qty ems_unit
CY1990 ALA 23 PM10 6.311385 ton/yr
CY1990 ALA 23 PM2.5 6.241259 ton/yr
CY1990 ALA 23 ROG 82.422747 ton/yr
CY1990 ALA 23 TOG 87.219838 ton/yr
CY1990 ALA 23 TSP 7.012650 ton/yr
CY1990 ALA 24 CO2 3.652422 ton/yr