R is much more than just statistics. It offers very powerful & flexible graphics to be produced.
For a project I needed a way to display graphically the different azimuths that polygon objects contained. A wind rose diagram is used extensively in meteorology to show direction & magnitude of wind, you can think of it as a circular histogram with 0-360 limits. In this case it would be also provide a visual exploratory method for drumlin fields.
Note:
- the polygon objects in question must have an azimuth field. Using QGIS to do the initial spatial work, you can have R do the same.
- in examples “std_bear” is reference. i have standardized bearing to 0-180. this means degree > 180, then subtract 180.
Basic workflow:
– QGIS
- Ftools to create polygon centroids
- mmqgis — transfer — export attributes to csv. ensure that you select the attribute with azimuth prior to export.
– R
- download http://www.exposurescience.org/pub/software/heR.Misc.tar.gz
- install package – change directory where file saved. >> install.packages(“C:\\1_WorkStation_Folders\\Downloads\\heR.Misc.tar.gz”,repos=NULL,type=”source”)
- library(heR.Misc)
- import csv of centroids. >> dataIn<-read.csv(file=”c://tmp//1_analysis_dh_dl/fullarea_bearing.csv”,header=T,sep=”,”)
- create vector containing only the azimuth data. >>dir_stdBear<-inData$std_bear
- plot wind rose with 9 bins (review). >> rose2(dir_stdBear,nplumes=9)
Output:
This is default output & there is many options to improve appearance.
What is interesting is that there are 5 field groupings & the predominate azimuth is easterly. From the drumlin data, I know there are approximately 5 large fields on the island. The percentages indicate amount of data.
Cheers,
Richard
