Have total emissions from PM2.5 decreased in the United States from 1999 to 2008? To answer this question we are going to use base plotting system to make a plot showing the total PM2.5 emission from all sources for each of the years 1999, 2002, 2005, and 2008.
main<- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
plot1=xtabs(main$Emissions~as.factor(main$year),data=main)
plot(plot1,type="l",xlab="Year",ylab = "Total Emissions")
Of the four types of sources indicated by the type (point, nonpoint, onroad, nonroad) variable, which of these four sources have seen decreases in emissions from 1999-2008 for Baltimore City? Which have seen increases in emissions from 1999-2008? The following plot is addressing this question:
## Warning: package 'ggplot2' was built under R version 3.2.2