1 Import data.

## # A tibble: 6,497,651 x 6
##    fips  scc      pollutant emissions type  year 
##    <chr> <chr>    <chr>         <dbl> <fct> <fct>
##  1 09001 10100401 PM25-PRI     15.7   POINT 1999 
##  2 09001 10100404 PM25-PRI    234.    POINT 1999 
##  3 09001 10100501 PM25-PRI      0.128 POINT 1999 
##  4 09001 10200401 PM25-PRI      2.04  POINT 1999 
##  5 09001 10200504 PM25-PRI      0.388 POINT 1999 
##  6 09001 10200602 PM25-PRI      1.49  POINT 1999 
##  7 09001 10200603 PM25-PRI      0.2   POINT 1999 
##  8 09001 10300401 PM25-PRI      0.081 POINT 1999 
##  9 09001 10300501 PM25-PRI      0.184 POINT 1999 
## 10 09001 10300504 PM25-PRI      0.273 POINT 1999 
## # ... with 6,497,641 more rows

2 Introduction.

This is document uses base R and GGPlot2 to graphically investigate the trend of air pollution in the US using the the dataset that measures PM2.5 in the United States by States from 1999 to 2008.

3 Plots.

3.1 Have total emissions from PM2.5 decreased in the United States from 1999 to 2008?

## `summarise()` ungrouping output (override with `.groups` argument)
## # A tibble: 4 x 2
##    year emissions
##   <dbl>     <dbl>
## 1  1999  7332967.
## 2  2002  5635780.
## 3  2005  5454703.
## 4  2008  3464206.

3.2 Total emissions in Manhattan County (fips == “36061”) from 1999 to 2008

## `summarise()` ungrouping output (override with `.groups` argument)
## # A tibble: 4 x 2
##    year emissions
##   <dbl>     <dbl>
## 1  1999     4986.
## 2  2002     3586.
## 3  2005     3344.
## 4  2008     3430.

3.3 Of the 4 types (point, nonpoint, onroad, nonroad) which of these sources have seen decreases in emissions.

## `summarise()` regrouping output by 'year' (override with `.groups` argument)
## `geom_smooth()` using formula 'y ~ x'

3.4 How have emissions from coal sources changes from 1999 to 2008?

## `summarise()` ungrouping output (override with `.groups` argument)
## `geom_smooth()` using formula 'y ~ x'

3.5 Emissions from motor vehicle sources in Manhattan

## `summarise()` ungrouping output (override with `.groups` argument)
## `geom_smooth()` using formula 'y ~ x'

3.6 Emissions from motor vehicle sources in Manhattan County vs Los Angeles County California

## `summarise()` regrouping output by 'year' (override with `.groups` argument)
## `geom_smooth()` using formula 'y ~ x'