title: Wind rose with ggplot (R)?
body: <p>I am looking for good R code (or package) that uses ggplot2 to create <a href="http://en.wikipedia.org/wiki/Wind_rose" rel="noreferrer">wind roses</a> that show the frequency, magnitude and direction of winds. </p>
  
  <p>I'm particularly interested in ggplot2 as building the plot that way gives me the chance to leverage the rest of the functionality in there.</p>
  
  <h2>Test data</h2>
  
  <p>Download a year of weather data from the 80-m level on the <a href="http://www.nrel.gov/midc/nwtc_m2/" rel="noreferrer">National Wind Technology's "M2"</a> tower. <a href="http://midcdmz.nrel.gov/apps/plot.pl?site=NWTC&amp;start=20010824&amp;edy=26&amp;emo=3&amp;eyr=2062&amp;year=2013&amp;month=1&amp;day=1&amp;endyear=2013&amp;endmonth=12&amp;endday=31&amp;time=0&amp;inst=21&amp;inst=39&amp;type=data&amp;wrlevel=2&amp;preset=0&amp;first=3&amp;math=0&amp;second=-1&amp;value=0.0&amp;user=0&amp;axis=1" rel="noreferrer">This link</a> will create a .csv file that is automatically downloaded. You need to find that file (it's called "20130101.csv"), and read it in.</p>
  
  <pre><code># read in a data file
  data.in &lt;- read.csv(file = "A:/drive/somehwere/20130101.csv",
                      col.names = c("date","hr","ws.80","wd.80"),
                      stringsAsFactors = FALSE))
  </code></pre>
  
  <p>This would work with any .csv file and will overwrite the column names.</p>
  
  <h2>Sample data</h2>
  
  <p>If you don't want to download that data, here are 10 data points that we will use to demo the process:</p>
  
  <pre><code>data.in &lt;- structure(list(date = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  </code></pre>
  
  <p>1L, 1L), .Label = "1/1/2013", class = "factor"), hr = 1:9, ws.80 = c(5, 
  7, 7, 51.9, 11, 12, 9, 11, 17), wd.80 = c(30, 30, 30, 180, 180, 
  180, 269, 270, 271)), .Names = c("date", "hr", "ws.80", "wd.80"
  ), row.names = c(NA, -9L), class = "data.frame")</p>