Introduction to R : A 12 month Air Quality Plot

October 26, 2016
By

(This article was first published on R – Saturn Science, and kindly contributed to R-bloggers)

12-month-extraHere is my completed visualization analysis of the year 2015 using R and ggplot. I also experimented with the ggExtra package to see what additional information it would give.

The density plot on the right margin helps to point out that the most common 2.5AQI was between 10 and 100.

 

boxcodermd

As you can see, there is a downward trend until September and then the AQI heads back up during the winter months. Many people here outside the city proper burn coal and I think that has something to do with it.

Here is the plot without the ggExtra. It’s the same information, just without the marginal plots. Which one do like better?

12monthbestIn IB Mathematics this week, my students are using R and ggplot to complete their research papers. We had to google for some solutions on how to change the y axis label and values.

I’ll have a post on how we figured it out in a few days.

Also, as I get more experience with R and R Markdown, I find myself just working in R markdown files because it’s easier and saves me time. Sometimes I’ll have an R script open and copy and paste code into the Rmd file, but it seems using just the Rmd file is faster and more efficient.

Till then…

 

To leave a comment for the author, please follow the link and comment on their blog: R – Saturn Science.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)